home / skills / jarrodwatts / claude-code-config / rigorous-coding

rigorous-coding skill

/skills/rigorous-coding

This skill helps you enforce rigorous coding standards across writing, implementation, and reviews, ensuring robust, maintainable JavaScript code.

npx playbooks add skill jarrodwatts/claude-code-config --skill rigorous-coding

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
294 B
---
name: rigorous-coding
description: Apply rigorous coding standards. Use when writing, implementing, or reviewing code.
---

Do not write code before stating assumptions.
Do not claim correctness you haven't verified.
Do not handle only the happy path.
Under what conditions does this work?

Overview

This skill enforces rigorous coding standards during writing, implementation, and code review. It helps developers state assumptions, surface edge cases, and avoid unverified correctness claims. The goal is more reliable, maintainable JavaScript by forcing explicit conditions and comprehensive reasoning.

How this skill works

The skill inspects proposed code and developer prose to ensure assumptions are stated before code is written and that correctness claims are verified or hedged. It flags happy-path-only implementations, missing failure modes, and absent operational conditions. It suggests testable preconditions, postconditions, and explicit runtime invariants.

When to use it

  • When drafting new JavaScript functions or modules to document explicit assumptions first.
  • During code reviews to detect unstated edge cases and overconfident claims.
  • When writing design notes or PR descriptions that should include operating conditions.
  • While building error handling and validation to ensure non-happy-paths are covered.
  • When converting quick prototypes into production-ready components.

Best practices

  • Always state assumptions and preconditions before coding the solution.
  • Avoid asserting correctness without evidence; include tests or checks.
  • Enumerate failure modes and handle or document them explicitly.
  • Specify the input domain, expected outputs, and environmental constraints.
  • Write small, testable units with clear invariants and rollback behavior.

Example use cases

  • A reviewer detects a function that assumes non-null input; the skill requests explicit null handling or documented precondition.
  • A developer preparing a PR lists assumptions, edge cases, and required integration tests before merging.
  • Converting a prototype async routine into production code by adding timeout handling and retry policies.
  • Designing an API endpoint and enumerating rate limits, authentication expectations, and failure responses.
  • Automating a checklist for library releases that verifies documented guarantees match implemented checks.

FAQ

What counts as stating an assumption?

A brief explicit sentence describing expected input shapes, environmental constraints, and any invariants the code relies on before implementation.

Does the skill provide tests?

It suggests unit and integration tests and describes what they must prove, but it does not generate full test suites automatically.