ai-spec

ai-spec is a skill for Claude Code from arcasilesgroup/ai-engineering. It costs 117 tokens per session (1,487 once invoked), scanned A, original, Apache-2.0.

A decision record for choosing how to build a change before writing code. It records evidence, options, a recommendation, assumptions, risks and examples.

In plain words
What is it for?
Use it when discussing a new feature, a design change or the best way to handle a problem, then commit the resulting specification to the repository.
Why use it?
It prevents important technical choices from being made informally or without checking alternatives and unanswered risks.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: installed under .agents/ (shared by several agents).

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 skills/arcasilesgroup/ai-engineering/ai-spec
Any agent
npx skills add arcasilesgroup/ai-engineering --skill ai-spec
Clone the repo
git clone --depth 1 https://github.com/arcasilesgroup/ai-engineering

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 ai-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/arcasilesgroup/ai-engineering/ai-spec.svg)](https://agentmods.dev/skills/arcasilesgroup/ai-engineering/ai-spec)
Your own site
<a href="https://agentmods.dev/skills/arcasilesgroup/ai-engineering/ai-spec"><img src="https://agentmods.dev/badge/skills/arcasilesgroup/ai-engineering/ai-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,487 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.1 $0.00117 $0.01487
Opus 5 $0.00059 $0.00744
Sonnet 5 $0.00023 $0.00297
Haiku 4.5 $0.00012 $0.00149

Measured 6d ago against content hash 429dde5b7995, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ai-spec 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 6d 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.

.agents/skills/ai-spec/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Write the spec

What it produces

specs/NNN-slug/spec.md, committed in the user's repository and visible in their diff. It is a decision record, not code, a plan or permission the agent gave itself.

The tier to ask for

Spec writing is mechanical once the research has done the hard thinking; ask the low tier, the model the repository's [models] section configures for it — never a model name coded here, and never a provider the repository did not choose. model_router maps research and spec to the low tier; if the pin leaves it unconfigured, fall back to default_tier. Say which tier you ran on so the command event's tier_model can be read against reality.

Procedure

  1. Validate the intake and reach shared understanding before any discovery (spec 037 / B-037-3, spec 048): read references/intake.md first, then the goal, constraints and acceptance; ask only what the environment cannot answer, keep a live draft with a TODO per gap from the first answer, and do not scaffold until the owner confirms the two-sentence plain-words read-back; under an unattended goal the run records that read-back as unconfirmed and carries on. The input is the contract: a malformed goal produces a malformed spec.

  2. Read CONSTITUTION.md, the related records and repository evidence and current primary sources relevant to the decision before asking anyone. State what was read, what is true now and what remains unknown. Never infer a control from its documentation alone. If CONSTITUTION.md is absent or incomplete, the spec records what is missing rather than assuming it exists — a repo without it is a repo without the framework's identity.

  3. State the problem in words a non-technical reader can follow. Separate fixed constraints, current facts, intended outcomes and the harm of leaving it unchanged.

  4. Present exactly three real options. For each, say what it gives, costs, risks and rules out; do not invent a weak option merely to lose.

  5. Recommend one, explain why the others lose, then challenge the recommendation once with the strongest realistic failure case. Revise it or keep it and say why.

  6. Record assumptions and unresolved risks separately. Do not turn either into fact or an accepted risk, and do not invent an owner, approval or green result.

  7. Give observable BDD examples for the important success, denial and undecidable paths, using Given/When/Then and outcomes somebody can check.

  8. Ask only questions whose answers change the decision, after presenting the evidence and provisional recommendation. A human answer overrides inference; update the options, recommendation and risks it changes rather than appending a contradictory answer.

  9. Create the draft with ai-eng spec new <slug>; add --ref owner/repo#45 only when that is the real work item. If this supersedes shipped work, create a new spec, link the old record and explain the change; never rewrite history.

  10. Architecture advice belongs inside the options, never beside them. Where a boundary, a dependency, a duplicated source of truth or the cost of reversing it decides between two options, say so in the option that carries it. A separate architectural opinion nobody has to answer is the advisor this project chose not to build.

  11. Keep decisions in their spec unless they constrain future specs. For the ones that do — architectural and cross-cutting: a boundary (API, auth, storage) or a global convention later specs must know and respect — list them under ## Decisions marked - [X] and promote with ai-eng decide "<title>"; the verb promotes only marked titles, and proposal is not approval. Everything else stays inside the spec, which is its record. Leave every production-ready box unticked until the named command supplies fresh evidence.

  12. When the critics report, fold them in place: the grill's questions into ## Grill and the council's gaps, cuts and refutations into ## Council, each section opening with its ran: round <n>, <date> — <n> min declaration, and revise the options, decision and risks those findings attacked rather than answering beside them.

Read the full file on GitHub · 106 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 106 lines · 117 tokens per session scan A 429dde5b7995

Subscribe to this mod's changes

ai-spec is a skill published in the GitHub repository arcasilesgroup/ai-engineering (54 stars, last pushed 4d ago), licensed Apache-2.0. It adds 117 tokens to every session and 1,487 once invoked, about $0.0006 per session on Opus 5. 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.