agentleFS
XenoneqqXenoneqq/claudified-workflow/skills/agent-worker/SKILL.md

agent-worker

Skill1 starsChanged 50 days agoMITView on GitHub

Work a coding task end to end in a repo — learn the project's own rules first, branch (or an isolated worktree when asked) and ask before touching a non-main branch, build in milestones, run the project's gate after every chunk, prove each finished milestone actually runs, commit in plain language, never push and never merge. Use when the user hands over a task to implement, fix, or refactor in a repo ("work on this", "implement this", "fix this", "build this feature", "take this ticket"), or invokes /agent-worker.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 19 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Never guess at conventions a repo has already written down.

    line 16
  2. Distinctive:

    Read CLAUDE.md / AGENTS.md at the root and in any directory you will touch.

    line 18
  3. Very specific:

    Read whatever those files point at (doc/, docs/, CONTRIBUTING.md, a design doc, a code-style doc).

    line 19
  4. Distinctive:

    Read 2-3 files near the change to match the local idiom.

    line 21
  5. Distinctive:

    If the project has no written rules, follow the surrounding code and say so in the recap.

    line 23
  6. Distinctive:

    Default is a branch in the current checkout: Do not create a worktree on your own initiative.

    line 27
  7. Distinctive:

    Use an isolated git worktree when the user asks for one ("in a worktree", "isolated", "don't touch my checkout"), or when several agents …

    line 36
  8. Very specific:

    Prefer the harness's own worktree tool when the session has it (EnterWorktree / ExitWorktree).

    line 38
  9. Distinctive:

    Not every task deserves a plan and a string of commits.

    line 45
  10. Distinctive:

    Can't tell?: If you cannot name the milestones up front, it is not big.

    line 53
  11. Distinctive:

    Do not over-remove: Never delete comments or code the change does not require.

    line 59
  12. Distinctive:

    No comments unless they earn it — a workaround, an ordering constraint, a non-obvious why.

    line 60
  13. Distinctive:

    Do not pre-abstract. A helper written once stays where it is.

    line 61
  14. Distinctive:

    Run the project's own checks (from step 0) after each meaningful chunk of work.

    line 65
  15. Distinctive:

    If the project has no checks at all, say so once and rely harder on step 5.

    line 69
  16. Distinctive:

    If the project already has a run/test skill or a documented run command, use it rather than inventing your own launch procedure.

    line 86
  17. Very specific:

    If the repo documents a commit convention, follow it and skip the style rules below.

    line 94
  18. Distinctive:

    Commit when a meaningful chunk is finished.

    line 96
  19. Distinctive:

    Never commit a red gate.

    line 99
  20. Distinctive:

    Default style when the repo says nothing:

    line 101
  21. Distinctive:

    Never push. Never merge. Never open a PR unless the user explicitly asks in that message.

    line 116
  22. Distinctive:

    Ask only when two readings lead to materially different work, or when proceeding would be hard to reverse.

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

agent-worker

How to carry out work in a repo. This is the process, not the code style.

The repo outranks this file. Wherever a project documents its own branching, worktree, commit, or review workflow — in CLAUDE.md, AGENTS.md, CONTRIBUTING.md, a PR template, a doc/ page — follow that instead of the corresponding section here. Use these rules as the default only where the project is silent.

Two things this skill never does: push and merge. Not once, not "just this branch", not when the user seems to want speed. Finish the work, leave the branch, say what is on it.

0. Learn the project before writing anything

Never guess at conventions a repo has already written down. Before the first edit:

  • Read CLAUDE.md / AGENTS.md at the root and in any directory you will touch.
  • Read whatever those files point at (doc/, docs/, CONTRIBUTING.md, a design doc, a code-style doc). If a project doc says "read this before touching UI", read it.
  • Find the gate commands: package.json scripts, Makefile, justfile, CI workflow. Typecheck, lint, format check, tests — whichever exist.
  • Read 2-3 files near the change to match the local idiom.

If the project has no written rules, follow the surrounding code and say so in the recap.

1. Branch — or a worktree when asked

Default is a branch in the current checkout. Do not create a worktree on your own initiative; it moves the user's work somewhere they did not ask for.

  • On main / master: create a branch, then work.
  • Not on main: stop and ask — continue on this branch, or return to main and branch off it? Do not decide this alone; the user may be mid-something.
  • Name the branch for the whole task, not the slice in progress. user-history, not fix-history-header.
  • Dirty working tree at start: surface it and ask before touching those files.

Worktree mode

Use an isolated git worktree when the user asks for one ("in a worktree", "isolated", "don't touch my checkout"), or when several agents work in parallel and would otherwise fight over one checkout. One worktree per task, one branch per worktree.

  • Prefer the harness's own worktree tool when the session has it (EnterWorktree / ExitWorktree); otherwise git worktree add <path> -b <branch> outside the repo.
  • A fresh worktree is not a working project. Carry over what git ignores before the gate can pass: dependency install, .env and other ignored local config, native build artifacts, generated files. Run the project's own setup step if it has one.
  • The gate (step 4) and the proof (step 5) run inside the worktree, not the original checkout.
  • Report the worktree path alongside the branch name at the end, and say whether it is still there. Remove it only when the user asks — never delete a worktree holding uncommitted work.

2. Size the task, then plan

Not every task deserves a plan and a string of commits. Decide which kind this is before starting.

Small — one coherent change you can see the whole of up front: a handful of files, no new subsystem, finished in a single pass. Skip the milestone list. Still run the gate (step 4) and still prove it works (step 5), then stop before committing and ask. The user may be batching it with their own edits, may want it worded differently, or may want it folded into something else. A run of tiny commits nobody asked for is work to unpick.

Big — several independently verifiable pieces, or more than you can hold in one pass. Plan it, and commit as you go without asking, because finishing the whole thing is the goal:

Split it into milestones that are each independently verifiable — a user-visible behaviour, an endpoint that answers, a screen that renders. Not "add types", "add file". State the list before starting if it is more than two. Keep it short. A milestone that cannot be tested is not a milestone, it is a step inside one.

Can't tell? If you cannot name the milestones up front, it is not big. If it sits on the line, treat it as small and ask — asking once is cheaper than commits to undo.

3. Implement — smallest diff that fully solves it

  • KISS. Fewest changes that completely do the job.
  • Reuse before you write. Extend an existing component/helper with a parameter instead of forking a near-copy.
  • Do not over-remove. Never delete comments or code the change does not require. Out-of-scope deletion is not cleanup.
  • No comments unless they earn it — a workaround, an ordering constraint, a non-obvious why.
  • Do not pre-abstract. A helper written once stays where it is.

4. The gate — after every chunk, not at the end

Run the project's own checks (from step 0) after each meaningful chunk of work.

A red gate is the change, not a follow-up task. Fix it now. Never move to the next milestone with a failing check, and never hand back work you have not gated.

If the project has no checks at all, say so once and rely harder on step 5.

5. Prove each finished milestone actually works

Compiling is not working. Before calling a milestone done, run the real thing:

Project kindProof
Has tests for this areaRun them. Add one if the change is logic and none covers it.
Mobile appLaunch on simulator/emulator, drive the actual flow, screenshot the result.
Web appOpen it in the browser, click the path, read the console for errors.
Server / APIHit the endpoint, show the response.
CLIRun the command, show the output.
Pure logicA test, or a scratch script that prints the before/after.

Report the proof, not a claim: the screenshot, the output, the passing run. If a milestone could not be verified, say that plainly and say why — never let "should work" pass as done.

If the project already has a run/test skill or a documented run command, use it rather than inventing your own launch procedure.

6. Commit

On a small task (step 2), ask before committing. Show what changed and let the user say whether to commit it, fold it into something else, or leave it in the tree. On a big task, commit as you go without asking.

Under an orchestrator (manage-work or similar), never ask the user — the manager scoped the task and owns that call. Follow the commit rules in its brief and report back to it.

If the repo documents a commit convention, follow it and skip the style rules below. Check CONTRIBUTING.md, a commit template, and git log for the real pattern before assuming.

  • Commit when a meaningful chunk is finished. Not per file, not per step, not at the very end of everything.
  • Subject in plain words, saying what changed for the user. No tech talk, no file names, no mechanics.
  • Several things in one chunk: very short plain-language points in the body.
  • Never commit a red gate.

Default style when the repo says nothing:

changed how history is displayed

- grouped sessions by week
- moved the empty state above the list

Not feat(history): refactor HistoryList grouping logic — unless git log shows the repo actually uses conventional commits.

Sign off only when the repo or the user wants it. Follow the repo's rule if it has one (a DCO, CONTRIBUTING.md, a commit template). Otherwise follow the user's own habit: check whether their recent commits carry one with git log --author="$(git config user.email)" -10 --format='%(trailers:key=Signed-off-by,valueonly)'. If neither settles it, ask the user once. Under an orchestrator, sign off only if the brief says so. To sign off, use git commit -s so it comes from the git account configured for this repo, the one the user linked. Never type a sign-off by hand and never use an address that is not theirs. Keep any attribution trailer the harness requires.

7. Stop and report

Never push. Never merge. Never open a PR unless the user explicitly asks in that message.

Close with:

  • The branch name and what is on it.
  • Milestones done, each with how it was verified.
  • Anything left out or unverified, and why.

When to ask instead of proceed

Ask only when two readings lead to materially different work, or when proceeding would be hard to reverse. Routine judgement calls are yours to make — make them, state the assumption, keep going. Anything unblocked gets finished regardless of the open question.

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.