feature

A command that creates a feature record in docs/features/ before implementation, using the project’s product and design documents.

In plain words
What is it for?
Use it to check whether a feature is justified, link it to product requirements, gather architecture and data context, and clarify its name, user outcome, and limits.
Why use it?
It makes the planned work an explicit agreement and prevents feature records being used for small fixes, copy changes, or work outside the approved product scope.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/polmarza/project-template/feature
Clone the repo
git clone --depth 1 https://github.com/polmarza/project-template

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00504
Opus 5 $0.00000 $0.00252
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00050

Measured 2d ago against content hash 2920945d13c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

feature scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/feature.md · 46 lines

What it actually says

Crea la ficha de una feature nueva en docs/features/, siguiendo el formato de docs/features/README.md.

Esto se hace antes de escribir código, no después. La ficha es el acuerdo previo; si ya hay código escrito, lo que toca es una entrada de changelog, no una ficha retroactiva.

1. Comprueba que hace falta

Una ficha se justifica si el trabajo cierra requisitos del PRD, toca varias capas o va a durar más de una sesión. Para un arreglo puntual o un cambio de copy, dilo y no la crees: basta el changelog al terminar.

2. Reúne el contexto

Lee docs/prd.md para localizar qué requisitos (M-01, S-02…) cierra esta feature. Si el trabajo no se corresponde con ningún requisito del PRD, hay dos posibilidades y conviene preguntarlas antes de seguir:

  • Es alcance nuevo → hay que añadirlo al PRD primero, con su ID y su criterio de aceptación.
  • Está fuera de alcance → va a mejoras/, no a docs/features/.

Lee también docs/architecture.md y docs/data-model.md si la feature toca estructura o datos.

3. Pregunta lo que no puedas deducir

  • Nombre de la feature (el archivo será kebab-case.md)
  • Qué debe poder hacer el usuario cuando esto exista
  • Qué queda explícitamente fuera

4. Escribe la ficha

Usa la plantilla de docs/features/README.md. Estado inicial: Acordada.

La tabla de cobertura se rellena entera, sin huecos. Por cada requisito, la tercera columna lleva o la ruta del test que lo validará, o no verificable por interfaz: <razón concreta> seguido de cómo se comprobará entonces. Si no sabes cuál de las dos poner, pregunta — no lo dejes en blanco ni escribas un test que sabes que no vas a escribir.

5. Confirma antes de construir

Enseña la ficha al usuario y pregunta si el acuerdo es correcto. Con su visto bueno, cambia el estado a En construcción y empieza.

Mantén el estado al día durante el trabajo, no al final: es lo que permite retomar la feature en otra sesión sin reconstruir el contexto.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 46 lines · 0 tokens per session scan A 2920945d13c7

Subscribe to this mod's changes

feature is a command published in the GitHub repository polmarza/project-template (79 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 504 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.