cavekit-archive
БесплатноБез исполняемых скриптовНе проверенArchive old project-root SPEC.md content when file exceeds 500 lines. Copies full SPEC.md to .cavekit/archive/ before trimming completed tasks, old bugs, and…
от casualjim★ 18 звёзд на GitHubОб этом скилле
cavekit-archive — compact SPEC.md
Archive long project-root SPEC.md files. Full copy first; trim working copy only after explicit user approval.
Read bundled ../../FORMAT.md before interpreting or editing SPEC.md. The bundled file defines section order, pipe-table rules, archive comments, ID monotonicity, and caveman-style encoding.
PRECHECK
- Read project-root
SPEC.md. If missing, reportno SPEC.md, nothing to archiveand stop. - Count lines. If
SPEC.mdhas≤500lines, reportSPEC.md is <N> lines. Nothing to archive.and stop with no writes. - Read bundled
../../FORMAT.mdif not already loaded. - Determine target archive path:
.cavekit/archive/SPEC-<YYYY-MM-DD>.md; if it exists, use-2,-3, etc.
DRY-RUN PREVIEW — no writes
Analyze SPEC.md. Do not create directories, archive files, or edit SPEC.md during preview.
Compute:
lines before= total line count.- §T candidates: rows with status
x; list IDs/ranges and line count. - §B candidates: rows whose
dateis older than 90 days; list IDs/ranges and line count. - Active cites: collect
citescells from §T rows with status.or~. - §V candidates:
V<n>lines not cited by active §T; list IDs/ranges and line count. - §I candidates: interface items not cited by active §T; list refs and line count.
- §C candidates: constraints not cited by active §T; list count and line count.
lines after=lines beforeminus removed candidate lines plus one archive comment per trimmed section.
Show preview:
## archive preview
archive target: .cavekit/archive/SPEC-<YYYY-MM-DD>.md
§T would archive: T1, T3-T8, T12 (9 tasks completed)
§B would archive: B1-B4 (4 bugs older than 90 days)
§V would archive: V1,V3-V5 (4 invariants, no active task cites them)
§I would archive: I.cli (1 interface, no active task cites it)
§C would archive: 2 constraints, no active task cites them
§G untouched
lines before: 533
lines after: 100
Ask approval after preview under the user decision policy. Offer 2-4 options:
Proceed (Recommended)→ continue to ARCHIVE + TRIM.Amend preview→ user changes include/exclude choices, then rerun dry-run preview.Stop→ stop with no writes.
If user approves, continue to ARCHIVE + TRIM. If user stops, write nothing. If user amends, incorporate requested include/exclude changes and rerun dry-run preview.
ARCHIVE
- Create
.cavekit/archive/if absent. - Copy exact full pre-trim
SPEC.mdto chosen archive path. - Do not normalize line endings, rewrite content, or modify the archive copy.
- Only after archive copy succeeds, edit working
SPEC.md.
TRIM
Trim only working SPEC.md. Archive copy remains exact and untouched.
§T — completed tasks
- Remove rows with status
x. - Preserve remaining
.and~rows. - Insert archive comment above §T table header:
<!-- archive: .cavekit/archive/SPEC-<date>.md §T T1-T12 -->
§B — old bugs
- Remove §B rows older than 90 days.
- Preserve recent rows.
- Insert archive comment above §B table header:
<!-- archive: .cavekit/archive/SPEC-<date>.md §B B1-B5 -->
§V — uncited invariants
- Collect live
V<n>refs from active §T rows only (.or~). - Remove
V<n>lines not in live set. - Insert archive comment above §V archived range:
<!-- archive: .cavekit/archive/SPEC-<date>.md §V V1,V3-V5 -->
§I — uncited interfaces
- Collect live
I.*refs from active §T rows only (.or~). - Remove §I items not in live set.
- Insert archive comment above §I archived range:
<!-- archive: .cavekit/archive/SPEC-<date>.md §I I.api,I.cli -->
§C — uncited constraints
- Collect live §C refs from active §T rows only (
.or~). - Remove §C bullets not in live set.
- Insert archive comment above §C archived range:
<!-- archive: .cavekit/archive/SPEC-<date>.md §C -->
§G — never touched
Do not edit §G.
REPORT
After writes, show changed path, archive path, and diff summary:
## archive report
saved to: .cavekit/archive/SPEC-2026-05-15.md
§T archived: T1, T3-T8, T12 (9 tasks completed)
§B archived: B1-B4 (4 bugs older than 90 days)
§V archived: V1,V3-V5 (4 invariants, no active task cites them)
§I archived: I.cli (1 interface, no active task cites it)
§C archived: 2 constraints
§G untouched
lines before: 542
lines after: 218
RULES
- Archive = exact full pre-trim copy. Content loss ⊥.
- No writes before dry-run preview and explicit user OK.
- Missing
SPEC.mdor≤500lines → no write. - One archive file per run. If same-day archive exists, suffix
-2,-3, etc. - §G never removed or changed.
- §T removes only completed rows (
x). - §B removes only rows older than 90 days.
- §C, §I, and §V remove only items uncited by active §T (
.or~). - Archive comments must include archive path, section, and ranges/refs when applicable.
- After archive, cavekit-spec/b
Установить cavekit-archive в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cavekit-archive?
Archive old project-root SPEC.md content when file exceeds 500 lines. Copies full SPEC.md to .cavekit/archive/ before trimming completed tasks, old bugs, and uncited constraints/interfaces/invariants. Use when users invoke /ck:archive or ask to archive, trim, or compact Cavekit SPEC.md.
Как установить скилл cavekit-archive?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cavekit-archive запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic