Agent skill

Strategic Compact

by affaan-m in affaan-m/ECC

임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.

MITAuto-check passed

Install Strategic Compact

skills CLI
$ npx skills add affaan-m/ECC --skill strategic-compact -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC strategic-compact --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/ko-KR/skills/strategic-compact .claude/skills/strategic-compact && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
strategic-compact
GitHub stars
277k
Used in
2 other repos
Token cost
~724 tokens
SKILL.md length
432 words
Files
1
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.

  • Works in 3 steps: 도구 호출 추적 -- 세션 내 도구 호출 횟수를 카운트 → 임계값 감지 -- 설정 가능한 임계값에서 제안 (기본값: 50회) → 주기적 알림 -- 임계값 이후 25회마다 알림
  • SKILL.md covers 활성화 시점, 전략적 컴팩션이 필요한 이유, 작동 방식 and Hook 설정, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Strategic Compact is an agent skill from affaan-m/ECC. 임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.

Its SKILL.md is about 720 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

Example prompts

  • “/strategic-compact”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 도구 호출 추적 -- 세션 내 도구 호출 횟수를 카운트
  2. 임계값 감지 -- 설정 가능한 임계값에서 제안 (기본값: 50회)
  3. 주기적 알림 -- 임계값 이후 25회마다 알림

What it can do on your machine

Read from SKILL.md and the folder at commit 2d515e4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • x.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Strategic Compact loads about 724 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 432 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~724

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 2d515e4, republished under its MIT licence (© affaan-m). 432 words, ~724 tokens.

Download SKILL.mdSave it as .claude/skills/strategic-compact/SKILL.md (or your agent's skills folder).
name
strategic-compact
description
임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.
origin
ECC

전략적 컴팩트 스킬

임의의 자동 컴팩션에 의존하지 않고 워크플로우의 전략적 지점에서 수동 /compact를 제안합니다.

활성화 시점

  • 컨텍스트 제한에 근접하는 긴 세션을 실행할 때 (200K+ 토큰)
  • 다단계 작업을 수행할 때 (조사 -> 계획 -> 구현 -> 테스트)
  • 같은 세션 내에서 관련 없는 작업 간 전환할 때
  • 주요 마일스톤을 완료하고 새 작업을 시작할 때
  • 응답이 느려지거나 일관성이 떨어질 때 (컨텍스트 압박)

전략적 컴팩션이 필요한 이유

자동 컴팩션은 임의의 지점에서 실행됩니다:

  • 종종 작업 중간에 실행되어 중요한 컨텍스트를 잃음
  • 논리적 작업 경계를 인식하지 못함
  • 복잡한 다단계 작업을 중단할 수 있음

논리적 경계에서의 전략적 컴팩션:

  • 탐색 후, 실행 전 -- 조사 컨텍스트를 압축하고 구현 계획은 유지
  • 마일스톤 완료 후 -- 다음 단계를 위한 새로운 시작
  • 주요 컨텍스트 전환 전 -- 다른 작업 시작 전에 탐색 컨텍스트 정리

작동 방식

suggest-compact.js 스크립트는 PreToolUse (Edit/Write)에서 실행되며 다음을 수행합니다:

  1. 도구 호출 추적 -- 세션 내 도구 호출 횟수를 카운트
  2. 임계값 감지 -- 설정 가능한 임계값에서 제안 (기본값: 50회)
  3. 주기적 알림 -- 임계값 이후 25회마다 알림

Hook 설정

플러그인으로 설치한 경우: 별도 설정이 필요 없습니다. 플러그인의 hooks/hooks.json이 이미 suggest-compact.js를 등록합니다(훅 ID pre:edit-write:suggest-compact, standard 및 strict 훅 프로파일에서 활성). 아래 블록을 ~/.claude/settings.json에 복사하지 마세요 — 플러그인 설치에는 ~/.claude/scripts/가 존재하지 않으며, 플러그인 훅을 중복하면 이중 실행이 발생합니다(${CLAUDE_PLUGIN_ROOT}는 사용자 settings.json에서 해석되지 않습니다).

수동 설치(./install.sh)인 경우 ~/.claude/settings.json에 추가합니다:

json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Edit",
        "hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
      },
      {
        "matcher": "Write",
        "hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
      }
    ]
  }
}

구성

환경 변수:

  • COMPACT_THRESHOLD -- 첫 번째 제안까지의 도구 호출 횟수 (기본값: 50)

컴팩션 결정 가이드

컴팩션 시기를 결정하기 위해 이 표를 사용하세요:

단계 전환컴팩션?이유
조사 -> 계획예조사 컨텍스트는 부피가 크고, 계획이 증류된 결과물
계획 -> 구현예계획은 TodoWrite 또는 파일에 있으므로 코드를 위한 컨텍스트 확보
구현 -> 테스트경우에 따라테스트가 최근 코드를 참조하면 유지; 포커스 전환 시 컴팩션
디버깅 -> 다음 기능예디버그 추적이 관련 없는 작업의 컨텍스트를 오염시킴
구현 중간아니오변수명, 파일 경로, 부분 상태를 잃는 비용이 큼
실패한 접근 후예새 접근을 시도하기 전에 막다른 길의 추론을 정리
Show full SKILL.md (139 more words)Show less

컴팩션에서 유지되는 것

무엇이 유지되는지 이해하면 자신 있게 컴팩션할 수 있습니다:

유지됨손실됨
CLAUDE.md 지침중간 추론 및 분석
TodoWrite 작업 목록이전에 읽은 파일 내용
메모리 파일 (~/.claude/memory/)다단계 대화 컨텍스트
Git 상태 (커밋, 브랜치)도구 호출 기록 및 횟수
디스크의 파일구두로 언급된 세밀한 사용자 선호도

모범 사례

  1. 계획 후 컴팩션 -- TodoWrite에서 계획이 확정되면 새로 시작하기 위해 컴팩션
  2. 디버깅 후 컴팩션 -- 계속하기 전에 에러 해결 컨텍스트 정리
  3. 구현 중간에는 컴팩션하지 않기 -- 관련 변경 사항의 컨텍스트 보존
  4. 제안을 읽기 -- Hook이 언제를 알려주고, 할지 여부는 당신이 결정
  5. 컴팩션 전에 기록 -- 컴팩션 전에 중요한 컨텍스트를 파일이나 메모리에 저장
  6. 요약과 함께 /compact 사용 -- 커스텀 메시지 추가: /compact Focus on implementing auth middleware next

관련 항목

  • The Longform Guide -- 토큰 최적화 섹션
  • 메모리 영속성 Hook -- 컴팩션에서 살아남는 상태를 위해
  • continuous-learning 스킬 -- 세션 종료 전 패턴 추출

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/ko-KR/skills/strategic-compact of affaan-m/ECC.

Open the folder on GitHubat commit 2d515e4

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in affaan-m/ECC, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Strategic Compact next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Strategic Compact compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Strategic Compact this skillaffaan-m/ECC277k2 repos~724Automated safety check: PassMIT
Cc Skill Strategic Compactsickn33/agentic-awesome-skills47k1 repos~1.1kAutomated safety check: PassMIT
Strategic Compactxu-xiang/everything-claude-code-zh2k—~570Automated safety check: PassMIT
Strategic Compactxu-xiang/everything-claude-code-zh2k—~296Automated safety check: PassMIT
Compactcatlog22/Claude-Code-Workflow2.1k—~3.2kAutomated safety check: PassMIT
Compactnessparcadei/Continuous-Claude-v33.9k1 repos~732Automated safety check: NotesMIT

Similar skills

  • Cc Skill Strategic Compact

    sickn33/agentic-awesome-skills

    Prepare a verified checkpoint before condensing an agent conversation at a phase boundary.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Strategic Compact

    xu-xiang/everything-claude-code-zh

    建议在逻辑间隔进行手动上下文压缩(Context Compaction),以便在任务阶段中保留上下文,而不是依赖任意的自动压缩。

    2k GitHub stars~570 tokensUpdated 7 mo ago
    Agent WorkflowsAuto-check passed
  • Strategic Compact

    xu-xiang/everything-claude-code-zh

    建议在逻辑间隔处进行手动压缩(Manual Compaction),以在整个任务阶段保持上下文(Context),而非随意的自动压缩。

    2k GitHub stars~296 tokensUpdated 7 mo ago
    Auto-check passed
  • Compact

    catlog22/Claude-Code-Workflow

    Compact current session memory into structured text for session recovery.

    2.1k GitHub stars~3.2k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Compactness

    parcadei/Continuous-Claude-v3

    Problem-solving strategies for compactness in topology. An agent skill from parcadei/Continuous-Claude-v3.

    3.9k GitHub starsUsed in 1 repo~732 tokens
    Research & ScienceAuto-check: notes
  • Wrap getTokenOptimizer().getCompactContext() to retrieve compacted ReasoningBank context for cost-analysis queries; report bridge-reported tokensSaved

    74k GitHub stars~657 tokensUpdated yesterday
    Auto-check: notes

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Strategic Compact

What does Strategic Compact do?

임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다. Strategic Compact is an agent skill from affaan-m/ECC. 임의의 자동 컴팩션 대신 논리적 간격에서 수동 컨텍스트 압축을 제안하여 작업 단계를 통해 컨텍스트를 보존합니다.

How do I install Strategic Compact in Claude Code?

Run `npx skills add affaan-m/ECC --skill strategic-compact -a claude-code`. Or copy the skill folder (docs/ko-KR/skills/strategic-compact in affaan-m/ECC) into .claude/skills/strategic-compact in your project. Claude Code loads it when a task matches its description.

How do I install Strategic Compact in Codex?

Run `npx skills add affaan-m/ECC --skill strategic-compact -a codex`. Or copy the skill folder (docs/ko-KR/skills/strategic-compact in affaan-m/ECC) into .agents/skills/strategic-compact in your project. Codex loads it when a task matches its description.

Can I use Strategic Compact in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill strategic-compact -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/strategic-compact, .gemini/skills/strategic-compact, .github/skills/strategic-compact and .opencode/skills/strategic-compact in your project.

What does Strategic Compact need to run?

SKILL.md names no scripts, command-line tools or credentials: Strategic Compact is instructions for the agent only.

Does Strategic Compact access the network?

SKILL.md names 1 domain. As links in the text: x.com. This is read from the text; nothing was executed.

Is Strategic Compact safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Strategic Compact use?

Strategic Compact is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Strategic Compact use?

About 724 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Strategic Compact?

Skills that share tags, products or a category with Strategic Compact: Cc Skill Strategic Compact (sickn33/agentic-awesome-skills, 47k stars), Strategic Compact (xu-xiang/everything-claude-code-zh, 2k stars), Strategic Compact (xu-xiang/everything-claude-code-zh, 2k stars) and Compact (catlog22/Claude-Code-Workflow, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Strategic Compact?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,673 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 11, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.