Lock tests first
Skill himanshi-28/coding-agent-skills/skills/lock-tests-first
Portable Agent Skills for test-first development, evidence-based debugging, code review, and reviewable Git history.
npx -y skills add himanshi-28/coding-agent-skills --skill lock-tests-firstAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Explicit-invocation workflow for test-first implementation that defines behavior, proves new tests fail correctly, protects those tests from implementation-time edits, implements production code, and verifies the final red-to-green result. Use only when the user directly invokes the lock-tests-first skill.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.0 KB, 526 tokens by cl100k_base, as published. Nobody here has run it
Lock Tests First
Treat tests as the behavioral contract. Do not weaken or rewrite protected tests merely to make implementation pass.
Workflow
- Confirm the contract.
- Start from approved acceptance criteria or derive observable inputs, outputs, errors, state changes, and invariants.
- Resolve any ambiguity that would change expected behavior before editing files.
- Inspect the test system.
- Read repository instructions, test commands, nearby tests, fixtures, and production interfaces.
- Match existing test levels and conventions.
- Design coverage.
- Cover the happy path, meaningful boundaries, failures, regression cases, and relevant authorization or security behavior.
- Prefer behavior-level assertions over implementation details, excessive mocks, or broad snapshots.
- Write the contract tests only.
- Modify only tests and the minimum test-only fixtures or infrastructure required to express the contract.
- Do not write or change production behavior yet.
- Prove the red state.
- Run the smallest relevant test command.
- Confirm each new test fails because the behavior is missing or wrong, not because of syntax, setup, import, fixture, or unrelated failures.
- If a test passes unexpectedly, determine whether the behavior already exists or the assertion is ineffective. Do not proceed with a false red state.
- Audit and protect the tests.
- Check that assertions are meaningful, deterministic, and capable of detecting a wrong implementation.
- Record the protected test paths and their exact pre-implementation diff or content hash.
- Commit a test-only baseline only when the user requested or approved committing. Otherwise state that the freeze is procedural and keep the baseline for comparison.
- Implement the smallest production change.
- Do not modify protected tests, their expected values, or test selection.
- If a protected test is genuinely incorrect, stop and explain the flaw; obtain approval before changing the contract.
- Prove the green state.
- Run the focused tests, then relevant surrounding tests and available type, lint, or build checks in proportion to risk.
- Compare protected tests to the baseline and confirm they were not altered during implementation.
- Review the result.
- Inspect the production diff for overfitting, hard-coded test values, bypassed code paths, weakened validation, or unrelated changes.
Output
Report the red evidence, protected test files, implementation summary, green evidence, broader checks, and anything not verified. Never report success from a passing test whose pre-implementation failure was not established. Use the review-changes skill before packaging commits.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.