bug-fix
Bug-fixing workflow that coordinates diagnosis, test-driven reproduction, root-cause analysis, and targeted fixes. Use when the…
Pre-compaction housekeeping. Walks a checklist (persistent memory updates, git hygiene, trash cleanup) plus an open-judgment audit, produces an SBAR with a go/no-go recommendation, and emits a copy-pasteable resume prompt for the post-compaction agent if work remains. Run this
Claude Code
$ npx -y skills add chrisallenlane/claude-swe-workflows --skill pre-compact --agent claude-code
Codex
$ npx skills add chrisallenlane/claude-swe-workflows --skill pre-compact -a codex -y
Cursor
$ npx skills add chrisallenlane/claude-swe-workflows --skill pre-compact -a cursor -y
Gemini CLI
$ npx skills add chrisallenlane/claude-swe-workflows --skill pre-compact -a gemini-cli -y
GitHub Copilot
$ npx skills add chrisallenlane/claude-swe-workflows --skill pre-compact -a github-copilot -y
OpenCode
$ npx skills add chrisallenlane/claude-swe-workflows --skill pre-compact -a opencode -y
Windsurf
$ npx skills add chrisallenlane/claude-swe-workflows --skill pre-compact -a windsurf -y
name: pre-compact description: Pre-compaction housekeeping. Walks a checklist (persistent memory updates, git hygiene, trash cleanup) plus an open-judgment audit, produces an SBAR with a go/no-go recommendation, and emits a copy-pasteable resume prompt for the post-compaction agent if work remains. Run this immediately before /compact. model: opus
The user is about to run `/compact`. Compaction destroys conversation context. Anything important from this session that is not persisted somewhere durable — memory files, commits, tickets, code, the issue tracker — is lost.
This skill is the last-chance pass to capture session state. Walk a fixed checklist as a floor, then use judgment for anything the checklist does not anticipate, and end with an SBAR-formatted go/no-go report.
it goes into persistent memory now. If a change should be in the project, it gets committed (with permission). If an artifact is trash, it gets deleted.
something is trash, abandoned, or important, ask the user.
behalf without per-invocation permission. Standing rules from CLAUDE.md still apply.
also use judgment to spot session-specific cleanup the checklist cannot anticipate.
Updating persistent memory is the core reason this skill exists. The user invokes `/pre-compact` *because* they want memory written before compaction. Do not skip this step or treat it as conditional. Follow whatever memory conventions are documented in the user's global or project CLAUDE.md (auto-memory directory, project notes, etc.).
Re-scan the session for facts worth saving across conversations. Look for:
user confirmed worked. Capture the *why* the user gave, not just the rule.
decisions, stakeholder context. Convert relative dates to absolute ones.
channels, docs the user mentioned
For each candidate:
than writing a duplicate.
code, or ephemeral to this conversation.
(architecture, conventions, fix recipes, ephemeral state).
Run `git status` and assess:
whether to commit. If yes, draft a commit message and ask for approval before running `git commit`.
survives compaction, so the *files* are not at risk — but the *context* about what is in flight may be. Either commit as WIP, or capture the in-flight state in the SBAR.
work product that should be tracked.
mid-rebase, mid-merge, conflicts) so the user is aware before compacting.
Do not commit or stage on the user's behalf without explicit per-invocation permission. Match the scope of any granted permission exactly.
Identify candidate trash:
`*.bak`, ad-hoc test scripts, debug dumps)
`tmp_*`, `nohup.out`)
For each candidate:
not delete.
A false delete loses the user's work-in-progress. A false retain costs nothing. Bias accordingly.
Walk the session and look for anything else that would be hard to reconstruct from `git log` + persistent memory + the issue tracker after compaction. Examples (non-exhaustive — the point of this step is to think past the checklist):
ticket, commit message, code comment, or memory
options proposed but not chosen
state
servers, watchers) that the user may have forgotten about
context is lost
For each item: either persist it now (memory, ticket, comment) or flag it explicitly in the SBAR.
Per the user's session handoff format:
work right now
what surprised
— *verified* (ran the command, read the file), *inferred* (reasoned from observation), or *recalled* (training knowledge, possibly stale)
at risk.
user (commit a staged change, answer a pending question); after that, compaction is fine.
A system of composable software engineering workflows for Claude Code. Plan projects, implement tickets, and run quality passes — from a single ticket to a multi-batch project, using the same layered architecture.
Bug-fixing workflow that coordinates diagnosis, test-driven reproduction, root-cause analysis, and targeted fixes. Use when the…
Proactive bug-hunting workflow. Assesses codebase risk through complexity, coverage, and structural analysis, then spawns focused…
Multi-ticket batch workflow. Takes a batch of tickets, plans execution order, implements each via /implement in autonomous mode,…
Full-lifecycle project workflow. Takes batched tickets, implements via /implement-batch, runs smoke tests, then executes a…
Iterative development workflow that coordinates implementation, refactoring, QA, and documentation agents to complete features…
Autonomous bug-elimination loop. Iteratively invokes /bug-hunt and /implement-batch until findings converge below an…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.