agentleFS
las-pinterlas-pinter/persona-agents/skills/implementer/code-implementation/SKILL.md

code-implementation

Skill2 starsChanged 2 months agoMITView on GitHub

Language-agnostic code implementation workflow for features, bugs, refactors, and tests.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before touching a single line:

    line 22
  2. Very specific:

    Read project configs (package.json, pyproject.toml, Cargo.toml, go.mod) — identify language, framework, test runner, linter.

    line 24
  3. Very specific:

    Read convention docs: CONTRIBUTING.md, CLAUDE.md, README.md, .editorconfig.

    line 25
  4. Distinctive:

    Run the baseline build/test command and confirm it's green.

    line 26
  5. Distinctive:

    If requirements are ambiguous, stop and ask.

    line 33
  6. Distinctive:

    Consider edge cases: null/empty input, unexpected state, dependency failures, concurrency, permissions, resource exhaustion.

    line 36
  7. Distinctive:

    Follow existing code patterns and conventions — match the project's style, not your preference.

    line 43
  8. Distinctive:

    Search for existing helpers before writing new code (DRY).

    line 47
  9. Distinctive:

    Run in this order. Fix all issues before advancing to the next step:

    line 63
  10. Distinctive:

    Update docs affected by the change: README, API docs, inline docs, changelog.

    line 80
  11. Distinctive:

    Leave commits to the orchestrator.

    line 81
  12. Very specific:

    Use the type system fully.

    line 88
  13. Very specific:

    Prefer specific types over generic: EmailAddress over string.

    line 89
  14. Distinctive:

    Use exhaustive pattern matching for enum-like types.

    line 90
  15. Very specific:

    Never swallow errors (no empty catch/except blocks).

    line 94
  16. Very specific:

    Use idiomatic error types for the language (Rust Result, Go if err != nil, etc.).

    line 95
  17. Distinctive:

    Avoid N+1 queries. Batch related data fetches.

    line 105
  18. Distinctive:

    No magic numbers — extract to named constants.

    line 112
  19. Very specific:

    Write tests for ALL new functionality, following Arrange → Act → Assert with one Act per test.

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

Code Implementation

Quick Reference

1. ORIENT    → Read configs, run baseline, trace a similar feature
2. PLAN      → Read full files, consider edge cases, identify changes
3. IMPLEMENT → Follow patterns, handle all states, comment WHY not WHAT
4. VERIFY    → Run quality gates in order (see Phase 4)
5. DELIVER   → Self-review, update docs, leave commits to orchestrator

Phase 1: Orient

Before touching a single line:

  • Read project configs (package.json, pyproject.toml, Cargo.toml, go.mod) — identify language, framework, test runner, linter.
  • Read convention docs: CONTRIBUTING.md, CLAUDE.md, README.md, .editorconfig.
  • Run the baseline build/test command and confirm it's green. If baseline is broken, stop and report it — never build on a broken foundation.
  • Trace an existing similar feature end-to-end to understand the patterns and conventions expected.

Phase 2: Plan

  • If requirements are ambiguous, stop and ask. Building the wrong thing correctly is still wrong.
  • Read the complete file before editing anything. The #1 cause of hallucinated code is editing a file you haven't fully read.
  • Identify: which files change, which functions/classes, whether new files are needed, whether interfaces change.
  • Consider edge cases: null/empty input, unexpected state, dependency failures, concurrency, permissions, resource exhaustion.
  • For complex work, write a 3-5 bullet plan before implementing.

Phase 3: Implement

  • Follow existing code patterns and conventions — match the project's style, not your preference.
  • Handle ALL states, not just the happy path: success, error, empty, and edge cases.
  • Single responsibility — if a function name contains "and", split it.
  • Handle errors properly: meaningful messages, enforce contracts at boundaries.
  • Search for existing helpers before writing new code (DRY).
  • Make minimal changes — do not refactor unrelated code in the same change.
  • Comment WHY, not WHAT. The code already says what it does.

By task type:

Task TypePattern
New featureWrite tests alongside the feature
Bug fixWrite a failing test that reproduces the bug FIRST, then fix
RefactorKeep tests passing after every change — small, safe steps

Phase 4: Verify

Run in this order. Fix all issues before advancing to the next step:

Type Check → Lint → Existing Tests → Build → New Tests
  1. Type check — zero tolerance for type errors (tsc, mypy, cargo check)
  2. Lint — zero warnings, matching the project's exact config
  3. Existing tests — full suite must pass; if a test was failing before your change, report it
  4. Build — project must compile, package, or bundle successfully
  5. New tests — write tests for all new functionality; run full suite again

Phase 5: Deliver

  • Review your own code as if you were a reviewer: correctness, edge cases, naming, comments, dead code, security.
  • Update docs affected by the change: README, API docs, inline docs, changelog.
  • Leave commits to the orchestrator.

Universal Code Standards

Type Safety

  • Use the type system fully. No any, no casts without justification.
  • Prefer specific types over generic: EmailAddress over string.
  • Use exhaustive pattern matching for enum-like types.

Error Handling

  • Fail fast — detect invalid state early, report clearly.
  • Never swallow errors (no empty catch/except blocks).
  • Use idiomatic error types for the language (Rust Result, Go if err != nil, etc.).
  • Error messages include context: what failed, why, what was expected.

Security

  • Validate ALL inputs at trust boundaries.
  • Parameterize ALL queries — no string concatenation in SQL or shell.
  • Never hardcode secrets.

Performance

  • Be aware of algorithmic complexity. O(n²) over user data is a bug.
  • Avoid N+1 queries. Batch related data fetches.
  • Clean up resources: close files, release connections.
  • Profile before optimizing — if you haven't measured, you're guessing.

Naming

  • Names reveal intent: calculateInvoiceTotal() not calc().
  • Booleans read naturally: isActive, hasPermission, canDelete.
  • No magic numbers — extract to named constants.
  • Functions under ~40 lines; files under ~300 lines.

Testing Standards

Write tests for ALL new functionality, following Arrange → Act → Assert with one Act per test. Structure and naming conventions live in skills/tester/test-case-structure/.

ScenarioTest
Happy pathDoes expected behavior work?
Failure casesWhat happens when something goes wrong?
Edge casesBoundaries, empty input, special values
Error messagesHelpful and accurate?
PermissionsUnauthorized actions rejected?

Anti-Patterns

Anti-PatternDo This Instead
Editing without reading the full fileRead first, always
Skipping tests for "small" changesRun the full suite always
Leaving TODOs/FIXMEsImplement properly or create a tracked task
Refactoring while adding featuresSeparate tasks
Writing clever codeWrite clear, obvious code

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.