cldcde: Skill for Claude Code

.claude/skills/spec-lock/SKILL.md

spec-lock is a skill for Claude Code from aegntic/cldcde. It costs 45 tokens per session (1,475 once invoked), scanned A, original, MIT.

A tool that keeps source code and specifications or documentation synchronized in both directions. After edits, it compares the change with files such as CLAUDE.md and SPEC.md and detects differences between the code and the written rules.

In plain words
What is it for?
Use it when changing code that affects requirements, API contracts, or documentation, especially to detect whether the code violates the specification or introduces behavior that the specification does not describe.
Why use it?
Code and documentation can drift apart as a project changes. It highlights conflicts and can suggest or generate documentation patches when the code and specification no longer agree.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 /a0/usr/plugins/spec-lock/spec-lock.py --check <file>.

Reuse

Borrowing it

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

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-lock

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aegntic/cldcde/spec-lock"><img src="https://agentmods.dev/badge/skills/aegntic/cldcde/spec-lock.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,475 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 241
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00045 $0.01475
Opus 5.5 $0.00018 $0.00590
Sonnet 5.5 $0.00009 $0.00295
Haiku 4.5 $0.00005 $0.00147

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

Security

Grade A, and why

spec-lock 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 1mo 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.

.claude/skills/spec-lock/SKILL.md · 260 lines

How it starts

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

Spec-Lock: Documentation Synchronization

Overview

Spec-Lock prevents documentation rot by maintaining bi-directional sync between code and specifications. It treats documentation as executable code that must stay synchronized with implementation.

The Problem It Solves

Documentation Rot: In agentic workflows, code evolves faster than docs. Users hate writing documentation, and agents frequently ignore old instructions.

Spec-Lock Solution: Automatic synchronization that detects drift and keeps context perfectly synced with reality.

How It Works

1. Post-Edit Analysis (PostToolUse Hook)

Every time a file is edited:

  • Analyzes semantic intent of the change
  • Compares against CLAUDE.md and SPEC.md
  • Detects drift between code and docs

2. Conflict Detection

Two scenarios trigger sync:

Scenario A: Code Drift

  • Code violates the spec (e.g., wrong auth method)
  • Plugin asks: "Revert code or update spec?"

Scenario B: Spec Evolution

  • Code introduces new logic not in spec
  • Plugin asks: "Update SPEC.md to match code?"

3. Auto-Update

Uses headless Claude to:

  • Generate documentation patches
  • Update dependent docs automatically
  • Maintain knowledge graph of dependencies

When to Use

Activate Spec-Lock when:

  • Changing API endpoints or parameters
  • Modifying authentication flows
  • Updating database schemas
  • Changing configuration values
  • Implementing new features
  • Refactoring existing code

Usage

Automatic Mode

With PostToolUse hooks:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit(*)|Write(*)",
        "command": "python3 /a0/usr/plugins/spec-lock/spec-lock.py --check"
      }
    ]
  }
}

Manual Commands

# Check a file for drift
python3 /a0/usr/plugins/spec-lock/spec-lock.py --check <file>

# Register a new dependency
python3 /a0/usr/plugins/spec-lock/spec-lock.py --register <code> <spec> [priority]

# Show sync status
python3 /a0/usr/plugins/spec-lock/spec-lock.py --status

# Force full sync
python3 /a0/usr/plugins/spec-lock/spec-lock.py --sync

Read the full file on GitHub · 260 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. 1mo ago First seen · 260 lines · 45 tokens per session scan A defbe7a9c431

Subscribe to this mod's changes

spec-lock is a skill published in the GitHub repository aegntic/cldcde (12 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 1,475 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

tauri-django-react

Agents should invoke this skill for Tauri + Django + React desktop apps, especially backend lifecycle, CORS/auth, frontend integration, mandatory light/dark theming, German/English i18n, build packaging, dual desktop/web deployment, Rust commands, and platform-specific gotchas.

Firstp1ck/pi-coding-agent-forge · 63 tokens

shoo-auth

Use when evaluating, implementing, reviewing, or debugging Shoo auth (shoo.dev) Google sign-in in browser apps, including @shoojs/react, @shoojs/auth, hosted shoo.js, Convex custom JWT integration, PKCE callbacks, session checks, and server-side idtoken verification. Do not use for unrelated auth systems.

Firstp1ck/pi-coding-agent-forge · 75 tokens

skill-sync-checker

Detects content drift between skill files and their source documents. Helps maintain skills that are derived from other documentation by comparing content and flagging outdated sections.

kanyun-inc/reskill · 35 tokens

add-a-service

Scaffold a new service under services/ in the builders-stack monorepo. Use when something needs its own URL, port, or independent deploy. Covers the package, entrypoint, config, Tilt, deployment registry, and shared small-image build path.

lonormaly/builders-stack · 55 tokens

wire-a-new-payment-provider

Add or swap a payment provider behind the @stack/payment adapter in the builders-stack monorepo. Use when integrating Stripe, Paddle, Lemon Squeezy, or any provider alongside or in place of the default Creem adapter. The whole point is that apps and the API never change — only the adapter implementation does. Covers…

lonormaly/builders-stack · 92 tokens

api-fetch-wrapper

Wrap a public HTTP API (Open-Meteo weather as the demo) with credential handling, error normalisation, and a single retry on transient network failures. Demonstrates the production-shaped baseline for any "skill that calls an external service" — env-based secrets, structured error output, no leaked API keys in logs…

ChronoAIProject/Ornn · 121 tokens