vulyk: Command for Claude Code

.claude/commands/vulyk-gc.md

vulyk-gc is a command for Claude Code from Black-coffe/vulyk. It costs 14 tokens per session (1,421 once invoked), scanned A, original, MIT.

A memory-maintenance command for a VULYK project. It asks a librarian agent to combine useful learnings, identify outdated project maps, remove old snapshots, and check the memory index.

In plain words
What is it for?
Use it periodically to clean and consolidate the project's memory directory. It is for maintaining learnings, maps, snapshots, and pointers used by later coding sessions.
Why use it?
It keeps stored project knowledge current and reduces clutter from stale or expired information. It also surfaces items that require a human decision.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

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

Reuse

Borrowing it

Nothing to install: this file belongs to Black-coffe/vulyk. 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/Black-coffe/vulyk/main/.claude/commands/vulyk-gc.md
Clone the repo
git clone --depth 1 https://github.com/Black-coffe/vulyk

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 vulyk-gc

README.md
[![agentmods](https://agentmods.dev/badge/commands/black-coffe/vulyk/vulyk-gc/github.svg)](https://agentmods.dev/commands/black-coffe/vulyk/vulyk-gc)
Your own site
<a href="https://agentmods.dev/commands/black-coffe/vulyk/vulyk-gc"><img src="https://agentmods.dev/badge/commands/black-coffe/vulyk/vulyk-gc/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 vulyk-gc

Your own site · 80×15
<a href="https://agentmods.dev/commands/black-coffe/vulyk/vulyk-gc"><img src="https://agentmods.dev/badge/commands/black-coffe/vulyk/vulyk-gc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,421 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.
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.00014 $0.01421
Opus 5.5 $0.00006 $0.00568
Sonnet 5.5 $0.00003 $0.00284
Haiku 4.5 $0.00001 $0.00142

Measured yesterday against content hash 023ba2fa18e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vulyk-gc 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 yesterday.

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/commands/vulyk-gc.md · 61 lines

How it starts

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

Dispatch librarian for a full GC pass over memory/ per its protocol (consolidate learnings, flag stale maps, prune snapshots >14 days, verify the pointer index).

Then act on its report in the main session:

  • Deletions are yours: the librarian has no shell. git rm the raw learnings its Delete: list names and every stub (grep -l 'Stub captured by VULYK' memory/learnings/*.md); remove snapshots older than 14 days (find memory/snapshots -type f -mtime +14 ! -name .gitkeep -delete).
  • Stale maps -> offer to run /vulyk-map for the flagged modules now.
  • "Needs human decision" items -> present them as a short list, decide nothing unilaterally.
  • If memory/learnings/CONSOLIDATED.md exceeded its 40-entry cap, note that the next /vulyk-evolve should promote the oldest stable entries into rules or wiki notes (learnings are a buffer, not an archive).

Commit the result with this one line, run as written. It prints the counts for your report line, and it refuses to commit a CONSOLIDATED.md that lost more than half its entries or bytes. gc runs unattended, so a collapsed rewrite would otherwise go unseen. On a refusal, show the owner the diff and commit nothing.

f=memory/learnings/CONSOLIDATED.md; e0=$(git show HEAD:$f 2>/dev/null | grep -cE '^[0-9]+\. '); b0=$(git show HEAD:$f 2>/dev/null | wc -c); e1=$(grep -cE '^[0-9]+\. ' $f 2>/dev/null); b1=$(cat $f 2>/dev/null | wc -c); echo "CONSOLIDATED.md: entries $((e0))→$((e1)), bytes $((b0))→$((b1))"; if [ $((b0)) -gt 0 ] && { [ $((e1*2)) -lt $((e0)) ] || [ $((b1*2)) -lt $((b0)) ]; }; then echo "gc: refused - CONSOLIDATED.md lost more than half"; git diff --stat -- $f; else git add memory/learnings ':(icase)memory/memory.md' && git commit -m "chore(memory): gc" -- memory/learnings ':(icase)memory/memory.md'; fi

The pathspec keeps memory/stats/ and anything else staged out of it; :(icase) takes the index as memory.md or MEMORY.md. Nothing changed: no commit.

Nobody has to remember this command: the SessionStart brief says maintenance due: gc (...) when stub learnings exist or 10+ raw ones wait, and the Queen runs it after the owner's task, on the default branch with a clean tree, then tells the owner in one line what changed, including the CONSOLIDATED.md counts.

memory mode: one-off triage of private memory into cards

The SessionStart brief offers it ([VULYK] memory triage (MEMORY.md <n> lines, ...), its own line, never in maintenance due) once Claude Code's own MEMORY.md reaches 160 lines or 20 KB, 80% of what it loads. It runs only on the owner's yes, because step 2 reads every file; a no runs bash scripts/memory-triage.sh --mark. The owner's yes in step 4 still gates every write. Private auto memory (~/.claude/projects/<slug>/memory/) is outside the repo and the librarian has no shell, so the main session does every step itself. Never dispatch a subagent for it: personal files are never opened by one.

  1. Run bash "${CLAUDE_PROJECT_DIR}/scripts/memory-triage.sh". It lists path<TAB>type<TAB>first heading and writes nothing. no private memory: <dir> → say so in one line and stop.
  2. Read each listed file.
  3. Propose three heaps in one table, one row per file: card (a project rule: Never / Allowed / How-to), personal / stays (servers, access, people, the owner's style, anything with client data: stays in private memory), delete (stale, done, or a duplicate of an existing card: bash scripts/defects-index.sh --grep <word>). For a card row also give the target docs/defects/<area>/<id>.md (or an existing card it joins), the branch and the retold line.
  4. Ask once with AskUserQuestion: the recommended list first, marked recommended; the other options are a changed list or no.
  5. On no, or a changed list: redo the table from the owner's answer and ask again. Nothing is written before a yes.
  6. On yes, write the cards. A card made from memory is retold, never an owner quote: no ## Owner quotes line, and a ## Source section with one line per file: - YYYY-MM-DD · auto memory <file> · retold, not a quote.
  7. Run bash scripts/leak-check.sh <card> on each new or changed card. A hit: rewrite the line without the internal name, or move the file to the personal heap; no card is committed with a hit.
  8. Delete each moved and each dropped file from the private memory dir, and their index lines: bash scripts/memory-triage.sh --index-lines <dir>/MEMORY.md <file>... prints exactly the lines to remove from that MEMORY.md. Personal files stay, with their lines.
  9. Run bash scripts/defects-index.sh, then commit the cards and the index with chore(defects): memory triage. The commit message names counts, never a personal file or its content.
  10. Run bash scripts/memory-triage.sh --mark, also when nothing was moved: it records the size the triage left, and the brief stays quiet until MEMORY.md grows 20 lines or 2 KB past it.
  11. Report one line: cards written, files deleted from private memory, files kept.

Read the full file on GitHub · 61 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. yesterday Changed · +6 lines 023ba2fa18e7
  2. 10d ago Changed · +27 lines 5e809b2edfa2
  3. 13d ago Changed · +1 lines ee10714a6745
  4. 1mo ago Changed · +15 lines 20aa659c78f5
  5. 2mo ago First seen · 12 lines · 14 tokens per session scan A e46ad57fb5cb

Subscribe to this mod's changes

vulyk-gc is a command published in the GitHub repository Black-coffe/vulyk (2 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 1,421 once invoked, about $0.0001 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-31.