edit-spec

edit-spec is a skill for Claude Code, Codex from zernie/vigiles. It costs 87 tokens per session (1,460 once invoked), scanned A, original, MIT.

A workflow for editing a `.spec.ts` source file that generates CLAUDE.md or AGENTS.md instruction files. The generated files are treated as build artifacts, so the source specification is edited instead.

In plain words
What is it for?
Adding, changing, or removing agent rules, sections, commands, or key files in a vigiles-managed project.
Why use it?
It prevents changes from being overwritten and keeps the instruction source and its generated files consistent.

Skill for Claude CodeCodex

Part of the vigiles plugin — 27 skills, 1 agent, 4 hooks, 6 plugins shipped together

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.

agentmods
npx agentmods add skills/zernie/vigiles/edit-spec
Any agent
npx skills add zernie/vigiles --skill edit-spec
Clone the repo
git clone --depth 1 https://github.com/zernie/vigiles

Made for: Claude Code, Codex.

Or install vigiles, the plugin that ships this one along with the rest of its 27 skills, 1 agent, 4 hooks, 6 plugins.

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 edit-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/zernie/vigiles/edit-spec.svg)](https://agentmods.dev/skills/zernie/vigiles/edit-spec)
Your own site
<a href="https://agentmods.dev/skills/zernie/vigiles/edit-spec"><img src="https://agentmods.dev/badge/skills/zernie/vigiles/edit-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,460 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00087 $0.01460
Opus 5 $0.00044 $0.00730
Sonnet 5 $0.00017 $0.00292
Haiku 4.5 $0.00009 $0.00146

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

Security

Grade A, and why

edit-spec 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 5d 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/edit-spec/SKILL.md · 145 lines

How it starts

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

Edit a .spec.ts file to update the project's instruction files. The spec is the source of truth — CLAUDE.md and AGENTS.md are compiled build artifacts that must not be edited directly.

Arguments

$ARGUMENTS — What the user wants to change. Examples:

  • "add a rule about always using the custom logger"
  • "update the architecture section"
  • "add src/services/auth.ts to key files"
  • "add npm run lint to commands"
  • "change the testing guidance"

Instructions

Step 1: Find the Spec

Look for spec files in the repo root:

  • CLAUDE.md.spec.ts — source for CLAUDE.md
  • AGENTS.md.spec.ts — source for AGENTS.md
  • Any *.spec.ts matching instruction files

If no spec exists: if there's a hand-written CLAUDE.md, suggest the adopt-spec skill; otherwise suggest npx vigiles init to scaffold one.

Step 2: Read and Understand the Spec

Read the spec file. It's a TypeScript file that exports a claude() call with these fields:

import { claude, enforce, guidance, check, every } from "vigiles/spec";

export default claude({
  // Optional: output target (defaults to "CLAUDE.md")
  target: "CLAUDE.md",
  // or multi-target:
  // target: ["CLAUDE.md", "AGENTS.md"],

  // Prose sections — become ## headings in compiled output
  sections: {
    positioning: "What this project does...",
    architecture: "How the codebase is structured...",
  },

  // File paths verified to exist at compile time
  keyFiles: {
    "src/index.ts": "Main entry point",
  },

  // Commands verified against package.json
  commands: {
    "npm run build": "Compile the project",
    "npm test": "Run all tests",
  },

  // Rules — three types
  rules: {
    // enforce() — backed by a linter rule, verified to exist AND be enabled
    "no-any": enforce(
      "@typescript-eslint/no-explicit-any",
      "Use unknown and narrow with type guards.",
    ),

    // check() — filesystem assertion run by vigiles
    "test-pairing": check(
      every("src/**/*.service.ts").has("{name}.test.ts"),
      "Every service must have tests.",
    ),

    // guidance() — prose only, no enforcement
    "research-first": guidance("Google unfamiliar APIs before implementing."),
  },
});

Read the full file on GitHub · 145 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. 5d ago First seen · 145 lines · 87 tokens per session scan A aa4776a43ccd

Subscribe to this mod's changes

edit-spec is a skill published in the GitHub repository zernie/vigiles (15 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 1,460 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-30.