dbv-specs-ops: Command for Claude Code

.claude/commands/code-simplify.md

code-simplify is a command for Claude Code from davidbuenov/dbv-specs-ops. It costs 23 tokens per session (1,086 once invoked), scanned A, a copy of code-simplify, MIT.

A code-maintenance command for the Simplify stage of an SDD workflow. It reviews existing changes for bugs, security, and compliance issues, then refactors the code without adding new behavior.

In plain words
What is it for?
Use it to review and simplify completed code, resolve critical findings, and document issues that still need attention.
Why use it?
It helps find serious problems and reduce unnecessary complexity after testing. Important findings are recorded for later tracking.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is davidbuenov/dbv-specs-ops's own configuration. It tells Claude Code how to work on dbv-specs-ops itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dbv-specs-ops configures →

Reuse

Borrowing it

Nothing to install: this file belongs to davidbuenov/dbv-specs-ops. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/davidbuenov/dbv-specs-ops/master/.claude/commands/code-simplify.md
Clone the repo
git clone --depth 1 https://github.com/davidbuenov/dbv-specs-ops

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-simplify

README.md
[![agentmods](https://agentmods.dev/badge/commands/davidbuenov/dbv-specs-ops/code-simplify/github.svg)](https://agentmods.dev/commands/davidbuenov/dbv-specs-ops/code-simplify)
Your own site
<a href="https://agentmods.dev/commands/davidbuenov/dbv-specs-ops/code-simplify"><img src="https://agentmods.dev/badge/commands/davidbuenov/dbv-specs-ops/code-simplify/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-simplify

Your own site · 80×15
<a href="https://agentmods.dev/commands/davidbuenov/dbv-specs-ops/code-simplify"><img src="https://agentmods.dev/badge/commands/davidbuenov/dbv-specs-ops/code-simplify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,086 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod 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.1 $0.00023 $0.01086
Opus 5.5 $0.00009 $0.00434
Sonnet 5.5 $0.00005 $0.00217
Haiku 4.5 $0.00002 $0.00109

Measured 4d ago against content hash 9603ff61d587, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-simplify 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 4d 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.

Origin

This is a copy

91% identical to code-simplify — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/code-simplify.md · 45 lines

What it actually says

Ejecuta ahora la fase Simplify (/code-simplify) del ciclo Spec→Plan→Build→Test→Simplify→Ship definido en dbv-specs-ops/docs/MASTER_PROMPT.md (<workflow>, paso 5). Sigue los tres pases con severidad de dbv-specs-ops/docs/REVIEW.md (Bugs / Seguridad / Cumplimiento), resuelve todo hallazgo Crítico, registra lo Importante en dbv-specs-ops/CHANGELOG.md, y después refactoriza para reducir complejidad sin añadir funcionalidad nueva ("clarity over cleverness"). Si hay Python 3.8+, ejecuta también python dbv-specs-ops/scripts/dbv-lint.py --changed.

🕸️ Grafo de fases — nodo activo: Simplify

Fase 5: revisión en tres pases (docs/REVIEW.md), dbv-lint.py y refactor de claridad.

Al entrar — la transición por la que llegas fija la condición, cómo ejecutar esta fase y qué evitar:

  • desde Test (PROVIDES_INPUT_FOR) — si: Todos los tests y Evals pasan, y ningún requisito con ID de la tarea se queda sin test.
    • Cómo: Haz los tres pases de docs/REVIEW.md (Bugs, Seguridad, Cumplimiento con <coding_standards>) y, si hay Python, ejecuta dbv-lint.py --changed. Después refactoriza para dar claridad sin cambiar el comportamiento.
    • Evita: No añadas funcionalidad nueva. Si un refactor rompe tests y lo reviertes, regístralo en la Rejection Memory.
  • desde Ship (TRIGGERS) — si: El gate de /ship encuentra un hallazgo Crítico sin resolver o la documentación contradice el código.
    • Cómo: Vuelve a la revisión por pases solo para resolver lo que bloquea la entrega.
    • Evita: No publiques una versión con un Crítico abierto.

Salidas (salto 1) — a dónde puedes ir y con qué condición:

  • Simplify → Build (TRIGGERS) — si: La revisión deja un hallazgo Crítico que exige cambiar el comportamiento del código, o un refactor rompe los tests.
    • Cómo: Vuelve a Build solo para ese hallazgo y repasa Test antes de regresar a Simplify.
    • Evita: No mezcles la corrección con funcionalidad nueva. No ocultes el hallazgo rebajando su severidad.
  • Simplify → Ship (CONVERGES_TO) — si: Cero hallazgos Crítico, dbv-lint.py sin errores (si aplica) y tests en verde tras el refactor.
    • Cómo: Imprime <memory_update_proposal>. Actualiza README.md de la raíz, sincroniza DESIGN.md derivado si existe, completa walkthrough.md, pregunta el tipo de versión, publica CHANGELOG.md y propone commit + tag.
    • Evita: No ejecutes git push (solo sugiérelo). No cierres sin <memory_update_proposal>. No generes start/stop en apps de escritorio, librerías o CLIs.

Horizonte (salto 2) — lo que vendrá después y revisará tu trabajo:

  • Build → Test (LEADS_TO) — si: La porción está implementada, compila o se ejecuta sin errores y está anotada en CHANGELOG.md.
    • Cómo: Escribe y ejecuta tests deterministas que citen @spec REQ-NN para cada requisito tocado. Con componentes de IA, añade Evals; con un Agent Plugin, valida plugin.json y mcp.json.
    • Evita: No marques una tarea como hecha sin un test en verde. Si un enfoque falla y lo reviertes, regístralo en la Rejection Memory antes de probar otro.
  • Ship ↩ Simplify (TRIGGERS) — si: El gate de /ship encuentra un hallazgo Crítico sin resolver o la documentación contradice el código.
  • Ship → End (LEADS_TO) — si: Versión elegida por el usuario, CHANGELOG.md publicado, commit y tag propuestos.
    • Cómo: Guarda el Snapshot de Contexto en task.md y resume al usuario lo entregado.
    • Evita: No dejes ficheros temporales ni cambios sin reflejar en task.md.

Rutas relativas a dbv-specs-ops/. Lee la 🚫 Rejection Memory de memory.md antes de proponer un enfoque: lo que ya se descartó no se vuelve a proponer sin explicar qué ha cambiado.

$ARGUMENTS

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. 4d ago Changed · +33 lines 9603ff61d587
  2. 8d ago Changed · +1 lines b21d19114971
  3. 1mo ago First seen · 11 lines · 23 tokens per session scan A 494af31e5c3b

Subscribe to this mod's changes

code-simplify is a command published in the GitHub repository davidbuenov/dbv-specs-ops (29 stars, last pushed 4d ago), licensed MIT. It adds 23 tokens to every session and 1,086 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to code-simplify, differing in 0 lines, and is treated as a copy.

Related

Other commands, from other repositories