Borrowing it
Nothing to install: this file belongs to ZhangHanDong/agent-spec. 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/ZhangHanDong/agent-spec/main/.claude/skills/agent-spec-authoring/SKILL.mdgit clone --depth 1 https://github.com/ZhangHanDong/agent-specWrote 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/skills/zhanghandong/agent-spec/agent-spec-authoring)<a href="https://agentmods.dev/skills/zhanghandong/agent-spec/agent-spec-authoring"><img src="https://agentmods.dev/badge/skills/zhanghandong/agent-spec/agent-spec-authoring/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/skills/zhanghandong/agent-spec/agent-spec-authoring"><img src="https://agentmods.dev/badge/skills/zhanghandong/agent-spec/agent-spec-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Memory Poisoning · line 149 Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
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.00172 | $0.04303 |
| Opus 5.5 | $0.00069 | $0.01721 |
| Sonnet 5.5 | $0.00034 | $0.00861 |
| Haiku 4.5 | $0.00017 | $0.00430 |
Grade A, and why
agent-spec-authoring 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 452 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Spec Authoring
Version: 3.2.0 | Last Updated: 2026-03-19
You are an expert at writing agent-spec Task Contracts. Help users by:
- Creating specs: Scaffold new
.spec.mdfiles with correct structure (.specalso supported) - Editing specs: Improve intent, constraints, boundaries, scenarios
- Writing scenarios: BDD-style with proper test selectors and step tables
- Debugging specs: Fix lint warnings, improve quality scores
- Self-hosting: Maintain specs for the agent-spec project itself
IMPORTANT: CLI Prerequisite Check
Before running any agent-spec command, Claude MUST check:
command -v agent-spec || cargo install agent-spec
If agent-spec is not installed, inform the user:
agent-specCLI not found. Install with:cargo install agent-spec
Core Philosophy
A Contract is not a vague Issue — it's a precise specification that shifts the review point:
Traditional: Human reviews 500 lines of code diff (slow, error-prone)
agent-spec: Human writes 50-80 lines of Contract (fast, high-value)
Machine verifies code against Contract (deterministic)
Writing a Contract is the highest-value human activity in the agent-spec workflow. You're defining "what is correct" — the machine handles "is the code correct".
Quick Reference
| Section | Chinese Header | English Header | Purpose |
|---|---|---|---|
| Intent | ## 意图 |
## Intent |
What to do and why |
| Constraints | ## 约束 |
## Constraints |
Must / Must NOT rules |
| Decisions | ## 已定决策 / ## 决策 |
## Decisions |
Fixed technical choices |
| Boundaries | ## 边界 |
## Boundaries |
Allowed / Forbidden / Out-of-scope |
| Acceptance Criteria | ## 验收标准 / ## 完成条件 |
## Acceptance Criteria / ## Completion Criteria |
BDD scenarios |
| Out of Scope | ## 排除范围 |
## Out of Scope |
Explicitly excluded items |
Hard Syntax Rules
- Use exactly one supported section header per line. Good:
## Intentor## 意图. Bad:## Intent / 意图. - Write scenarios as bare DSL lines under the acceptance section. Good:
Scenario:/场景:. The parser accepts Markdown-heading forms like### Scenario:for compatibility, but authoring should avoid emitting them by default. - Do not invent extra top-level sections such as
## Architecture,## Milestones, or## Qualityinside a task spec. Put that information intoIntent,Decisions,Boundaries, or an external document. - After drafting or editing a spec, always run
agent-spec parse <spec>and thenagent-spec lint <spec> --min-score 0.7.
What ships with it
1 file 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.
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.
- 2mo ago First seen · 452 lines · 172 tokens per session scan A c447e62667a7
agent-spec-authoring is a skill published in the GitHub repository ZhangHanDong/agent-spec (462 stars, last pushed 2mo ago), licensed MIT. It adds 172 tokens to every session and 4,303 once invoked, about $0.0007 per session on Opus 5.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.
agent-spec-authoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-spec-authoringZhangHanDong/agent-spec | Skill | 462 | 2mo ago | MIT | A | 172 | Claude Code |
| asddericrisco/rsc-harness | Skill | 503 | 2d ago | MIT | A | 145 | Claude Code, Codex |
| managing-mcp-serversJetBrains/thinkrail | Skill | 7.8k | yesterday | Apache-2.0 | A | 62 | Claude Code, Codex |
| todosJetBrains/thinkrail | Skill | 7.8k | yesterday | Apache-2.0 | A | 58 | Claude Code, Codex |
| asking-user-questionsJetBrains/thinkrail | Skill | 7.8k | yesterday | Apache-2.0 | A | 43 | Claude Code, Codex |
| writing-workflow-skillsJetBrains/thinkrail | Skill | 7.8k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| writing-specsJetBrains/thinkrail | Skill | 7.8k | yesterday | Apache-2.0 | A | 59 | Claude Code, Codex |