agentleFS
bhoon716bhoon716/skill-forge/skills/feature-dev/SKILL.md

feature-dev

Skill4 starsChanged 10 days agoMITView on GitHub

Use when the user asks to add, implement, create, support, enable, expose, integrate, or build a new capability, API, UI behavior, command, option, workflow, or product behavior in a codebase using strict test-driven development. This skill guides feature development through Red → Green → Refactor by framing the requested behavior, writing or updating tests before production code, confirming meaningful failure, implementing the smallest passing change, refactoring only after green, and reporting real validation. Do not use for bug fixing, behavior-preserving refactoring, investigation-only tasks, documentation-only changes, test-only cleanup, or dependency upgrades unless the upgrade is directly required for the feature.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use code-review.

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.
  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 6 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

56 rules. 0 are common, 55 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 55

    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:

    Use Red → Green → Refactor as the central loop:

    line 12
  2. Distinctive:

    Write or update tests before implementing production code.

    line 15
  3. Distinctive:

    Run the tests and confirm they fail for the expected reason.

    line 16
  4. Distinctive:

    Run the tests again and confirm they pass.

    line 18
  5. Distinctive:

    Run related verification commands.

    line 20
  6. Distinctive:

    Use this skill when the request is primarily about adding new behavior.

    line 25
  7. Distinctive:

    Do not use this skill when the request is primarily:

    line 37
  8. Distinctive:

    If a task mixes feature development with bug fixing or refactoring:

    line 46
  9. Distinctive:

    Keep the feature implementation focused.

    line 48
  10. Distinctive:

    Use a bugfix workflow first if existing broken behavior blocks the feature.

    line 50
  11. Distinctive:

    Use a separate refactoring workflow after the feature works if structural cleanup is still needed.

    line 51
  12. Distinctive:

    Add product behavior that was not requested.

    line 60
  13. Distinctive:

    Treat unexecuted tests as proof of correctness.

    line 62
  14. Distinctive:

    Before changing code, inspect the repository enough to follow its conventions.

    line 69
  15. Distinctive:

    Check for project instructions when present:

    line 71
  16. Distinctive:

    Check package and build files when present:

    line 79
  17. Distinctive:

    Check test and CI configuration when present:

    line 91
  18. Distinctive:

    Test helpers, factories, fixtures, mocks, stubs, snapshots, and integration utilities.

    line 107
  19. Distinctive:

    Prefer existing project conventions over inventing new patterns.

    line 111
  20. Distinctive:

    Before implementation, find the existing owner and canonical path for the behavior.

    line 115
  21. Distinctive:

    Use this checkpoint when a feature crosses multiple components, changes an ownership boundary, or introduces a service, dependency, state …

    line 123
  22. Distinctive:

    When materially different approaches are viable, compare the smallest fit that reuses the existing system with one alternative.

    line 129
  23. Very specific:

    If the tradeoff is primarily an architecture decision or requires migration across boundaries, use architecture to examine it rather than …

    line 130
  24. Distinctive:

    Ask a focused question only if an unresolved user-owned decision materially affects product behavior, public contracts, security, privacy, …

    line 131
  25. Distinctive:

    Do not add a separate approval gate to a fully specified, low-risk task.

    line 134
  26. Distinctive:

    Write concise acceptance criteria.

    line 158
  27. Distinctive:

    If a product decision is missing, infer from existing patterns only when the inference is low-risk.

    line 160
  28. Distinctive:

    Test helpers, factories, fixtures, mocks, stubs, snapshot patterns, and integration utilities.

    line 170
  29. Distinctive:

    Prefer the test style already used for the affected layer.

    line 174
  30. Distinctive:

    Prefer behavior-oriented tests over implementation-detail tests.

    line 195
  31. Distinctive:

    Write or update tests first.

    line 199
  32. Distinctive:

    If the test passes before implementation, revise the test or reassess whether the feature already exists.

    line 207
  33. Distinctive:

    If the test fails for an unrelated reason, fix the test setup if the fix is local and clearly required.

    line 209
  34. Distinctive:

    Follow existing project conventions.

    line 223
  35. Distinctive:

    Keep changes focused on the requested behavior.

    line 225
  36. Distinctive:

    Avoid changing unrelated public behavior.

    line 227
  37. Distinctive:

    Add configuration, migration, documentation, or examples only when directly required by the feature.

    line 228
  38. Distinctive:

    Update lock files only when dependency changes are necessary for the feature.

    line 230
  39. Distinctive:

    Run the targeted test again.

    line 232
  40. Distinctive:

    Remove duplication introduced by the implementation.

    line 240
  41. Distinctive:

    Keep refactoring small and directly related to the feature.

    line 244
  42. Distinctive:

    Run the same targeted tests again after refactoring.

    line 246
  43. Distinctive:

    After targeted tests pass, broaden verification when feasible.

    line 250
  44. Distinctive:

    Run the narrowest useful command first, then broaden to relevant checks:

    line 252
  45. Distinctive:

    If tests are too expensive to run, run the most targeted feasible command and state what was not run.

    line 263
  46. Distinctive:

    If unrelated tests fail, distinguish pre-existing failures from failures caused by the feature change.

    line 265
  47. Distinctive:

    If no test harness exists, create the smallest practical test harness only if it is consistent with the repository.

    line 269
  48. Distinctive:

    If the feature already exists, do not duplicate it.

    line 270
  49. Distinctive:

    If implementation requires an unspecified product decision, infer from existing patterns when safe.

    line 271
  50. Distinctive:

    If a security, privacy, data-loss, billing, or permission implication is unclear, stop and ask for clarification.

    line 272
  51. Distinctive:

    If a migration is needed, follow existing migration patterns and include rollback or compatibility considerations when the repository has …

    line 273
  52. Distinctive:

    If generated files are normally checked in, update them only through the standard generation command.

    line 274
  53. Distinctive:

    If generated, vendor, lock, or build output changes appear unexpectedly, investigate before keeping them.

    line 275
  54. Distinctive:

    Do not claim tests passed unless they were actually run.

    line 291
  55. Distinctive:

    Keep implementation scope narrow.

    line 301
  56. Distinctive:

    Leave validation evidence that another engineer can inspect.

    line 302

“Common” is measured: kept by at least 6 in 10 of the 17 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

Feature Dev

Purpose

Implement new product or code behavior with strict test-driven development.

Use Red → Green → Refactor as the central loop:

  1. Convert the requested feature into testable behavior.
  2. Write or update tests before implementing production code.
  3. Run the tests and confirm they fail for the expected reason.
  4. Implement the smallest production change required to pass.
  5. Run the tests again and confirm they pass.
  6. Refactor only after the tests are green.
  7. Run related verification commands.
  8. Report what changed and how it was validated.

Skill routing

Use this skill when the request is primarily about adding new behavior.

Matching requests include:

  • "Add support for GitHub login."
  • "Implement CSV export."
  • "Create a settings page."
  • "Add a command-line flag."
  • "Expose this field in the API response."
  • "Support dark mode for this component."
  • "Build a retry mechanism for failed jobs."

Do not use this skill when the request is primarily:

  • Bug fixing. Use a bugfix workflow instead.
  • Behavior-preserving code cleanup. Use a refactoring workflow instead.
  • Investigation only.
  • Documentation only.
  • Test-only cleanup.
  • Dependency upgrade only, unless the upgrade is necessary for the feature.

If a task mixes feature development with bug fixing or refactoring:

  1. Keep the feature implementation focused.
  2. Avoid unrelated cleanup.
  3. Use a bugfix workflow first if existing broken behavior blocks the feature.
  4. Use a separate refactoring workflow after the feature works if structural cleanup is still needed.

Non-goals

Do not:

  • Perform broad unrelated refactoring.
  • Fix unrelated bugs.
  • Rewrite architecture unless required by the feature.
  • Add product behavior that was not requested.
  • Skip tests when a test harness exists.
  • Treat unexecuted tests as proof of correctness.
  • Claim validation that was not performed.
  • Change public behavior unrelated to the requested feature.
  • Modify generated, vendor, lock, or build output files unless necessary.

Context discovery

Before changing code, inspect the repository enough to follow its conventions.

Check for project instructions when present:

  • AGENTS.md
  • CLAUDE.md
  • .cursor/rules
  • README.md
  • CONTRIBUTING.md

Check package and build files when present:

  • package.json
  • pyproject.toml
  • Cargo.toml
  • go.mod
  • pom.xml
  • build.gradle
  • Makefile
  • justfile
  • Taskfile.yml

Check test and CI configuration when present:

  • jest.config.*
  • vitest.config.*
  • pytest.ini
  • tox.ini
  • playwright.config.*
  • cypress.config.*
  • rspec
  • phpunit.xml
  • .github/workflows

Inspect:

  • Existing test directories and naming conventions.
  • Similar features and their tests.
  • Test helpers, factories, fixtures, mocks, stubs, snapshots, and integration utilities.
  • Application layers likely affected: UI, API, service, domain, persistence, config, auth, permissions, logging, metrics, and docs.
  • Existing commands for targeted tests, broader suites, typecheck, lint, build, and formatting.

Prefer existing project conventions over inventing new patterns.

Keep the change understandable

Before implementation, find the existing owner and canonical path for the behavior. Reuse its vocabulary, tests, and extension points where they fit. Do not duplicate an existing rule or source of truth.

Treat every new concept—such as an abstraction, dependency, service, configuration source, or infrastructure component—as something future maintainers must understand. Add it only when the requested behavior or concrete repository evidence justifies the extra concept. Do not unify distinct domain concepts merely because their code looks similar.

After the targeted tests pass, inspect the diff for duplicate paths, unnecessary scaffolding, or obsolete code introduced by the feature. Passing tests establish behavior coverage; they do not by themselves explain why a new boundary or dependency is needed. Record any material assumption or tradeoff in the final report.

Design checkpoint for cross-cutting features

Use this checkpoint when a feature crosses multiple components, changes an ownership boundary, or introduces a service, dependency, state store, or configuration source. For a small local feature with an established pattern, do not manufacture a design phase.

Before implementation:

  • Trace the closest existing behavior through its entry point, owners, data flow, and tests.
  • Summarize the relevant files and constraints, separating confirmed facts from assumptions.
  • When materially different approaches are viable, compare the smallest fit that reuses the existing system with one alternative. Explain complexity and migration costs; do not produce options for their own sake.
  • If the tradeoff is primarily an architecture decision or requires migration across boundaries, use architecture to examine it rather than compressing it into the feature plan.
  • Ask a focused question only if an unresolved user-owned decision materially affects product behavior, public contracts, security, privacy, data loss, billing, or permissions. Otherwise state a low-risk assumption and continue.
  • For multi-step work, identify the affected files and a sequence of independently verifiable slices. A separate plan artifact is optional unless requested.

Do not add a separate approval gate to a fully specified, low-risk task. Involve the user when their decision changes the design, not between routine implementation stages.

Workflow

1. Feature framing

Translate the user request into concrete behavior before writing tests.

Identify:

  • New behavior.
  • Actor or user.
  • Inputs.
  • Outputs.
  • State changes.
  • Error cases.
  • Edge cases.
  • Permission or authorization implications.
  • Data persistence implications.
  • API contract implications.
  • UI states, if relevant.
  • Backward compatibility concerns.
  • Observability needs such as logs or metrics, if relevant.

Write concise acceptance criteria. Each criterion should be testable.

If a product decision is missing, infer from existing patterns only when the inference is low-risk. Ask for clarification when the decision would materially change public behavior, security, privacy, data loss, billing, or permissions.

2. Test discovery

Find the tests that should describe the new behavior.

Look for:

  • Existing tests near the target code.
  • Similar feature tests.
  • Test helpers, factories, fixtures, mocks, stubs, snapshot patterns, and integration utilities.
  • Existing commands for targeted test runs.
  • The layer the project normally tests for this behavior: unit, integration, component, end-to-end, contract, or snapshot.

Prefer the test style already used for the affected layer.

3. Test design

Design tests before writing production code.

Cover the behavior that matters to users or external callers. Include, as appropriate:

  • Happy path.
  • Important edge cases.
  • Validation errors.
  • Permission or authorization failures.
  • Empty states.
  • Loading states.
  • Failure states.
  • API request and response shape.
  • Persistence side effects.
  • Event emission.
  • Logs or metrics, only if the project already tests those.
  • Backward compatibility.

Prefer behavior-oriented tests over implementation-detail tests. A good test should fail when the requested behavior is absent and continue passing through reasonable internal refactors.

4. Red phase

Write or update tests first.

Then run the narrowest useful test command and confirm:

  • The test fails.
  • The failure is for the expected reason.
  • The failure proves the requested behavior is missing or incomplete.

If the test passes before implementation, revise the test or reassess whether the feature already exists. Do not duplicate an existing feature.

If the test fails for an unrelated reason, fix the test setup if the fix is local and clearly required. Otherwise, report the blocker and separate it from the feature work.

Record:

  • Command used.
  • Failure summary.
  • Why the failure is meaningful.

5. Green phase

Implement the smallest production change required to pass the failing test.

Follow these rules:

  • Follow existing project conventions.
  • Reuse existing abstractions where appropriate.
  • Keep changes focused on the requested behavior.
  • Avoid broad refactoring.
  • Avoid changing unrelated public behavior.
  • Add configuration, migration, documentation, or examples only when directly required by the feature.
  • Modify generated files only through the project's standard generation command.
  • Update lock files only when dependency changes are necessary for the feature.

Run the targeted test again. Confirm it passes.

6. Refactor phase

Refactor only after the targeted tests are green.

Allowed refactoring:

  • Remove duplication introduced by the implementation.
  • Improve names or extraction when it directly improves clarity.
  • Align the new code with established local patterns.

Keep refactoring small and directly related to the feature. If cleanup becomes broad, stop and recommend a separate refactoring task.

Run the same targeted tests again after refactoring.

7. Broader verification

After targeted tests pass, broaden verification when feasible.

Run the narrowest useful command first, then broaden to relevant checks:

  • Related test suite.
  • Typecheck.
  • Lint.
  • Build.
  • Formatting check.
  • API contract tests.
  • UI, component, or end-to-end tests when relevant.
  • Manual verification commands when no automated coverage exists.

If tests are too expensive to run, run the most targeted feasible command and state what was not run.

If unrelated tests fail, distinguish pre-existing failures from failures caused by the feature change.

Decision rules

  • If no test harness exists, create the smallest practical test harness only if it is consistent with the repository. Otherwise perform the closest available verification and report the limitation.
  • If the feature already exists, do not duplicate it. Add tests or documentation only if useful, and report that the behavior already existed.
  • If implementation requires an unspecified product decision, infer from existing patterns when safe. Otherwise ask for clarification.
  • If a security, privacy, data-loss, billing, or permission implication is unclear, stop and ask for clarification.
  • If a migration is needed, follow existing migration patterns and include rollback or compatibility considerations when the repository has such conventions.
  • If generated files are normally checked in, update them only through the standard generation command.
  • If generated, vendor, lock, or build output changes appear unexpectedly, investigate before keeping them.

Final report

Report only validation that actually happened.

Include:

  • Summary of new behavior.
  • Files changed.
  • Tests added or updated.
  • Red phase result: command and expected failure summary.
  • Green phase result: command and passing result.
  • Additional verification commands and outcomes.
  • Limitations, risks, skipped checks, or follow-ups.

Do not claim tests passed unless they were actually run.

Quality criteria

The completed feature should:

  • Satisfy the stated acceptance criteria.
  • Be covered by tests at the appropriate layer when a test harness exists.
  • Preserve unrelated public behavior.
  • Follow local conventions.
  • Keep implementation scope narrow.
  • Leave validation evidence that another engineer can inspect.

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.