agentleFS
cluaizcluaiz/cluaiz-tools/skills/build-feature/SKILL.md

build-feature

Skill3 starsChanged 6 days agoApache-2.0View on GitHub

A way of working for any code change bigger than a line or two, in any language: understand the task and the project, plan small steps, write a failing test, find the root cause of bugs before fixing, make the change, and verify before saying it is done. Use when the user asks to add a feature, fix a bug, refactor, or change behaviour in code.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use fix-bug, write-tests and 1 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.
  • JetBrainsSkill

    fix-bug

    End-to-end bug fix workflow for the Exposed project. Accepts a GitHub issue (#NUMBER), YouTrack issue (EXPOSED-NUMBER), or YouTrack URL (https://youtrack.jetbrains.com/issue/EXPOSED-NUMBER). Fetches the issue, creates a failing reproducer test, commits on a new branch, implements the fix, validates, and opens a PR. Use this skill whenever the user wants to fix a bug from an issue tracker, mentions a EXPOSED issue number, or references a GitHub issue to fix.

    Also in 5 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 13 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the code you will change and the code that calls it.

    line 13
  2. Very specific:

    Read what the project decided: AGENTS.md, CONTRIBUTING.md, .agents/rules/, memory, and a PRD, spec or plan for this work.

    line 14
  3. Very specific:

    Run one command per call. Windows PowerShell has no &&.

    line 21
  4. Distinctive:

    Keep the change as small as the task allows.

    line 26
  5. Distinctive:

    Do not stack guesses. A fix without a known cause usually moves the bug somewhere else.

    line 36
  6. Distinctive:

    For a bug: write a test that fails because of the bug, and watch it fail.

    line 40
  7. Distinctive:

    For a feature: write tests for the main behaviour and for an edge case such as empty input or a failure.

    line 41
  8. Distinctive:

    Follow the project's test style, framework and location.

    line 42
  9. Distinctive:

    If the project has no tests, write the smallest check you can run, and say so.

    line 43
  10. Distinctive:

    After three failed attempts, stop.

    line 48
  11. Distinctive:

    When the tests pass:

    line 49
  12. Distinctive:

    Run the whole suite, plus the linter or type check if the project has one.

    line 50
  13. Distinctive:

    Run the program once the way a user would.

    line 51
  14. Distinctive:

    Read your own git diff and remove debug prints, leftovers and unrelated changes.

    line 52
  15. Distinctive:

    Do not say it works unless a test or a run showed it.

    line 60
  16. Very specific:

    Commit only when the user asks, using the git-assistant skill.

    line 62

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

Build Feature

Links such as references/... are files of this skill. Read them with read_tool_file. In the terminal agent, read_item with build-feature gives the folder; then call read_file on the folder plus the link.

Understand

  • Restate the goal in one or two sentences: the input, what happens, and the output. Also say what the change will not do. If something that changes the result is unclear, ask one short question. Otherwise go on and say what you assumed.
  • Read the code you will change and the code that calls it.
  • Read what the project decided: AGENTS.md, CONTRIBUTING.md, .agents/rules/, memory, and a PRD, spec or plan for this work. The workflow-management skill explains the .agents/ folder and how to size a task.
  • Find how the project builds and tests. The CI workflow (.github/workflows/*.yml) is the most reliable list. Otherwise look in the project files:
    • package.json scripts, run with the tool of its lockfile;
    • cargo test and cargo clippy, with -p <crate> in a workspace;
    • python -m pytest, because plain pytest may not find the project's modules;
    • go test ./... and go vet ./...;
    • Makefile or justfile targets.
  • Run one command per call. Windows PowerShell has no &&.

Plan

  • Name the files to change, what changes in each, and how you will check it.
  • Keep the change as small as the task allows. Do not rename, reformat or "improve" code the task does not need.
  • Split large work into steps that each build and pass. A good step is about 200 changed lines; the usual order is types, then logic with tests, then the entry point, then an end-to-end test and docs.
  • Edge cases and when to ask: references/working-details.md.

Bugs: find the cause first

  1. Reproduce the bug: run it, or read the error and the stack trace.
  2. Trace it back to where the wrong value first appears, not where it shows up. Check what changed recently (git log -p on the file).
  3. Form one hypothesis and test it, one change at a time.

Do not stack guesses. A fix without a known cause usually moves the bug somewhere else.

Test first

  • For a bug: write a test that fails because of the bug, and watch it fail.
  • For a feature: write tests for the main behaviour and for an edge case such as empty input or a failure.
  • Follow the project's test style, framework and location.
  • If the project has no tests, write the smallest check you can run, and say so.

Build and verify

  • Make the change and run the test after each step.
  • After three failed attempts, stop. Report what you tried and what you think is wrong, with one or two other approaches. Undo only your own edits: references/working-details.md.
  • When the tests pass:
    1. Run the whole suite, plus the linter or type check if the project has one.
    2. Run the program once the way a user would.
    3. Read your own git diff and remove debug prints, leftovers and unrelated changes.
  • For a larger change, review it the way the code-reviewer skill does.

Report

  • Say what changed, file by file.
  • Quote the commands you ran and their results.
  • Say what you did not test.
  • Do not say it works unless a test or a run showed it.

Commit only when the user asks, using the git-assistant skill. If a decision should outlive the conversation, such as a test command or a design choice, propose it as project memory (remember).

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.