원클릭으로
strategic-compact
Promotes recurring feedback into the right skill, then guides /compact at phase boundaries.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Promotes recurring feedback into the right skill, then guides /compact at phase boundaries.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | strategic-compact |
| description | Promotes recurring feedback into the right skill, then guides /compact at phase boundaries. |
| when_to_use | Activate when the user types /strategic-compact, says "compact", "let's compact", "we've finished phase X what's next", or when at a clear phase boundary (PR merged, tests green, plan done) AND main-loop context is >50% full. Runs the skill-self-improvement pass against accumulated feedback memory before recommending. |
| disable-model-invocation | true |
| allowed-tools | Bash(ls:*), Bash(cat:*), Bash(grep:*), Bash(find:*), Bash(date:*), Bash(mkdir:*), Bash(bash ~/.claude/skills/strategic-compact/scripts/*), Read, Write, Edit, WebFetch |
/compact at a logical phase boundary with a paste-ready summary.The skill is disable-model-invocation: true — zero context cost until the user types /strategic-compact.
Skills on disk:
!ls -1 ~/.claude/skills/ 2>/dev/null
Subagents on disk:
!ls -1 ~/.claude/agents/ 2>/dev/null
Commands on disk:
!ls -1 ~/.claude/commands/ 2>/dev/null
Rules on disk:
!ls -1 ~/.claude/rules/ 2>/dev/null
Hook scripts on disk:
!ls -1 ~/.claude/hooks/ 2>/dev/null
Hooks + MCP + plugins configured in settings.json:
!bash ~/.claude/skills/strategic-compact/scripts/settings-features.sh
Today:
!date -u +%Y-%m-%dT%H:%M:%SZ
features-overview doc). Per references/claude-code-best-practices.md, the audit must cover the full extension surface, not just skills. Delegate to a subagent so the main loop's context stays small.AskUserQuestion prompts. Forked subagents CANNOT call AskUserQuestion. APPLY runs in the main loop.This skill does NOT use context: fork in frontmatter (that would forbid AskUserQuestion across the whole run). Instead the body spawns a subagent for SCAN only, then continues in main-loop context for APPLY.
SCAN — Spawn a general-purpose subagent with this prompt:
Read
~/.claude/skills/strategic-compact/workflows/self-improvement-pass.mdand execute it end-to-end. Your final output must be the candidate-list Markdown described in the "Output contract" section. ALSO write the same content to~/.claude/tmp/strategic-compact-candidates-<UTC-timestamp>.md(create the dir if missing). Return only the candidate list — no prose preamble.
Wait for the agent return. Save the file path it created.
APPLY — Read ~/.claude/skills/strategic-compact/workflows/apply-edits.md and execute it against the candidate list (prefer the subagent return; fall back to the file if truncated). Use AskUserQuestion for each candidate.
DECIDE — Read ~/.claude/skills/strategic-compact/workflows/compaction-decision.md and emit a compaction recommendation with a paste-ready /compact <summary> line.
If the SCAN phase returns an empty candidate list AND the self-healing sweep found nothing, skip directly to DECIDE.
<skip_when>
feedback_* memories exist AND the session contained no corrections worth promoting → SCAN will report empty; skip to DECIDE.<workflows_index>
| Workflow | Role |
|---|---|
workflows/self-improvement-pass.md | SCAN — runs in a delegated subagent; produces candidate list |
workflows/apply-edits.md | APPLY — runs in main loop; per-candidate y/n prompts + Edit + shrink source |
workflows/compaction-decision.md | DECIDE — phase-boundary table + paste-ready /compact summary |
| </workflows_index> |
<references_index>
| Reference | When to read |
|---|---|
references/promotion-quality-gates.md | During SCAN step 7b — every candidate must clear all 6 gates |
references/self-healing-checks.md | During SCAN step 1c (early) and APPLY late-sweep |
references/claude-code-best-practices.md | Pre-SCAN freshness check + drift-watch surfacing |
| </references_index> |
<scripts_index>
The SCAN agent runs these EVERY invocation. Each replaces a multi-step inline bash block in the workflow doc — one tool call instead of six. Both emit === SECTION === prefixes for cheap parsing.
| Script | Replaces | Run during |
|---|---|---|
scripts/scan-inventory.sh | Steps 1, 1d, 1e, 1f, 1g, 1h, 1i (extension-universe dump) | Step 1 of SCAN |
scripts/self-healing-sweep.sh | Checks 1, 2, 4, 7 from references/self-healing-checks.md (mechanical-only) | Step 1c of SCAN |
scan-inventory.sh is also redundant when the SKILL.md <universe> block's dynamic context injection already ran — skip it in that case. Useful for fresh-fork invocations.
self-healing-sweep.sh honors SCAN_STRICT_XREF=1 to disable the known-optional-path filter (debugging only). Honors MEMORY_DIR=<path> to override project-memory auto-detection.
</scripts_index>
<success_criteria>
~/.claude/tmp/./compact <summary> line).Testing guidance for pytest, Jest/Vitest, Go, and TDD. Use when writing tests or improving coverage.
Methodical debugging with evidence and hypothesis testing. Use when troubleshooting fails or root cause is unclear.
Create new skills, commands, hooks, or subagents. Use when adding capabilities to Claude Code or Cursor.
PostgreSQL patterns for queries, schema, indexing, security. Use when writing SQL, designing schema, or adding indexes.
Reviews a GitHub PR diff for correctness, security, tests, architecture. Use when asked to review a PR or pull request.
Orchestrates the Ralph pipeline (spec-interview → PRD → execute). Use for features needing autonomous implementation.