From dev-pomogator
Keep spec/markdown cross-reference links clickable in the editor (Marksman) when you RENAME a heading. Long descriptive headings (`## FR-7: Title`) are Marksman's standard, but their GLFM slug is derived from the heading TEXT — so renaming a heading silently breaks every inbound `[text](file.md#old-slug)` link. This skill DETECTS broken anchors and AUTO-FIXES them: ~99% deterministically (id-bearing links), the rest via `claude -p`. INVOKE after renaming/retitling a heading, before declaring spec work done, or to clean a corpus of broken anchors. Triggers (RU): "почини якоря", "битые ссылки в спеках", "переименовал заголовок ссылки", "anchor fix", "проверь ссылки спек". Triggers (EN): "fix broken anchors", "spec links broken after rename", "check spec link integrity", "anchor integrity".
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-pomogator:anchor-fixThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Marksman (the markdown LSP) computes a heading's anchor slug from its **text** (GLFM,
Marksman (the markdown LSP) computes a heading's anchor slug from its text (GLFM,
glfm_heading_ids.enable=true — the documented default). So ## FR-7: Phase 2 has
slug fr-7-phase-2. Rename it to ## FR-7: Phase 2 — native LSP and the slug
becomes fr-7-phase-2-native-lsp — every inbound [FR-7](FR.md#fr-7-phase-2) link
is now a dangling anchor. Marksman's in-editor rename fixes this when YOU drive it;
nothing protects edits by an agent/script/CI. This skill is that protection.
Real finding (2026-06): the dev-pomogator corpus had 1744 broken anchors across 39 specs — VERIFIED against the real binary. A historical slugifier dropped compound-word dashes Marksman keeps (
#fr-3-devpomogator-…vs realfr-3-dev-pomogator-…). 1719/1744 (99%) were deterministically fixable.
tools/anchor-integrity/marksman-slug.mjs)Captured ground-truth from the binary via textDocument/completion (see
capture-slug-fixture.cjs), pinned by tests/fixtures/marksman/slug-rule.json:
Фаза → фаза)AC-1.1 → ac-11,
AC-27.1 → ac-271, config.json → configjson, v2.0 → v20@feature2 → feature2 (the @ dropped, the rest kept)dev-pomogator → dev-pomogator, per-extension → per-extension-; collapse repeats; trim ends[[X]] targets a DOCUMENT (by H1 title/filename), NOT an H2; custom {#id} anchors do NOT resolvemarksmanSlug() is the ONE source of truth — md.ts and specs-generator-core.mjs
both delegate to it. If Marksman is version-bumped, re-run capture-slug-fixture.cjs
and the golden test will flag any rule change.
node tools/anchor-integrity/check.mjs --spec .specs/<slug> # one spec
node tools/anchor-integrity/check.mjs --all # whole corpus
node tools/anchor-integrity/fix.mjs --spec .specs/<slug> # dry run (suggest)
node tools/anchor-integrity/fix.mjs --spec .specs/<slug> --apply # write
--apply rewrites each stale #anchor → the heading's current marksmanSlug.
Idempotent. Ambiguous links (link text doesn't name a heading id) are left
UNTOUCHED — never guess-rewritten.claude -p for the ambiguous tail (FR-34c) — for prose links the deterministic
pass skipped, dispatch headless claude -p with the broken link + candidate
headings to pick the target, then rewrite (background; non-blocking).check.mjs --spec … → expect 0 broken anchors.## FR-N/## AC-N/## UC-N/section heading.anchor_gate_stop enforces this).fix.mjs --all --apply (review per-spec; these are foreign-spec
edits — commit one spec per commit).claude -p branch runs in the background and must not block the edit..specs/spec-generator-v4/FR.md FR-34 (+34a/b/c), AC-34.1–34.5 — the spec.tools/anchor-integrity/ — marksman-slug.mjs, check.mjs, fix.mjs, capture-slug-fixture.cjs.markdown-lsp skill — navigating/refactoring specs with the LSP (the upstream usage).npx claudepluginhub stgmt/dev-pomogator --plugin dev-pomogatorCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.