EngramGraph: Skill for Claude Code

.agents/skills/spec-derivation/SKILL.md

spec-derive is a skill for Claude Code from AsiaOstrich/EngramGraph. It costs 130 tokens per session (1,548 once invoked), scanned A, original, MIT.

A specification-based generator that turns approved software requirements into test and behavior documents. It can create BDD scenarios, TDD test skeletons, integration and end-to-end test skeletons, and acceptance-test tables.

In plain words
What is it for?
Use it after approving a specification to produce .feature files, test-file templates, integration and end-to-end test templates, Markdown acceptance tables, and related JSON or contract outputs.
Why use it?
It reduces the manual work of converting acceptance criteria into separate testing files. It also checks that each criterion maps to a generated item and remains traceable to the specification.

Skill for Claude Code

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

This is AsiaOstrich/EngramGraph's own configuration. It tells Claude Code how to work on EngramGraph 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 EngramGraph configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is 完整的 AI 行為定義請參閱對應的命令文件:[`/derive`](../commands/derive.md#ai-agent-behavior--ai-代理行為).

Reuse

Borrowing it

Nothing to install: this file belongs to AsiaOstrich/EngramGraph. 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/AsiaOstrich/EngramGraph/main/.agents/skills/spec-derivation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AsiaOstrich/EngramGraph

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/asiaostrich/engramgraph/spec-derivation/github.svg)](https://agentmods.dev/skills/asiaostrich/engramgraph/spec-derivation)
Your own site
<a href="https://agentmods.dev/skills/asiaostrich/engramgraph/spec-derivation"><img src="https://agentmods.dev/badge/skills/asiaostrich/engramgraph/spec-derivation/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 spec-derive

Your own site · 80×15
<a href="https://agentmods.dev/skills/asiaostrich/engramgraph/spec-derivation"><img src="https://agentmods.dev/badge/skills/asiaostrich/engramgraph/spec-derivation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,548 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 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.00130 $0.01548
Opus 5.5 $0.00052 $0.00619
Sonnet 5.5 $0.00026 $0.00310
Haiku 4.5 $0.00013 $0.00155

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

Security

Grade A, and why

spec-derive 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 14d 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/spec-derivation/SKILL.md · 110 lines

How it starts

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

Forward Derivation | 正向推演

Generate derived artifacts (BDD scenarios, TDD skeletons, ATDD tables) from approved SDD specifications.

從已批准的 SDD 規格生成衍生工件(BDD 場景、TDD 骨架、ATDD 表格)。

Subcommands | 子命令

Subcommand Description Output
all Full derivation pipeline (BDD + TDD + IT + E2E + ATDD + Contracts) .feature + .test.* + .it.test.* + .e2e.test.* + .md + .json
bdd Generate BDD scenarios only .feature
tdd Generate TDD skeletons only .test.*
it Generate Integration test skeletons .it.test.*
e2e Generate E2E test skeletons .e2e.test.*
atdd Generate ATDD test tables .md (Markdown tables)

Workflow | 工作流程

  1. Read Spec - Analyze the input SPEC-XXX.md file | 分析規格檔案
  2. Extract AC - Parse all Acceptance Criteria | 解析所有驗收條件
  3. Generate Artifacts - Create BDD/TDD/ATDD outputs | 產生衍生工件
  4. Verify - Ensure 1:1 mapping between AC and generated items | 驗證一對一對應

Anti-Hallucination Rules | 防幻覺規則

Rule Description 說明
1:1 Mapping Every AC has exactly one test/scenario 每個 AC 對應一個測試
Traceability All artifacts reference Spec ID and AC ID 所有工件引用規格與 AC 編號
No Invention Do not add scenarios not in the spec 不新增規格外的場景

Generated Artifact Tags | 產生工件標籤

Tag Meaning 含義
[Source] Direct content from spec 直接來自規格
[Derived] Transformed from source 從來源轉換
[Generated] AI-generated structure AI 產生的結構
[TODO] Requires human implementation 需人工實作

Usage | 使用方式

/derive all specs/SPEC-001.md           - Full derivation pipeline | 完整推演管線
/derive bdd specs/SPEC-001.md           - Derive BDD scenarios only | 僅推演 BDD 場景
/derive tdd specs/SPEC-001.md           - Derive TDD skeletons only | 僅推演 TDD 骨架
/derive it specs/SPEC-001.md            - Derive Integration test skeletons | 推演整合測試骨架
/derive e2e specs/SPEC-001.md           - Derive E2E test skeletons | 推演 E2E 測試骨架
/derive atdd specs/SPEC-001.md          - Derive ATDD tables | 推演 ATDD 表格

Read the full file on GitHub · 110 lines

Files

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.

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. 14d ago First seen · 110 lines · 130 tokens per session scan A bc7347f8aebb

Subscribe to this mod's changes

spec-derive is a skill published in the GitHub repository AsiaOstrich/EngramGraph (3 stars, last pushed today), licensed MIT. It adds 130 tokens to every session and 1,548 once invoked, about $0.0005 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-10-16.

Related

Other skills, from other repositories

testing

Testing: TDD, E2E, preferred patterns, test-value audits, verification, agent testing.

notque/vexjoy-agent · 23 tokens

nw-test-design-mandates

Design mandates for acceptance tests - hexagonal boundary, business language abstraction, user journey completeness, pure function extraction, 3 Pillars (domain language / chained narrative / production composition), and the layered ATD discipline (Universe-bound assertion, layer-dependent PBT mode, two-tier…

nWave-ai/nWave · 69 tokens

nw-spike

Runs a timeboxed PROBE to validate one core assumption, then optionally PROMOTES the probe into a walking skeleton — the first e2e thin slice of the feature, committed and demo-able. Use after DISCUSS when the feature involves a new mechanism, performance requirement, or external integration.

nWave-ai/nWave · 62 tokens

nw-ad-critique-dimensions

Review dimensions for acceptance test quality - happy path bias, GWT compliance, business language purity, coverage completeness, walking skeleton user-centricity, priority validation, observable behavior assertions, traceability coverage, and walking skeleton boundary proof.

nWave-ai/nWave · 53 tokens

nw-bdd-methodology

BDD patterns for acceptance test design - Given-When-Then structure, scenario writing rules, pytest-bdd implementation, anti-patterns, and living documentation.

nWave-ai/nWave · 36 tokens

nw-test-organization-conventions

Test directory structure patterns by architecture style, language conventions, naming rules, and fixture placement. Decision tree for selecting test organization strategy.

nWave-ai/nWave · 33 tokens