forge-snapshot
Skill2 starsChanged 35 days agoMITView on GitHub
Regenerates FORGE_SNAPSHOT.md from real project sources so no session loses the mission across compaction. Use on /forge snapshot or let PreCompact/SessionStart hooks trigger it.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- ForgeyClap/Forge-Coreedited, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- ForgeyClap/Forge-Core★ 276% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository74 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- claude-md-improverSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- forge-agent-reportSkill
- forge-agentSkill
- forge-apiSkill
- forge-botsSkill
- forge-brainstormSkill
- forge-cliSkill
- forge-cmsSkill
- forge-code-reviewSkill
- forge-councilSkill
- forge-dataSkill
- forge-debugSkill
- forge-deeplearnSkill
- forge-docdriftSkill
- forge-doctorSkill
- forge-ecommerceSkill
- forge-electronSkill
- forge-extensionSkill
- forge-figmaSkill
- forge-fullstackSkill
- forge-gameSkill
- forge-graded-verifySkill
- forge-guardianSkill
- forge-heartbeatSkill
- forge-intakeSkill
- forge-integrationSkill
- forge-mcp-clientsSkill
- forge-migrationSkill
- forge-mindmapSkill
- forge-mlopsSkill
- forge-mobileSkill
- forge-n8nSkill
- forge-nightshiftSkill
- forge-paymentsSkill
- forge-prdSkill
- forge-predictionSkill
- forge-projectbrainSkill
- forge-prompt-coachSkill
- forge-qualitySkill
- forge-ragSkill
- forge-registrySkill
- forge-reportSkill
- forge-routerSkill
- forge-scoutSkill
- forge-scrapingSkill
- forge-scribeSkill
- forge-skill-testingSkill
- forge-verifySkill
- forge-voiceSkill
- forge-websiteSkill
- forge-worktreesSkill
- frontend-designSkill
- grillingSkill
- grill-meSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Self-improvement substrate (wp-skill-evals): before applying this skill, read learnings.md in this skill's own folder and honor its …
- Distinctive: line 65
Every generated claim carries a real evidence pointer (a relative path, optionally with an event type/heading) or is explicitly marked in …
- Very specific: line 106
Never fabricates a context percentage.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Forge playbook — Snapshot (context-continuity snapshot system)
Self-improvement substrate (wp-skill-evals): before applying this skill, read
learnings.md in this skill's own folder and honor its corrections. After a run that produced a
genuine correction (an owner fix, a false assumption caught, a preference stated), append it to
learnings.md with a date and real evidence — never invent a lesson that didn't happen.
Owner request: "bij elke 50% context een snapshot.md zodat er geen memory wordt vergeten…
en dan een uitgebreid rapport zodat de agents nog weten wat we maken — dit geldt ook voor globaal." There is
no context-percentage available to a hook (a closed Claude Code feature request — the only percentage
lives in the separate statusline channel, context_window.used_percentage, which no hook can read). This
system never fabricates or estimates one. Instead it fires on the real, honest signals: a PreCompact
hook (the genuine "context is about to be compacted" event), a phase boundary, or an explicit manual call.
What it does
forge-bin/forge-snapshot.cjs— the generator.write([--run <id>] [--reason ...])regenerates.claude/FORGE_SNAPSHOT.mdfrom real sources:FORGE_MEMORY.md's latest status block,FORGE_TASK_HISTORY.md's latest entry,tasks/WORK_PACKAGES.md's latest mission block,FORGE_DECISIONS.md's most recent rows, the newest run'sevents.jsonl(done/in-progress buckets, each with a real evidence pointer),command-center/mission/TODO_GRAPH.mdorWORK_PACKAGES.md's WP-ID/Status lines (open items),git log/branch/dirty state,FORGE_VERSION.json, and the newestforge-runs/*/doctor.json. Ten fixed sections: Mission · Why · Current state · Key decisions · Active constraints · Key file paths · Known gaps/limitations · Next actions · Evidence pointers · Honesty footer.check([--max-age-hours N])is a read-only staleness probe (for the doctor or a manual check).forge-bin/forge-snapshot-marker.cjs— the PreCompact hook target (matchersmanual+auto). Writes.claude/.forge-snapshot-due.jsonand immediately callsforge-snapshot.cjs'swrite()so a real skeleton exists even if the session ends before the next step runs. Never blocks compaction (always exits 0), never prints anything to stdout, never prints a secret.forge-bin/forge-snapshot-reinject.cjs— the SessionStart hook target, matchercompact. If the due-marker exists, prints a short (<= ~600 tokens) block — Mission + Current state + Next actions + an explicit instruction to refresh sections 3-9 — to stdout, which Claude Code re-injects directly into context (the one official re-injection point this whole system relies on). Then deletes the marker. No marker -> prints nothing, exits 0.forge-bin/forge-snapshot-settings.cjs— the one-time, idempotent.claude/settings.jsonMERGE helper used to wire the two hooks above without ever clobbering pre-existing hooks/keys (apply --target <path> --marker-command "<cmd>" --reinject-command "<cmd>" [--backup]).
Anti-drift (the core design decision)
- Section 3 ("Current state") is ALWAYS re-derived fresh from source-of-truth on every regeneration —
never patched forward from a previous snapshot. Changing
events.jsonlorTODO_GRAPH.mdbetween twowrite()calls changes the output; nothing is ever carried over except what section-1 explicitly preserves. - Section 1 ("Mission") is the one deliberate exception — preserved VERBATIM across regenerations. It is
read from an existing
<!-- MISSION:BEGIN -->...<!-- MISSION:END -->marker if the currentFORGE_SNAPSHOT.mdalready has one; else migrated verbatim from a pre-existing hand-written snapshot's own first##section (a one-time migration path so a hand-authored stopgap's mission survives the switch to this tool); else derived fromFORGE_MEMORY.md's latest status heading; else an honest, clearly-marked TODO for a human/agent to fill in — never guessed prose.
Size discipline
Target <= ~2000 tokens of prose (chars/4 heuristic — approximate, not a real tokenizer, and reported honestly
as approxTokens rather than presented as exact). Long things are paths, never inlined. Every generated
section (2..9 — Mission is exempt) that would exceed its own character budget is cut with an explicit
"(truncated — see <path>)" marker rather than growing unbounded.
Honesty
Every generated claim carries a real evidence pointer (a relative path, optionally with an event type/heading) or is explicitly marked in the Honesty footer's "unknown/missing" list — never a bare, unattributed assertion. No context-window percentage is ever fabricated or estimated anywhere in this system.
Wiring (opt-in, already applied 2026-07-29 — see HOOKS_OPT_IN.md for the live record)
- Project-local
.claude/settings.json: PreCompact (matchersmanual+auto) ->forge-snapshot-marker.cjs; SessionStart (matchercompact) ->forge-snapshot-reinject.cjs. - Global
~/.claude/settings.json: the same two events, appended alongside the 2 pre-existing global hooks (hotspot-lock, secret-scrub) and every other pre-existing entry — proven preserved byte-for-byte byforge-snapshot-settings.test.cjs's load-bearing safety suite. The global hook commands point at the GLOBAL minimal mirror (~/.claude/forge-bin/forge-snapshot-{marker,reinject}.cjs), which resolves the target project's root fromCLAUDE_PROJECT_DIR(or cwd) and dynamically requires that project's own.claude/forge-bin/forge-snapshot.cjs— a project with no Forge install degrades silently (no output, exit 0).
When to use
- Automatically: the wired PreCompact/SessionStart(compact) hooks fire on a real compaction.
- Manually:
/forge snapshot(phase boundary, or whenever the owner wants a fresh, evidenced snapshot without waiting for a compaction) ->node .claude/forge-bin/forge-snapshot.cjs write --reason phase. - Suggest
/compactwith a short focus note at a logical boundary (a phase just finished, or before an unrelated task) — around 60% context use — never in the middle of a task. node .claude/forge-bin/forge-snapshot.cjs check --max-age-hours 24to probe staleness (e.g. from a doctor pass or before a long unattended run).
Skills / commands
forge-bin/forge-snapshot.cjs (write/check), forge-bin/forge-snapshot-marker.cjs (PreCompact target),
forge-bin/forge-snapshot-reinject.cjs (SessionStart target), forge-bin/forge-snapshot-settings.cjs
(settings.json merge helper), .claude/FORGE_SNAPSHOT.md (the generated artifact — never hand-edit sections
2-10; edit only the text between the MISSION markers to change the Mission), .claude/.forge-snapshot-due.json
(transient marker, deleted on consumption).
Fan-out & flow
1 agent, no team. This is a deterministic, zero-dependency CLI + two small hook targets — not a
multi-agent task. Any Boss doing build/fix work can call write --reason phase directly at a natural
checkpoint.
Ship-readiness (unique)
Never fabricates a context percentage; never blocks compaction/session-start (both hook targets always exit 0); never prints a secret (FORGE_SNAPSHOT.md only ever holds paths/pointers/short evidenced text, never raw file bodies or credentials); the settings.json merge is proven idempotent and non-destructive by a dedicated test suite before being applied to the real global config; degrades silently in a project with no Forge install.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

