Borrowing it
Nothing to install: this file belongs to dinhnguyenngoc/spec-driven-claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dinhnguyenngoc/spec-driven-claude-code/main/.claude/commands/arch.mdgit clone --depth 1 https://github.com/dinhnguyenngoc/spec-driven-claude-codeWrote 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.
[](https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/arch)<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/arch"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/arch/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.
<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/arch"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00014 | $0.06299 |
| Opus 5.5 | $0.00006 | $0.02520 |
| Sonnet 5.5 | $0.00003 | $0.01260 |
| Haiku 4.5 | $0.00001 | $0.00630 |
Grade C, and why
arch scanned grade C with 1 finding 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 1mo 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
**Service id:** <service-id> <!-- canonical key; matches Project Profile → Service id + the system service-catalog --> How it starts
The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/arch — Architecture Design
"Good architecture enables agility."
Purpose
Transform requirements into technical architecture before planning implementation tasks. This ensures alignment on system design, technology choices, and integration patterns.
Workspace Mode: if the session root declares
Mode: workspace→ resolve the target repo perCLAUDE.md§Workspace Mode before anything else; every path, probe, and gate below is relative to the target repo, and the workspace disk-check applies at the gate.
Prerequisites
- A specification exists (
specs/SPEC.mdfrom/spec) - The spec passed Gate 1 — header
Statusis Approved, not Draft (stop and finish/specsign-off otherwise) - The spec's
Coverageisfull— a SPEC markedCoverage: partial (scoped)(produced by/spec --scope) → STOP: finish the baseline first (further--scopeslices, or a full REVERSE). Rationale:/arch's completeness gates read the SPEC — NFR completeness cross-checksspecs/SPEC.md §NFR, and the Flow-Disposition candidate list readsspecs/wireframes/flows/— so against a partial spec they would pass while covering only part of the system. That is worse than not running at all: it yields a signed-off architecture carrying false assurance. (A SPEC with noCoveragefield predates the field → treated asfull— backward-compatible, same convention asOutput Language.) - Understanding of non-functional requirements (scale, performance, security)
References to Rules
The following rules provide detailed standards. The Purpose column is self-sufficient for routine design decisions — do NOT open these files wholesale at the start. Open a specific rule only when a concrete decision genuinely needs its threshold/detail (e.g., read system-design.md only when a scaling/caching choice is actually on the table). This avoids reading several large rule files on every /arch run.
| Rule | Purpose |
|---|---|
| principles-and-practices.md | Master reference — architecture default (§3 Modular Monolith + Clean Architecture; ADR required for any deviation), NFR-dependent infrastructure (§5 opt-in triggers) |
| tech-stack.md | Approved technologies & decision criteria |
| system-design.md | CAP theorem, scaling, caching patterns |
| project-structure.md | Clean Architecture layers |
| api-conventions.md | REST standards, versioning |
| ascii-diagram-guide.md | Diagram format — Use ASCII art for all diagrams |
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.
- 1mo ago First seen · 326 lines · 14 tokens per session scan C 8bdd41a99e35
arch is a command published in the GitHub repository dinhnguyenngoc/spec-driven-claude-code (21 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 6,299 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
generate-feature
Generate a complete feature with Clean Architecture structure.
api-endpoint
Création Endpoint API Platform.
generate-crud
Tu es un développeur Symfony senior. Tu dois générer un CRUD complet respectant la Clean Architecture, incluant Entity, Repository, Controller, Templates, Form, et Tests.
generate-controller
Generate a Laravel controller following best practices.
generate-endpoint
Génération Endpoint FastAPI.
generate-command
Génération Commande Symfony.