clear-prep

clear-prep is a skill for Claude Code from davistroy/claude-marketplace. It costs 114 tokens per session (2,134 once invoked), scanned A, original, MIT.

A preparation tool for saving a coding session's unfinished work before context is cleared or compressed. It updates project notes and state files, then creates a prompt that tells the next session what happened and what to do next.

In plain words
What is it for?
Use it before /clear or compaction to update the lab notebook, memory files, project rules, and changelog, or to generate a resume prompt without writing changes.
Why use it?
A context reset can erase details that exist only in the conversation. This preserves decisions, progress, and in-flight tasks so work can continue without reconstructing the session.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/davistroy/dev/personal/claude-marketplace.

Part of the personal-plugin plugin — 29 skills, 23 commands, 10 agents, 2 hooks shipped together

Good fit Use it before /clear or compaction to update the lab notebook, memory files, project rules, and changelog, or to generate a resume prompt without writing changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add davistroy/claude-marketplace
Claude Code
/plugin install personal-plugin

Made for: Claude Code.

Or install personal-plugin, the plugin that ships this one along with the rest of its 29 skills, 23 commands, 10 agents, 2 hooks.

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 clear-prep

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/davistroy/claude-marketplace/clear-prep"><img src="https://agentmods.dev/badge/skills/davistroy/claude-marketplace/clear-prep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,134 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.00114 $0.02134
Opus 5.5 $0.00046 $0.00854
Sonnet 5.5 $0.00023 $0.00427
Haiku 4.5 $0.00011 $0.00213

Measured 1mo ago against content hash d69ced470196, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

clear-prep 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 1mo 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.

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.

plugins/personal-plugin/skills/clear-prep/SKILL.md · 137 lines

How it starts

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

Clear Prep

Prepare the project to survive a context reset. When you are about to run /clear (or a compaction is imminent), the volatile session state — what you just did, what is half-done, what the next step is — lives only in conversation context and is lost the moment context clears. This skill persists that state into the project's durable documents, then hands you a ready-to-paste resume prompt so the next session continues seamlessly.

Two guarantees:

  1. Nothing in-flight is lost — every persistent document that should reflect the current state is updated before you clear.
  2. The next session starts oriented — the resume prompt tells a zero-context Claude exactly what to read, where things stand, and what to do next.

This skill writes only to documentation/state files (all git-recoverable). It does NOT commit, push, or clear context — you do that.

Input

Arguments: $ARGUMENTS

Optional:

  • A short note on the intended next task (e.g., finish the CVE remediation PR) — sharpens the "next task" line in the resume prompt.
  • --no-write — skip document updates; only generate the resume prompt from current state (dry-run / read-only).

Dynamic context available:

  • !`git status -s 2>/dev/null || echo "(not a git repository)"` — uncommitted changes
  • !`git log --oneline -8 2>/dev/null || echo "(not a git repository)"` — recent commits
  • !`git branch --show-current 2>/dev/null || echo "(not a git repository)"` — active branch

Instructions

Execute the phases in order. Phase 2 is skipped when --no-write is passed.

Phase 1: Assess Session State

Reconstruct what this session actually changed and what remains open. Gather:

  1. Git delta — run git status -s, git branch --show-current, and git log --oneline -8. Identify: uncommitted/untracked files, current branch, whether work has been committed or is still loose in the working tree.
  2. What was done this session — from the conversation, summarize the concrete work: decisions made, files created/edited, problems solved, experiments run. Be specific (files, versions, PR numbers), not vague.
  3. What is in-flight — anything half-finished: a partially written function, an unmerged PR, a plan phase mid-execution, an unanswered question, a failing test.
  4. The single next action — the one most important thing the next session should do first. Prefer the argument note if the user gave one.
  5. Orientation surface — detect which durable documents this project uses so the resume prompt can point at them:
    • LAB_NOTEBOOK.md (Decision Log, Open Action Items, most recent entry, Current Baseline)
    • memory/MEMORY.md and its topic files (locate the memory dir; on this repo it is <repo>/memory/ or the per-project ~/.claude/projects/.../memory/)
    • CLAUDE.md, IMPLEMENTATION_PLAN.md, CHANGELOG.md, README.md, BRIEF.md, docs/

Read the full file on GitHub · 137 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. 1mo ago First seen · 137 lines · 114 tokens per session scan A d69ced470196

Subscribe to this mod's changes

clear-prep is a skill published in the GitHub repository davistroy/claude-marketplace (5 stars, last pushed 18d ago), licensed MIT. It adds 114 tokens to every session and 2,134 once invoked, about $0.0005 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-09-04.

Related

Other skills, from other repositories

Migrate

Intakes external content (notes, CLAUDE.md, Cursor rules, Obsidian/Notion/Apple Notes exports), classifies chunks against the LifeOS taxonomy, and commits with provenance after confidence-tiered approval. USE WHEN /migrate, migrate content, import from other LifeOS, bring in old notes, import Cursor rules, import…

danielmiessler/LifeOS · 104 tokens

Cortex

LifeOS memory, prior-session recall, and learning capture. USE WHEN capture this learning, document this learning, what did we learn recently, recent learnings, cortex, knowledge, knowledge base, search knowledge, what do we know about, archive, harvest, knowledge status, develop note, add to knowledge, add a people…

danielmiessler/LifeOS · 184 tokens

Profile

View, edit, or clear the LifeOS User Model (PRINCIPALIDENTITY.md) — persistent identity context loaded at session startup. Three intents: View, Edit (identity, goals, constraints, preferences), Clear (reset). Read by Algorithm OBSERVE and skills for personalization. USE WHEN profile, show profile, view profile, who am…

danielmiessler/LifeOS · 108 tokens

wiki-dashboard

Create dynamic, queryable Obsidian dashboard views using Bases or Dataview. Use for auto-updating tables, indexes, or structured views of vault content; not for ordinary question answering.

Ar9av/obsidian-wiki · 42 tokens

relevance-coarse-filter

Cheap, high-recall first-pass filter that removes obvious junk from a detector candidate pool before expensive story-origin research and PR judgment. Decides keep, monitoronly, or reject — never ranks, writes angles, verifies dates, or decides whether to pitch.

elvisun/newsjack · 57 tokens

session-compact

AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction.

codeaholicguy/ai-devkit · 39 tokens