claude-forge: Skill for Claude Code

.claude/skills/forge-snapshot/SKILL.md

forge-snapshot is a skill for Claude Code from ForgeyClap/claude-forge. It costs 42 tokens per session (1,893 once invoked), scanned B, original, MIT.

A system for creating a project snapshot from its source files so agents can recover the current mission and decisions after the conversation is shortened or restarted.

In plain words
What is it for?
It helps regenerate a FORGESNAPSHOT.md file during context compaction, phase boundaries, or an explicit snapshot request.
Why use it?
It reduces the chance that important project context is lost when a session approaches its context limit or reaches a major phase change.

Skill for Claude Code

Written for Claude Code: PreCompact hook event. Also seen: reads .claude/ paths; mentions Claude Code.

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

Reuse

Borrowing it

Nothing to install: this file belongs to ForgeyClap/claude-forge. 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/ForgeyClap/claude-forge/main/.claude/skills/forge-snapshot/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ForgeyClap/claude-forge

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 forge-snapshot

README.md
[![agentmods](https://agentmods.dev/badge/skills/forgeyclap/claude-forge/forge-snapshot/github.svg)](https://agentmods.dev/skills/forgeyclap/claude-forge/forge-snapshot)
Your own site
<a href="https://agentmods.dev/skills/forgeyclap/claude-forge/forge-snapshot"><img src="https://agentmods.dev/badge/skills/forgeyclap/claude-forge/forge-snapshot/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 forge-snapshot

Your own site · 80×15
<a href="https://agentmods.dev/skills/forgeyclap/claude-forge/forge-snapshot"><img src="https://agentmods.dev/badge/skills/forgeyclap/claude-forge/forge-snapshot.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,893 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00042 $0.01893
Opus 5 $0.00021 $0.00946
Sonnet 5 $0.00008 $0.00379
Haiku 4.5 $0.00004 $0.00189

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

Security

Grade B, and why

forge-snapshot scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **Global** `~/.claude/settings.json`: the same two events, appended alongside the 2 pre-existing global
.claude/skills/forge-snapshot/SKILL.md · 110 lines

How it starts

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

Forge playbook — Snapshot (context-continuity snapshot system)

Self-improvement substrate (wp-skill-evals, 2026-07-31): 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 (2026-07-29): "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

  1. forge-bin/forge-snapshot.cjs — the generator. write([--run <id>] [--reason ...]) regenerates .claude/FORGE_SNAPSHOT.md from 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's events.jsonl (done/in-progress buckets, each with a real evidence pointer), command-center/mission/TODO_GRAPH.md or WORK_PACKAGES.md's WP-ID/Status lines (open items), git log/branch/dirty state, FORGE_VERSION.json, and the newest forge-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).
  2. forge-bin/forge-snapshot-marker.cjs — the PreCompact hook target (matchers manual+auto). Writes .claude/.forge-snapshot-due.json and immediately calls forge-snapshot.cjs's write() 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.
  3. forge-bin/forge-snapshot-reinject.cjs — the SessionStart hook target, matcher compact. 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.
  4. forge-bin/forge-snapshot-settings.cjs — the one-time, idempotent .claude/settings.json MERGE 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]).

Read the full file on GitHub · 110 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 110 lines · 42 tokens per session scan B 5a819b9926e7

Subscribe to this mod's changes

forge-snapshot is a skill published in the GitHub repository ForgeyClap/claude-forge (2 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 1,893 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

harness-init

Scan the current repository and generate a tailored navigation harness (root CLAUDE.md index, read-on-demand .claude/repo-index/.md deep indexes, .claude/meta/navigation.md, and a .claude/harness/profile.md consumed by /pr and /ticket). Runs autonomously: infers stack, areas, verify commands, and conventions, then…

waqas1412/claude-harness · 0 tokens

harness-distill

Distill durable learnings from recent sessions and code-review corrections into proposed memory facts, CLAUDE.md rule lines, or skill Gotchas. Use periodically, or after a run that surfaced recurring friction, corrections you keep repeating, or a gotcha worth capturing. It clusters candidates, adversarially verifies…

waqas1412/claude-harness · 117 tokens

hive.context-preservation

Proactively extract critical values from tool results into working notes before automatic context pruning destroys them.

aden-hive/hive · 24 tokens

hive.note-taking

Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.

aden-hive/hive · 30 tokens

caveman-compress

Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or…

stevesolun/ctx · 77 tokens

continuous-learning-v2

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

sangrokjung/claude-forge · 33 tokens