s2005/skill_state/tree/main/plugin
skill-state
SKILL.state を実装する Claude Code function-hook プラグイン。明示的で JSON-schema 検証済みの実行状態によって対象外でないツール呼び出しを制御し、追記のみの会話履歴を毎ターン圧縮フレームに置き換えます。長期実行のスキル向けです。
この mod について
このプラグインは Claude Code 内に1つのツール(skill_state_update)と1つのコマンド(/skill-state)を登録します。追記のみのチャット履歴に頼る代わりに、モデルは検証済みの状態オブジェクトを維持します。対象外リストにないすべてのツール呼び出しは、その正確な呼び出し名を指定する状態更新に束縛されなければなりません。各ターンの終わりには、会話をフレーム(objective、procedure、current state、step)と直近数ターンに圧縮します。コマンドは start(software や ctf などの同梱ドメイン、または設定パス)、new(6つの質問からドメイン設定を作成)、status、stop/resume、reset を扱います。hook モジュールと依存関係のない lib コードはすべてプロセス内で動作し、ネットワーク要求もパッケージのインストールも行いません。読み取り元は同梱またはユーザー指定のドメイン設定で、書き込みは /skill-state new で確認した後の domains/<name>.json に限られます。実行時の記録はセッションのプラグイン状態とプラグインストアにセッション id をキーとして保持します。サブエージェントには影響しません。MIT ライセンスです。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add s2005/skill_state claude plugin install skill-state
原文 / README
skill-state
SKILL.state (arXiv:2608.26263) for Claude Code: an explicit, validated execution state that replaces append-only conversation history for long-horizon skills. It is a Claude Code function-hook plugin and needs a Claude Code build with function hooks.
While the runtime is active:
- the model keeps its state through the
skill_state_updatetool, validated against the domain's JSON schema; - every tool call outside the domain's exempt list must first be bound by a state update naming that exact call;
- at the end of each turn the conversation is replaced by a frame (objective, procedure, current state, step) followed by the last few turns.
Commands
| Command | What it does |
| ------- | ------------ |
| /skill-state start <domain\|path> | Starts a runtime from a bundled domain (software, ctf) or a domain config file. The next prompt becomes the objective. |
| /skill-state new <name> | Builds a domain config from six questions and writes it to domains/<name>.json in this plugin folder. |
| /skill-state status | Shows the domain, objective, step, pending action, state size and token usage. |
| /skill-state stop / resume | Turns gating and compaction off or back on, keeping the state. |
| /skill-state reset | Returns to the initial state at step 0. |
What the plugin runs, reads and writes
- Runs only the TypeScript hooks module
hooks/register.tsand the dependency-free code inlib/, inside Claude Code. It starts no processes and installs no packages. - Makes no network requests and sends no data anywhere.
- Reads domain config files: the bundled ones in
domains/, or a path you pass to/skill-state start. - Writes
domains/<name>.jsononly when you confirm it in/skill-state new. - Keeps the runtime record in the session's plugin state and in the plugin store, keyed by session id.
- Registers one tool,
skill_state_update, and one command,/skill-state; denies non-exempt tool calls that were not bound by a state update; and compacts the main conversation to the frame at each turn end in interactive sessions. Subagents are not affected.
Full documentation, domain config reference and development notes: https://github.com/s2005/skill_state.
License
MIT, see LICENSE.