yds-spec-doc

yds-spec-doc is a skill for Claude Code, Codex from ymd38/dev-skills. It costs 82 tokens per session (2,124 once invoked), scanned A, original, MIT.

A tool that creates or updates a living specification file, docs/spec.md, from source code. The file documents how a project or module is structured so it can stay aligned with the code.

In plain words
What is it for?
Use it to document a directory, module, or whole project, or to synchronize an existing architecture specification with the current source code.
Why use it?
It addresses documentation becoming outdated as the implementation changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to document a directory, module, or whole project, or to synchronize an existing architecture specification with the current source code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ymd38/dev-skills/yds-spec-doc
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.

Any agent
npx skills add ymd38/dev-skills --skill yds-spec-doc
Clone the repo
git clone --depth 1 https://github.com/ymd38/dev-skills

Made for: Claude Code, Codex.

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 yds-spec-doc

README.md
[![agentmods](https://agentmods.dev/badge/skills/ymd38/dev-skills/yds-spec-doc.svg)](https://agentmods.dev/skills/ymd38/dev-skills/yds-spec-doc)
Your own site
<a href="https://agentmods.dev/skills/ymd38/dev-skills/yds-spec-doc"><img src="https://agentmods.dev/badge/skills/ymd38/dev-skills/yds-spec-doc.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,124 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.00082 $0.02124
Opus 5 $0.00041 $0.01062
Sonnet 5 $0.00016 $0.00425
Haiku 4.5 $0.00008 $0.00212

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

Security

Grade A, and why

yds-spec-doc 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 7d 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.

skills/yds-spec-doc/SKILL.md · 239 lines

How it starts

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

Role: Principal Engineer & Technical Writer (Living Spec Expert)

You are a principal-level engineer who writes documentation that functions as an executable blueprint for AI coding agents. Your specs eliminate ambiguity, prevent hallucinations, and let other agents make correct decisions without reading source code. Every word you write either adds precision or gets cut.


Phase 1: Reconnaissance

Before writing a single line of the spec, build a complete mental model of the codebase.

1.1 Scope Assessment

Determine the target scope from the user's request:

Signal Scope Output file
"document this directory" / path given Single module docs/spec.<module>.md
"document the whole project" / root path Full codebase docs/spec.md
"update the spec" / existing spec found Sync mode overwrite existing file

1.2 Code Scan Strategy

Execute scans in this order to build understanding bottom-up:

  1. Entry pointsmain.*, index.*, app.*, server.*, CLI entrypoints
  2. Data models — types, schemas, DB models, proto definitions
  3. Public interfaces — exported functions, REST/GraphQL routes, event contracts
  4. Internal logic — core algorithms, state machines, business rules
  5. Configuration — env vars, feature flags, build config
  6. Tests — what behaviors are tested reveals implicit contracts

If the codebase exceeds ~50 files, scan by layer (not file-by-file). Read representative files in each layer rather than exhaustively.

1.3 Gap Analysis (Sync Mode Only)

When docs/spec.md already exists:

  • Identify sections that contradict the current code (mark as STALE)
  • Identify undocumented modules/functions (mark as MISSING)
  • Preserve sections that remain accurate; do not rewrite what is still correct
  • Note the original author's structure and extend it, don't replace it

Phase 2: Spec Construction

2.1 Required Sections

Every spec must include all five sections below. Never omit one—write "N/A — [reason]" if genuinely not applicable.

Read the full file on GitHub · 239 lines

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. 7d ago First seen · 239 lines · 82 tokens per session scan A a97a240224b8

Subscribe to this mod's changes

yds-spec-doc is a skill published in the GitHub repository ymd38/dev-skills (4 stars, last pushed 9d ago), licensed MIT. It adds 82 tokens to every session and 2,124 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

rest-api-design-patterns

Comprehensive guide for designing RESTful APIs including resource modeling, versioning strategies, HATEOAS, pagination, filtering, and HTTP best practices.

manutej/luxor-claude-marketplace · 35 tokens

hive.chart-creation-foundations

Required reading whenever any chart tool is available. Teaches the one-tool embedding contract (call chartrender → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no…

aden-hive/hive · 133 tokens

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

shogun-screenshot

A screenshot tool for getting images from a computer or web page and then cropping, resizing, or masking sensitive information. Playwright is a browser-automation tool used here to capture web pages.

yohey-w/multi-agent-shogun · 149 tokens

agent-qa-testing

Agent davranis testi ve protokol uyumluluk dogrulamasi. Agent'larin tanimli rollerine uygun davranip davranmadigini assertion-based test'lerle olcer. Personality drift, role violation ve output kalite regresyonu tespit eder.

vibeeval/vibecosystem · 58 tokens

review

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use…

stevesolun/ctx · 95 tokens