From spec-anchor
Loads coding standards, module contracts, and active tasks for projects using SpecAnchor. Useful before code changes, reviews, handoffs, or alignment checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-anchor:spec-anchorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<HARD-GATE>
SpecAnchor compiles bounded, auditable, sedimentable engineering context for coding agents. It does not own the agent loop.
SpecAnchor 为 AI coding agent 编译有边界、可审计、可沉淀的工程上下文。它不拥有 agent 执行循环。
Spec 是 cold context 来源之一,代码是船,Context Bundle 是 SpecAnchor 的核心交付物。SpecAnchor 把工作记忆显式分为四类产物——Spec / Decision / Evidence / Finding——按 inclusion / budget / freshness / staleness 装配成 Bundle 交给 agent。Agent 在执行中产生的新发现回写为 Finding,经 Sediment Proposal 由人 batch review 后才进入长期 Spec。跨 session 通过 specanchor_handoff 导出 handoff packet 重启。
主 SKILL.md 只负责入口和 boot;详细协议下沉到 references/:
references/agents/context-utilities.mdreferences/workflow-gates.mdreferences/commands-quickref.mdreferences/reference-index.mdSkill 脚本位于 Skill 根目录的 scripts/ 下,运行时必须站在用户项目根目录。
# $SA_SKILL_DIR = SKILL.md 所在目录
SPECANCHOR_SKILL_DIR="$SA_SKILL_DIR" bash "$SA_SKILL_DIR/scripts/<script-name>.sh" [args]
Keep long options as a single shell argument: use --format=summary, never -- format=summary.
specanchor-boot.sh 加载项目配置、模块结构和活跃任务(详见 Boot Requirement)specanchor-assemble.sh --files=... --intent=...(详见 Loading Strategy)specanchor-finding.sh 记录步骤 1-2 在 session 开始时执行一次;步骤 3-7 在每个编码任务中按需循环。
Boot 是进入项目后的第一步,不可跳过。 激活后先运行:
SPECANCHOR_SKILL_DIR="$SA_SKILL_DIR" bash "$SA_SKILL_DIR/scripts/specanchor-boot.sh"
--format=summary:人类可读摘要--format=full:额外附带 Global Spec 正文--format=json:机器可读 JSONBoot 完成后立即输出 Assembly Trace(见下节),然后再进入任何代码分析或修改。
Boot 是 session-start / preflight,同一 session 原则上只运行一次。 同 session 内后续的上下文需求不要重复 boot——改用 targeted specanchor-assemble.sh --files=...(见 Loading Strategy)。
Boot 完成后必须立即输出 Assembly Trace,格式如下:
Assembly Trace:
- Global: summary|full|none|skipped -> <files or reason>
- Module: full|summary|deferred|sources-only|none -> <files or reason>
Assembly Trace 是 boot 的可视确认——没有它,用户无法验证上下文已正确加载。完整规则见 references/assembly-trace.md。
full:始终加载 anchor.yaml + 全部 Global Spec;Module Spec 按需加载。parasitic:只加载 anchor.yaml 与外部 sources;不创建 full-only Spec。Available Commands: / Available Modules: 段;boot 不可用时 fallback 到 references/commands-quickref.md。specanchor-assemble.sh --files=... --intent=...,先拿到 bounded read plan,再进入编辑。每次完成代码修改后,必须依次执行以下检查链:
specanchor_check 或手动验证修改的文件仍符合对应 Module Spec 的契约。此步骤不可跳过。SPECANCHOR_SKILL_DIR="$SA_SKILL_DIR" bash "$SA_SKILL_DIR/scripts/specanchor-finding.sh" new --topic=<slug> --summary=<单行摘要>。无新发现则跳过。references/concepts/sediment-proposal.md)将热上下文回流为冷 Spec。无漂移则跳过。脚本失败时:
anchor.yaml + .specanchor/spec-index.md 获取最小上下文。迭代上限:
降级策略:
.specanchor/ 下的文件作为上下文。anchor.yaml 且无 .specanchor/,skill 不激活——这是预期行为,不视为错误。npx claudepluginhub linziyanleo/spec-anchor --plugin spec-anchorTransforms ideas into structured specifications (requirements, design, tasks) before implementation. Use when building features, fixing bugs, refactoring, or designing systems.
Guides specification-driven AI development workflows by breaking projects into 2-4 hour sessions using 13 commands like /plansession, /implement, /validate, and /phasebuild.
Guides GitHub Spec-Kit CLI integration for 7-phase constitution-based spec-driven feature development, managing .specify/specs/ directories with phases: Constitution, Specify, Clarify, Plan, Tasks, Analyze, Implement.