home / skills / chachamaru127 / claude-code-harness / session-control
This skill switches session state for /work --resume and --fork flags, enabling reliable resume and branching within workflows.
npx playbooks add skill chachamaru127/claude-code-harness --skill session-controlReview the files below or copy the command above to add this skill to your agents.
---
name: session-control
description: "/workのセッションresume/forkを制御。ワークフロー内部用。Do NOT load for: user session management, login state, app state handling."
description-en: "Controls session resume/fork for /work based on flags. Internal use only from workflow. Do NOT load for: user session management, login state, app state handling."
description-ja: "/workのセッションresume/forkを制御。ワークフロー内部用。Do NOT load for: user session management, login state, app state handling."
allowed-tools: ["Read", "Bash", "Write", "Edit"]
user-invocable: false
---
# Session Control Skill
/work の `--resume` / `--fork` フラグに応じてセッション状態を切り替える。
## 機能詳細
| 機能 | 詳細 |
|------|------|
| **セッション再開/分岐** | See [references/session-control.md](references/session-control.md) |
## 実行手順
1. workflow から渡された変数を確認
2. `scripts/session-control.sh` を適切な引数で実行
3. `session.json` と `session.events.jsonl` の更新を確認
This skill controls session resume and fork behavior for the /work workflow. It toggles session state based on --resume and --fork flags and updates session artifacts used inside autonomous development cycles. Do NOT load this skill for user session management, login state, or general app state handling.
The skill inspects variables passed from the workflow to determine whether to resume or fork the current session. It runs a shell helper (scripts/session-control.sh) with the appropriate arguments, then validates that session.json and session.events.jsonl were updated as expected. It is designed strictly for internal workflow orchestration within the Plan→Work→Review loop.
Can this skill handle user login or app-wide state?
No. This skill is only for internal workflow session control and must not be used for login or app state management.
What files does the skill update?
It runs the session control script and checks that session.json and session.events.jsonl are updated accordingly.