agentleFS
serhiilenivserhiileniv/ccs/skills/implement/SKILL.md

implement

Skill0 starsChanged 10 days agoMITView on GitHub

Write code test-first (red, green, refactor, one test at a time), for bugs and features alike. Use to implement an approved spec, fix a bug, or add behaviour.

192 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, ask-matt and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 91 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 50 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 88 projects that use this

  • ryotaroh180105Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 42 projects that use this

  • GoogleSkill

    to-spec

    Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.

    Also in 168 projects that use this

  • +3 more from google

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 171 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No test runner in the repo → stop and say so.

    line 17
  2. Distinctive:

    Read the code the change touches and trace the real flow before listing anything.

    line 21
  3. Distinctive:

    Run it. Watch it fail for the reason you stated.

    line 36
  4. Distinctive:

    Never cut: validation at trust boundaries, data-loss handling, security, accessibility, anything requested.

    line 48
  5. Distinctive:

    No code for tests not yet written.

    line 51
  6. Distinctive:

    Only on green. Aim it at the next reader:

    line 55
  7. Distinctive:

    Follow the conventions of the files you touch: naming, layering, error handling.

    line 57
  8. Distinctive:

    No abstraction nobody asked for: no one-implementation interface, no config for a constant, no scaffolding for later.

    line 58
  9. Distinctive:

    Remove duplication you introduced.

    line 60
  10. Distinctive:

    Delete what you made dead: unused code, imports, commented-out lines.

    line 61
  11. Distinctive:

    Run the full suite after.

    line 63
  12. Very specific:

    Do not commit. The user commits.

    line 80

“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/ccs:implement

Code is done when a test that used to fail now passes, and the suite is green.

Step 0 — route

  • Non-trivial and no spec → /ccs:spec first.
  • A bug whose cause is not established → /ccs:root-cause first, then take its root cause and evidence rather than re-deriving them. Fixing an untraced symptom produces a second bug behind the first.
  • No test runner in the repo → stop and say so. Choosing one is a spec.

Step 1 — test list

Read the code the change touches and trace the real flow before listing anything. The smallest change in the wrong place is a second bug.

  • From a spec: one line per acceptance criterion.
  • From a bug: one line, the reproduction.
  • Otherwise: one line per behaviour in the request.

A criterion no test can check stays on the list as manual: <why> — never dropped. Show the list before writing code.

Step 2 — red

One test, where the repo already keeps its tests, in the style already used there. It asserts behaviour through the public interface, not internals or the current output.

Run it. Watch it fail for the reason you stated. A compile error or a setup mistake is not red. A test you never saw fail is not evidence.

Step 3 — green

Smallest code that makes that test pass. Stop at the first rung that holds: not needed → skip · already in the repo → reuse · stdlib, platform or an installed dependency → use it · one line → one line · else the minimum that works. Two options the same size → the one correct on edge cases.

  • A bug: grep every caller of what you touch; fix it once, where they all route through.
  • A new dependency is a design change → step 5.
  • Never cut: validation at trust boundaries, data-loss handling, security, accessibility, anything requested.
  • A shortcut with a known ceiling gets a one-line comment: the ceiling, and when to upgrade.
  • No code for tests not yet written. No refactors, cleanups or renames mixed in.

Step 4 — refactor

Only on green. Aim it at the next reader:

  • Follow the conventions of the files you touch: naming, layering, error handling.
  • No abstraction nobody asked for: no one-implementation interface, no config for a constant, no scaffolding for later.
  • Remove duplication you introduced. Boring over clever. Fewest files.
  • Delete what you made dead: unused code, imports, commented-out lines.

Run the full suite after.

Step 5 — next

Tick the item, back to step 2. New behaviour, or a second bug, found on the way → append it to the list. Never build it silently.

A design change mid-way → stop. Update the spec, or run /ccs:spec if there is none.

Step 6 — done

  • the full suite passes — run it, do not assume
  • the repo's typecheck and lint gates pass, if it has them

Report each list item → test name or manual, then the actual suite output. For a bug, add the root cause in one line. What you skipped, one line each: skipped: X, add when Y.

Do not commit. The user commits. Before a PR, suggest /ccs:review. Then write the report (below).

Writing

One line where one line does. Answer first. State the fact, not the story behind it — no narrating what was tried, no paragraph restating the line above. Two things always stay: why a non-obvious decision was made, and what a check cannot do. Caveats and risks still get said, one line each.

Outcome: success = every list item green or manual, suite green · partial = items left · failed = suite red, or stopped.

Report

Last step, every run, whatever the outcome: write .ccs/reports/<skill>/<YYYY-MM-DD>-<slug>.md at the repo root, and add .ccs/ to .git/info/exclude if missing. One line per field, no secrets, tokens or customer data. Print the path.

---
skill: <skill>
date: <YYYY-MM-DD>
repo: <owner/name>
target: <argument, one line>
outcome: success | partial | failed
learned: false
---

Used: <tools, CLIs, MCPs, files that did the work>
Found: <the result, one or two lines>
Friction: <what slowed or blocked it; a user correction; "none">

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.