Runs the full AI-assisted workflow for a non-trivial feature or change: plan, plan critique, user approval, implementation with tagged tests, code review, exploratory QA, and PR. Use when the user asks to build or start a feature, or to implement a change that needs a plan, review, and PR. Every planning run saves the approved plan to a file; with `--plan-only` it stops there, and `--from-plan <slug>` runs such a saved plan without re-planning. `--hands-off` runs from approval to a PR, listin...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Feature?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/cunhaax-feature)
---
name: feature
description: >
Runs the full AI-assisted workflow for a non-trivial feature or change:
plan, plan critique, user approval, implementation with tagged tests, code
review, exploratory QA, and PR. Use when the user asks to build or start a
feature, or to implement a change that needs a plan, review, and PR. Every
planning run saves the approved plan to a file; with `--plan-only` it stops
there, and `--from-plan <slug>` runs such a saved plan without re-planning.
`--hands-off` runs from approval to a PR, listing each decision it took.
license: MIT
metadata:
author: André Cunha
---
# /feature
Pipeline: plan → critique → implement → test → code-review → QA → PR.
Run steps in order, skipping only where a step or the mode says so.
`AGENTS.md` is the source for commands, default branch, sensitive areas, and
task tracking.
`planner`, `plan-critic`, `code-critic` and `adversarial-qa` below are
sub-agents: "call" means spawn the sub-agent of that name, never load the
same-named skill into your own context (you would be reviewing your own work).
The same holds for `build.md` step 4's second reviewer, a `general-purpose`
sub-agent that runs the bundled `/code-review` skill.
## Input
- User prompt (verbatim, including any doc/link references)
- Session branch: a feature branch, not the default branch (any branch with
`--plan-only`)
## Phases
The steps live in files in `${CLAUDE_SKILL_DIR}/`, the directory of this
skill. Read each with `Read` when its phase starts:
- `plan.md`: step 1 (1a–1d), from prompt to saved plan
- `build.md`: steps 2–8, from implementation to a reviewed, QA'd HEAD. Its
input is the approved plan text from step 1, or a saved plan it loads
itself (`--from-plan`)
- `pr.md`: step 9, opening the PR and keeping it up to date once open
The mode is set by the first token of the arguments; except the exact token
`--hands-off` where the table places it, a flag anywhere else is prompt
content, passed on verbatim:
| First token | Runs |
|---|---|
| `--plan-only` | `plan.md`, then STOP; `--hands-off` next → STOP: nothing would execute |
| `--from-plan` | `build.md` (loading the saved plan) → `pr.md`; **Hands-off** if `--hands-off` directly follows the slug |
| `--hands-off` | the rest runs as *anything else*, under **Hands-off**; nothing after it → STOP and ask; `--plan-only` next → STOP: they can't combine; `--from-plan` next → STOP, give the form `--from-plan <slug> --hands-off` |
| anything else | `plan.md` → `build.md` → `pr.md` |
Only this table decides what runs next: each phase file ends at its last
step, then continue with the next file in the table. For every phase file:
- An unexpanded `${CLAUDE_SKILL_DIR}`, or a phase file you can't read → STOP
per `AGENTS.md` Rule 2; never work from memory of it
- Re-read the current phase file whenever it is no longer fully in your
context (e.g. after compaction), and read a file before following a
pointer into it
- Step numbers are the same across files: steps 1a–1d are in `plan.md`,
steps 2–8 in `build.md`, step 9 in `pr.md`
`--plan-only` STOP: skip steps 2–9, report the plan file's absolute path and
that `/feature --from-plan <slug>` on a feature branch runs it. No branch,
commit, push, or PR.
## Shared definitions
Used by more than one phase file.
**Plan file location**: `.ai-workflow/plans/<slug>.md` under the **main
worktree** (`<main>`): the parent of the `.git` dir printed by `git rev-parse
--path-format=absolute --git-common-dir`. That parent still contains a `.git`
segment (e.g. a submodule), or the dir's name is not `.git` (a bare repo) →
ask the user where to write (for `--from-plan`, where to read).
- From a linked worktree, touch `<main>/.ai-workflow/` only with Read, Write
and Edit (`Write` creates missing folders), never with Bash: the sandbox
blocks Bash there even with the grant below. A file to remove there (e.g.
*Rewrite*'s old file) → leave it and tell the user its path
- Each `.ai-workflow/` (here, and the **Local plan copy**'s in the worktree)
ignores itself; whoever creates it ensures its `.gitignore`: Read it; does
not exist → write `*`; exists without a `*` line → STOP per Rule 2
(another tool's folder)
- From a linked worktree, a permission blocks a Read, Write or Edit of this
file or its folder (`permissions.blockReadsOutsideWorkingDirectories`,
`permissions.blockWritesOutsideWorkingDirectories`, or a denied prompt) →
the STOP names the setting and the fix (at 1a's `depends-on` read, a
warning instead), paths absolute: add
`{"permissions": {"additionalDirectories": ["<main>/.ai-workflow"]}}` to
`<main>/.claude/settings.local.json` (merged into any existing array; this
repo only; applies without a restart), and if `<main>/.ai-workflow/` does
not exist yet, create it first with a `.gitignore` containing `*`; for one
session only, `/add-dir <main>/.ai-workflow`. Never suggest user-level
settings
- The file does not exist on a read → also say that plans saved before
1.16.0 stay in `<main>/.workflow-plans/` until moved, and that
`/init-workflow` prints the commands
**Local plan copy**: `.ai-workflow/plans/<slug>.md` under `git rev-parse
--path-format=absolute --show-toplevel`; the only plan path given to
`review-guide`, whose script runs in Bash and so can't read a plan file
outside the worktree. Same path as the plan file → it is the plan file;
write nothing. Otherwise, after this run writes the plan file (1d, `plan.md`
→ *Rewrite*) or loads it (`--from-plan`), write the same content there:
ensure the worktree's own `.ai-workflow/.gitignore` (as above), then Read
the copy path; content → overwrite it with `Write` (the Read only lets
`Write` replace it, never a source); does not exist → create it. Any other
failure → STOP per Rule 2. Never asked about, read as a plan source, marked
consumed or ownership-checked.
**Ownership check**, before this run rewrites, removes or marks a plan file:
the file still has the `slug`, `base-commit` and exact content this run last
wrote to it, or read from it for `--from-plan` (when marking consumed, a
`consumed:` line is not part of the comparison). Content no longer available,
e.g. after context compaction → can't verify → ask.
**Hands-off**: from approval (`--from-plan`: once loading passes) to the open
PR, on any Tier, the user is not waiting:
- Decide whatever a step would ask them: `NEEDS_DECISION`s, Open Questions,
every QA finding, minor and material deviations, and `review-guide` step 2's
extra reviews (run them once per run, even past step 4's extra-run cap)
- Take the most conservative, reversible option, citing the plan or an
`AGENTS.md` rule where one applies. Record it as `D<n>`: step, item, what it
was about, the option chosen (a deferral: its task id), the one rejected and
why, basis, any earlier choice if re-decided, and `deviation` if material;
no absolute local paths
- These still STOP rather than being decided: a FAIL you dispute or one
surviving two fix rounds (`build.md` step 6); a `/code-review` finding you
would not fix; a deviation that changes, weakens or removes a plan-derived
test, AC or EDGE; a plan file collision or location question at 1d; any
Rule 2 failure (an unavailable second reviewer, a walkthrough you can't run,
QA Blockers); the `D<n>` list no longer fully in context before the PR opens.
The user's answer at a STOP is not a `D<n>`; then continue hands-off
## Output
- Default and `--from-plan`: `pr.md`'s *Output*
- `--plan-only`: `plan.md`'s *Output*, reported as in the `--plan-only` STOP
- Every mode: a summary of skipped steps, plan deviations, `context7` lookup
failures, and why
## Rules
- Never skip `planner` for a new feature (`--from-plan` runs a plan that
already went through it)
- Never skip `plan-critic` unless all step 1b criteria hold AND the user opted
out (`--from-plan` re-runs it only when the base moved)
- Never leave a source the prompt references unread: read it yourself and
pass it to the `planner` verbatim; the planner never fetches
- Never enter plan mode from a sub-agent
- Never present work to the user before `code-critic` has reviewed it
- Relay ALL `NEEDS_DECISION` items and Open Questions to the user; never
decide them, except under **Hands-off**
- Sub-agents never modify the project's code; only the main agent implements
changes (`adversarial-qa` also writes `.qa-evidence/`)
<!-- SKILL NAMING NOTE (Claude Code): the skill is named `code-critic` so it
does NOT shadow Claude Code's bundled `code-review` skill (project
skills shadow bundled ones). `/code-review ultra` stays reachable as an
optional, user-launched deep pass. Do not rename back. -->