EngramGraph: Skill for Claude Code

.agents/skills/tdd-assistant/SKILL.md

tdd is a skill for Claude Code from AsiaOstrich/EngramGraph. It costs 140 tokens per session (1,397 once invoked), scanned A, original, MIT.

A reference guide to Test-Driven Development (TDD), a method of writing a failing test, making it pass, and then improving the code. It explains the Red-Green-Refactor cycle, test structure, and testing principles.

In plain words
What is it for?
Use it to learn the TDD cycle, write tests with Arrange-Act-Assert structure, and follow examples in different programming languages.
Why use it?
It provides a shared process for developing from tests, but it does not run or enforce that process. Automated lifecycle control has moved to another toolchain.

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 行為定義請參閱對應的命令文件:[`/tdd`](../commands/tdd.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/tdd-assistant/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 tdd

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/asiaostrich/engramgraph/tdd-assistant"><img src="https://agentmods.dev/badge/skills/asiaostrich/engramgraph/tdd-assistant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,397 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.00140 $0.01397
Opus 5.5 $0.00056 $0.00559
Sonnet 5.5 $0.00028 $0.00279
Haiku 4.5 $0.00014 $0.00140

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

Security

Grade A, and why

tdd 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/tdd-assistant/SKILL.md · 101 lines

How it starts

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

TDD Assistant | TDD 助手

⚠️ Status: Reference(參考用,非可執行流程) — TDD 流程協調(RED→GREEN→REFACTOR 循環、測試執行 gates)已於 2026-04-28 移至 adoption layer(XSPEC-095)。此處保留 TDD 原則、FIRST 規則、AAA 格式、語言範例、流程指南供參考。 Lifecycle orchestration has moved to the adoption layer (XSPEC-095); this document is reference-only. For enforced execution, use your adoption layer's toolchain.

Guide through the Test-Driven Development workflow: Red-Green-Refactor.

引導測試驅動開發(TDD)流程:紅-綠-重構。

TDD Cycle | TDD 循環

    ┌─────┐       ┌───────┐       ┌──────────┐
    │ RED │ ────► │ GREEN │ ────► │ REFACTOR │
    └─────┘       └───────┘       └──────────┘
       ▲                                │
       └────────────────────────────────┘

Workflow | 工作流程

📖 以下為流程的參考結構,非可執行步驟;自動化/強制執行請用 adoption layer 工具鏈(XSPEC-095)。 The steps below are a reference structure, not an executable workflow.

Phase 1: RED - Write Failing Test | 紅燈 - 撰寫失敗測試

  • Write a test that describes the desired behavior | 撰寫描述預期行為的測試
  • Run tests - confirm it fails for the right reason | 執行測試 - 確認正確地失敗
  • Use AAA pattern (Arrange-Act-Assert) | 使用 AAA 模式

Phase 2: GREEN - Make Test Pass | 綠燈 - 讓測試通過

  • Write minimum code to pass the test | 撰寫最少的程式碼讓測試通過
  • Hardcoding is acceptable at this stage | 此階段可以硬編碼
  • Run tests - confirm it passes | 執行測試 - 確認通過

Phase 3: REFACTOR - Improve Code | 重構 - 改善程式碼

  • Remove duplication (DRY) | 移除重複
  • Improve naming and structure | 改善命名與結構
  • Run tests after every change | 每次變更後執行測試
  • No new functionality added | 不新增功能

FIRST Principles | FIRST 原則

Principle Description 說明
Fast Tests run quickly (< 100ms/unit) 快速執行
Independent No shared state between tests 測試間無共享狀態
Repeatable Same result every time 每次結果相同
Self-validating Clear pass/fail result 明確的通過/失敗
Timely Written before production code 在產品程式碼之前撰寫

Read the full file on GitHub · 101 lines

Files

What ships with it

3 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. 14d ago First seen · 101 lines · 140 tokens per session scan A 2ecb79126ff5

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository AsiaOstrich/EngramGraph (3 stars, last pushed today), licensed MIT. It adds 140 tokens to every session and 1,397 once invoked, about $0.0006 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.