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 $0.00057 $0.01067
Sonnet 5 $0.00023 $0.00427
Haiku 4.5 $0.00011 $0.00213

Measured 8d ago against content hash d69ced470196, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 8d 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. 8d 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 5d ago), licensed MIT. It adds 114 tokens to every session and 2,134 once invoked, about $0.0006 per session on Opus 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

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

Migrate

Intakes external content, classifies chunks against LifeOS taxonomy, commits with provenance. Sources: .md/.txt, stdin, LifeOS dirs, CLAUDE.md/Cursor/OpenAI Custom Instructions, Obsidian/Notion/Apple Notes exports. MigrateScan classifies → routing table. MigrateApprove with…

danielmiessler/LifeOS · 158 tokens

daily-briefing

Proactive daily briefing that fires on a recurring schedule, pulls recent memory and workspace context, composes a structured summary (action items, progress, radar, next steps), and delivers it to all active channels. Enable with a time like "set up my daily briefing at 9am". Disable, reschedule, or check status at…

vellum-ai/vellum-assistant · 75 tokens

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so Claude can answer questions on your team's behalf. Team-scope sibling to second-brain (which is personal-scope). Seven modes — capture (drop something into the right structured dir), compile (process into wiki…

coreyhaines31/makerskills · 322 tokens

email-assistant

Read, search, draft, and send emails via Himalaya CLI or Python IMAP/SMTP. Requires email account configuration.

fuyuxiang/echo-agent · 29 tokens

calendar

Manage calendar events via CalDAV (Google/iCloud/Nextcloud) or local ICS files. View, create, and query events.

fuyuxiang/echo-agent · 29 tokens