بنقرة واحدة
compact
Create a token-efficient state snapshot for context preservation during long sessions.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create a token-efficient state snapshot for context preservation during long sessions.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Write a structured handoff at session end. Preserves context so the next agent can resume without human briefing. Invoke before ending any feature session longer than 30 minutes.
Multi-perspective code review against project standards with P1/P2/P3 severity classification. Works in Claude Code (Agent + optional GitHub MCP) and Cursor (Task subagents + gh/git). Use when the user invokes /review, asks for a PR or diff review, or wants a standards-aligned review with severity tags.
Multi-perspective code review (P1/P2/P3) for Cursor: inline checklists plus three parallel Task subagents (perf-auditor, security-reviewer, simplicity-reviewer with combined data-integrity prompt). Use when the user invokes /review, asks for a PR review, or wants repo-standard findings with severity.
Create well-formatted git commits following conventional commit standards.
Red→green→refactor discipline for new behavior — forces a failing test before implementation and a passing test before any claim of done.
Create or manage a git worktree for isolated parallel development — lets multiple agents work in the repo simultaneously without branch collisions.
| name | compact |
| description | Create a token-efficient state snapshot for context preservation during long sessions. |
Create a token-efficient state snapshot for context preservation during long sessions. This is the creation side of context recovery — /resume is the reconstruction side.
/compact [--save]
--save: Write the snapshot to prd/tasks/{feature}_compact.md (default: display only)| Skill | Purpose | Output | When to Use |
|---|---|---|---|
/checkpoint | Update task tracking with progress details | Full task file update | Every 30-60 min during development |
/compact | Create minimal recovery snapshot | Dense state summary | Before context limit, before long breaks |
/checkpoint maintains detailed progress. /compact creates the minimum context needed to reconstruct working state after full context loss.
When this skill is invoked:
Autonomy:
Discipline:
Run in parallel:
git branch --show-current
git log --oneline -10
git diff --stat
git diff --cached --stat
Read in parallel:
prd/00_index.md — find active featuresprd/tasks/{feature}_tasks.md — if it existsdocs/decisions/ — any ADRs created this sessionCreate a dense state summary with these sections:
# Compact: {Feature Name}
**Branch:** {branch}
**Date:** {YYYY-MM-DD HH:MM}
**Session duration:** ~{estimated time}
## State
{2-3 sentences: what exists now that didn't before this session}
## Decisions Made
{Numbered list of decisions with one-line rationale each}
1. {Decision}: {why}
2. {Decision}: {why}
## What's Done
{Bulleted list of completed work — file paths, not descriptions}
- [x] {file or feature}
- [x] {file or feature}
## What's In Progress
- [ ] {current task}: {where it stands}
## What's Blocked
- {blocker}: {what's needed to unblock}
## Next Steps (Priority Order)
1. {First thing to do when resuming}
2. {Second thing}
3. {Third thing}
## Key Files
{Files that must be read to understand current state}
- `{file}` — {one-line role}
If --save is specified:
prd/tasks/{feature}_compact.mdprd/tasks/{feature}_compact.md"Otherwise:
/compact --save to persist this snapshot"Use /compact:
Don't use for:
/checkpoint already captured recent progress (use /compact only when you need a more condensed format)