/skill-forge-essentials:session-guardfrom skill-forge-essentials
Use when a long session shows drift: the agent contradicts an earlier decision, breaks a rule it followed before, lets naming or style conventions slide, loses context after compaction, or lets task scope grow. Re-anchors on the project's rule files and writes a checkpoint so work continues on solid ground.
Ships in skill-forge-essentials. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Long sessions can drift: early decisions fall out of context, compaction summarizes away rules that were only stated in conversation, and output starts to contradict itself. This skill reacts to those signals. It re-reads the source of truth, writes a checkpoint, and continues. It never halts work on a tool-call count alone.
Trigger on a drift signal, not on task size:
| Signal | Example | Action |
|---|---|---|
| Contradicts an earlier decision | Renames a module the user chose to keep | VERIFY, then CHECKPOINT |
| Breaks a rule it followed earlier | Adds console.log after the user banned it | RE-ANCHOR |
| Convention drift | snake_case files appear in a kebab-case tree | RE-ANCHOR |
| Compaction happened | Earlier turns are summarized, or the user ran a compact command | RE-ANCHOR, then CHECKPOINT |
| Stale state | A file read differs from what you remembered | RE-READ, don't trust memory |
| Scope growth | The task has picked up goals the user never asked for | CHECKPOINT, ask before expanding |
A long session with none of these signals needs no intervention.
AGENTS.md, CLAUDE.md, CONTEXT.md, or the
equivalent). Don't rely on what you remember of them.Find the decision you are contradicting (in a file, commit, or the user's message). If the earlier decision stands, revert the drift. If the user changed it, follow the newer instruction and say so.
Write a short checkpoint, then keep working:
Put the checkpoint in a file the user expects (a handoff or progress note), or in your reply if the project has no such file. Ask before creating new files outside the task.
Offer a fresh session only when the checkpoint shows the remaining work is a separate task. That is a suggestion to the user, never a reason to stop mid-task.
Compaction keeps recent messages and drops older conversation detail: decisions made early, rules stated only in chat, and the contents of earlier tool output. What a specific harness preserves varies; needs measurement for your setup.
Keep rules that matter in files the agent can re-read (AGENTS.md, CLAUDE.md,
CONTEXT.md), not only in conversation.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub shotcowboystyle/ag-skills --plugin skill-forge-essentials3 skills in this plugin
/ai-debt-detectorUse after generating code, after accepting AI suggestions, or when reviewing AI-written modules. Also use when code works but feels brittle, when error handling seems thin, when orphaned resources or missing cleanup are suspected, or when the agent claims done but hidden debt may exist. Catches the specific failure patterns AI agents produce that humans would not./visual-edit-precisionUse when making UI/frontend changes guided by visual context, when the user selects elements visually, draws annotations, or provides screenshots alongside change requests. Also use when editing components where spatial context (element identity, DOM references, layout data) supplements text instructions.Other plugins' skills for the same job