affaan-m/ECC

strategic-compact

任意の自動コンパクションではなく、タスクフェーズを通じてコンテキストを保持するための論理的な間隔での手動コンパクションを提案します。

65Collecting
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/strategic-compact"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn strategic-compact's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: 任意の自動コンパクションに依存するのではなく、ワークフローの戦略的なポイントで手動の/compactを提案します。

npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/strategic-compact"
Check the pinned source

Best fit

  • 任意の自動コンパクションではなく、タスクフェーズを通じてコンテキストを保持するための論理的な間隔での手動コンパクションを提案します。

Bring this context

  • A concrete task that matches the documented purpose of strategic-compact.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned strategic-compact instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read strategic-compact through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

なぜ戦略的コンパクションか?

自動コンパクションは任意のポイントでトリガーされます: - 多くの場合タスクの途中で、重要なコンテキストを失う - タスクの論理的な境界を認識しない - 複雑な複数ステップの操作を中断する可能性がある

SKILL.md · なぜ戦略的コンパクションか?
多くの場合タスクの途中で、重要なコンテキストを失うタスクの論理的な境界を認識しない複雑な複数ステップの操作を中断する可能性がある
02

仕組み

suggest-compact.jsスクリプトはPreToolUse(Edit/Write)で実行され:

SKILL.md · 仕組み
ツール呼び出しを追跡 - セッション内のツール呼び出しをカウント閾値検出 - 設定可能な閾値で提案(デフォルト:50回)定期的なリマインダー - 閾値後25回ごとにリマインド
03

フック設定

プラグインとしてインストール済みの場合:設定は不要です。プラグインの hooks/hooks.json が既に suggest-compact.js を登録しています(フック ID pre:edit-write:suggest-compact、standard と strict フックプロファイルで有効)。下のブロックを /.claude/settings.json にコピーしないでください — プラグインインストールでは /.claude/scripts/ は存在せず、プラグインフックを重複させると二重実行になります。

SKILL.md · フック設定
プラグインとしてインストール済みの場合:設定は不要です。プラグインの hooks/hooks.json が既に suggest-compact.js を登録しています(フック ID pre:edit-write:suggest-compact、standard と strict フックプロファイルで有効)。下のブロックを /.claude/settings.json にコピーしないでください — プラグインインストールでは /.cla…手動インストール(./install.sh)の場合、/.claude/settings.json に追加:
04

設定

環境変数: - COMPACTTHRESHOLD - 最初の提案前のツール呼び出し(デフォルト:50)

SKILL.md · 設定
COMPACTTHRESHOLD - 最初の提案前のツール呼び出し(デフォルト:50)環境変数: - COMPACTTHRESHOLD - 最初の提案前のツール呼び出し(デフォルト:50)
05

ベストプラクティス

1. 計画後にコンパクト - 計画が確定したら、コンパクトして新しくスタート 2. デバッグ後にコンパクト - 続行前にエラー解決コンテキストをクリア 3. 実装中はコンパクトしない - 関連する変更のためにコンテキストを保持 4. 提案を読む - フックはいつを教えてくれますが、するかどうかは自分で決める

SKILL.md · ベストプラクティス
計画後にコンパクト - 計画が確定したら、コンパクトして新しくスタートデバッグ後にコンパクト - 続行前にエラー解決コンテキストをクリア実装中はコンパクトしない - 関連する変更のためにコンテキストを保持

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use strategic-compact to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned strategic-compact source to [task]. Pay particular attention to these source sections: “なぜ戦略的コンパクションか?”, “仕組み”, “フック設定”, “設定”, “ベストプラクティス”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current strategic-compact result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “なぜ戦略的コンパクションか?” has been checked.

The source section “仕組み” has been checked.

The source section “フック設定” has been checked.

The source section “設定” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does strategic-compact do?

任意の自動コンパクションに依存するのではなく、ワークフローの戦略的なポイントで手動の/compactを提案します。

How do I start using strategic-compact?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/strategic-compact". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
234,327
Repository forks
35,711
Quality
65/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

65/100
Documentation18/30
Specificity14/25
Maintenance18/20
Trust signals15/25
View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

Strategic Compactスキル

任意の自動コンパクションに依存するのではなく、ワークフローの戦略的なポイントで手動の/compactを提案します。

なぜ戦略的コンパクションか?

自動コンパクションは任意のポイントでトリガーされます:

  • 多くの場合タスクの途中で、重要なコンテキストを失う
  • タスクの論理的な境界を認識しない
  • 複雑な複数ステップの操作を中断する可能性がある

論理的な境界での戦略的コンパクション:

  • 探索後、実行前 - 研究コンテキストをコンパクト、実装計画を保持
  • マイルストーン完了後 - 次のフェーズのために新しいスタート
  • 主要なコンテキストシフト前 - 異なるタスクの前に探索コンテキストをクリア

仕組み

suggest-compact.jsスクリプトはPreToolUse(Edit/Write)で実行され:

  1. ツール呼び出しを追跡 - セッション内のツール呼び出しをカウント
  2. 閾値検出 - 設定可能な閾値で提案(デフォルト:50回)
  3. 定期的なリマインダー - 閾値後25回ごとにリマインド

フック設定

プラグインとしてインストール済みの場合:設定は不要です。プラグインの hooks/hooks.json が既に suggest-compact.js を登録しています(フック ID pre:edit-write:suggest-compactstandardstrict フックプロファイルで有効)。下のブロックを ~/.claude/settings.json にコピーしないでください — プラグインインストールでは ~/.claude/scripts/ は存在せず、プラグインフックを重複させると二重実行になります。

手動インストール./install.sh)の場合、~/.claude/settings.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)

ベストプラクティス

  1. 計画後にコンパクト - 計画が確定したら、コンパクトして新しくスタート
  2. デバッグ後にコンパクト - 続行前にエラー解決コンテキストをクリア
  3. 実装中はコンパクトしない - 関連する変更のためにコンテキストを保持
  4. 提案を読む - フックはいつを教えてくれますが、するかどうかは自分で決める

関連

  • The Longform Guide - トークン最適化セクション
  • メモリ永続化フック - コンパクションを超えて存続する状態用
Source repo
affaan-m/ECC
Skill path
docs/ja-JP/skills/strategic-compact/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected