codex-spec-bootstrap

codex-spec-bootstrap is a skill for Claude Code, Codex from yinanli1917-cloud/searching-apple-notes. It costs 85 tokens per session (929 once invoked), scanned A, original, MIT.

A codebase-analysis process that creates durable project specifications from the existing architecture, patterns, and conventions. The specifications are stored in .codex/spec/ files.

In plain words
What is it for?
It is for starting or refreshing project specifications, documenting module responsibilities, data flow, architecture decisions, performance limits, and operational rules.
Why use it?
It gives coding agents a written reference for how the project is organised and how its parts are expected to work.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also installed under .codex/. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/codex_harness.py record-session --title "Spec bootstrap" --summary "Generated N spec files from codebase analysis: <list>".

Part of the searching-apple-notes plugin — 9 skills shipped together

Good fit It is for starting or refreshing project specifications, documenting module responsibilities, data flow, architecture decisions, performance limits, and operational rules.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/yinanli1917-cloud/searching-apple-notes
agentmods
npx agentmods add skills/yinanli1917-cloud/searching-apple-notes/codex-spec-bootstrap

Made for: Claude Code, Codex.

Or install searching-apple-notes, the plugin that ships this one along with the rest of its 9 skills.

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 codex-spec-bootstrap

README.md
[![agentmods](https://agentmods.dev/badge/skills/yinanli1917-cloud/searching-apple-notes/codex-spec-bootstrap.svg)](https://agentmods.dev/skills/yinanli1917-cloud/searching-apple-notes/codex-spec-bootstrap)
Your own site
<a href="https://agentmods.dev/skills/yinanli1917-cloud/searching-apple-notes/codex-spec-bootstrap"><img src="https://agentmods.dev/badge/skills/yinanli1917-cloud/searching-apple-notes/codex-spec-bootstrap.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 929 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.00085 $0.00929
Opus 5 $0.00043 $0.00464
Sonnet 5 $0.00017 $0.00186
Haiku 4.5 $0.00009 $0.00093

Measured 8d ago against content hash 995b83a8ac53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codex-spec-bootstrap 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 8d 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.

.codex/skills/codex-spec-bootstrap/SKILL.md · 112 lines

How it starts

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

Spec Bootstrap

Scan the current project's codebase and generate .codex/spec/project/ files that capture durable knowledge — architecture decisions, module contracts, conventions, performance constraints, and operational rules.

Process

1. Discover Project Shape

# File tree (depth 3)
find . -maxdepth 3 -type f \( -name "*.swift" -o -name "*.py" -o -name "*.ts" -o -name "*.js" -o -name "*.rs" \) | head -80

# Existing documentation
cat CLAUDE.md 2>/dev/null
cat README.md 2>/dev/null
cat AGENTS.md 2>/dev/null

# Existing specs (don't duplicate)
ls .codex/spec/project/ 2>/dev/null
ls .codex/spec/guides/ 2>/dev/null

# Package/module structure
find . -maxdepth 2 -name "Package.swift" -o -name "package.json" -o -name "pyproject.toml" -o -name "Cargo.toml" 2>/dev/null

# Git history for major patterns
git log --oneline -30
git log --oneline --all --diff-filter=A -- "*.swift" "*.py" "*.ts" | head -20

2. Identify Spec-Worthy Knowledge

Read key source files to find:

  • Architecture boundaries — what modules exist, what are their responsibilities, how do they communicate
  • Data flow patterns — how state moves through the app (e.g., MusicKit → ViewModel → View)
  • Performance constraints — any throttling, caching, batching, or real-time requirements
  • Platform conventions — API patterns, error handling, naming, file organization
  • Integration contracts — external services, APIs, system frameworks, their constraints
  • Hard-won lessons — patterns that exist because of past bugs (check git blame for "fix" commits)

Skip knowledge that is:

  • Already in existing spec files
  • Trivially derivable from reading one file
  • Ephemeral (version numbers, current bugs, in-progress work)

3. Generate Spec Files

For each distinct knowledge area, create a spec file:

.codex/spec/project/<topic-slug>.md

Format:

# <Topic Name>

## Architecture
<How this area is structured>

## Contracts
<What must remain true — invariants, interfaces, constraints>

## Patterns
<Established patterns to follow when modifying this area>

## Constraints
<Performance, platform, or design constraints>

## Lessons
<Hard-won knowledge from past incidents — reference git commits if relevant>

Read the full file on GitHub · 112 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. 8d ago First seen · 112 lines · 85 tokens per session scan A 995b83a8ac53

Subscribe to this mod's changes

codex-spec-bootstrap is a skill published in the GitHub repository yinanli1917-cloud/searching-apple-notes (2 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 929 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

apple-notes

Use this skill when the user wants to interact with Apple Notes on macOS - creating, searching, reading, updating, deleting, organizing, or formatting notes and folders. This skill provides access to Apple Notes through MCP tools and includes safe formatting guidance.

sweetrb/apple-notes-mcp · 54 tokens

notes-snapshot-control-room

This skill should be used when the user asks to "connect Apple Notes Snapshot to a host", "run notesctl mcp", "diagnose why Apple Notes Snapshot failed to attach", "separate AI Diagnose from MCP", or "verify the control-room proof path". It teaches local preflight, MCP wiring, capability boundaries, and proof-first…

xiaojiou176-open/notebackup · 85 tokens

aws-wechat-article-main

A coordinator for running a complete Chinese WeChat public-account publishing workflow. It connects separate steps such as choosing a topic, writing, reviewing, formatting, adding images, and publishing.

aiworkskills/wechat-article-skills · 359 tokens

aws-wechat-article-writing

A writing tool for Chinese WeChat public-account articles, creating a first draft from a topic or outline and revising existing text. It can use a configured language-model service, such as DeepSeek, OpenAI, or Anthropic.

aiworkskills/wechat-article-skills · 218 tokens

aws-wechat-article-images

An image-generation tool for Chinese WeChat public-account articles, making covers and illustrations based on an article’s title and content. It can create several visual options and reuse configured style presets.

aiworkskills/wechat-article-skills · 144 tokens

aws-wechat-article-assets

A local library for storing business descriptions, product images, and reusable writing or design presets for WeChat articles. It organizes these materials by product so other article tools can reuse them.

aiworkskills/wechat-article-skills · 258 tokens