autonomous-session-manager
自律的なコーディング作業において、新しいセッションの開始、作業再開、セッション種類の判別、セッション間の自動継続などを管理し、効率的な開発サイクルを実現するSkill。
📜 元の英語説明(参考)
Session lifecycle management for autonomous coding. Use when starting new coding sessions, resuming work, detecting session type (init vs continue), or managing auto-continuation between sessions.
🇯🇵 日本人クリエイター向け解説
自律的なコーディング作業において、新しいセッションの開始、作業再開、セッション種類の判別、セッション間の自動継続などを管理し、効率的な開発サイクルを実現するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o autonomous-session-manager.zip https://jpskill.com/download/9370.zip && unzip -o autonomous-session-manager.zip && rm autonomous-session-manager.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9370.zip -OutFile "$d\autonomous-session-manager.zip"; Expand-Archive "$d\autonomous-session-manager.zip" -DestinationPath $d -Force; ri "$d\autonomous-session-manager.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
autonomous-session-manager.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
autonomous-session-managerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Autonomous Session Manager
自律的なコーディング操作のためのセッションライフサイクル(作成、再開、検出、自動継続)を管理します。
クイックスタート
セッションタイプの検出
from scripts.session_detector import detect_session_type, SessionType
session_type = detect_session_type(project_dir)
if session_type == SessionType.INIT:
# 初回実行 - 初期化が必要
pass
else:
# 継続 - 前回の作業を再開
pass
新規セッションの作成
from scripts.session_manager import SessionManager
async with SessionManager(project_dir, model="claude-sonnet-4-5-20250929") as session:
result = await session.run(prompt)
セッション後の自動継続
from scripts.auto_continue import auto_continue
# 3秒の遅延後、自動的に次のセッションを開始
await auto_continue(delay_seconds=3)
セッションのワークフロー
┌─────────────────────────────────────────────────────────────┐
│ SESSION LIFECYCLE │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. SESSION TYPE の検出 │
│ ├─ feature_list.json の有無を確認 │
│ ├─ 存在しない場合 → INIT セッション │
│ └─ 存在する場合 → CONTINUE セッション │
│ │
│ 2. SESSION の作成 │
│ ├─ SDK クライアントの初期化 │
│ ├─ ツールと権限の設定 │
│ └─ 作業ディレクトリの設定 │
│ │
│ 3. SESSION の実行 │
│ ├─ プロンプトの実行 (初期化またはコーディング) │
│ ├─ ツールコールの処理 │
│ └─ 結果の取得 │
│ │
│ 4. SESSION の終了 │
│ ├─ 状態の保存 │
│ ├─ 完了ステータスの確認 │
│ └─ 自動継続のトリガーまたはシャットダウン │
│ │
└─────────────────────────────────────────────────────────────┘
主な機能
| 機能 | 説明 |
|---|---|
| セッション検出 | INIT または CONTINUE を自動的に判別します |
| 状態復元 | セッション開始時に進行状況ファイルを読み込みます |
| 自動継続 | セッション間の遅延を設定可能です |
| 正常なシャットダウン | 終了前に状態を保存します |
| イテレーション追跡 | 制限のためにセッションをカウントします |
設定
# セッションの設定
SESSION_CONFIG = {
"model": "claude-sonnet-4-5-20250929",
"max_turns": 1000,
"continue_delay": 3, # 秒
"max_iterations": None, # None = 無制限
}
統合ポイント
- context-state-tracker: 状態の永続性を提供します
- security-sandbox: コマンドの検証を提供します
- autonomous-loop: 継続的な動作のためにセッションマネージャーを使用します
参考文献
references/SESSION-LIFECYCLE.md- 詳細なライフサイクルのドキュメントreferences/CONFIGURATION.md- 設定オプション
スクリプト
scripts/session_manager.py- コアとなる SessionManager クラスscripts/session_detector.py- セッションタイプの検出scripts/auto_continue.py- 自動継続ロジック
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Autonomous Session Manager
Manages session lifecycle for autonomous coding operations - creation, resumption, detection, and auto-continuation.
Quick Start
Detect Session Type
from scripts.session_detector import detect_session_type, SessionType
session_type = detect_session_type(project_dir)
if session_type == SessionType.INIT:
# First run - need to initialize
pass
else:
# Continuation - resume previous work
pass
Create New Session
from scripts.session_manager import SessionManager
async with SessionManager(project_dir, model="claude-sonnet-4-5-20250929") as session:
result = await session.run(prompt)
Auto-Continue After Session
from scripts.auto_continue import auto_continue
# Automatically start next session after 3 second delay
await auto_continue(delay_seconds=3)
Session Workflow
┌─────────────────────────────────────────────────────────────┐
│ SESSION LIFECYCLE │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. DETECT SESSION TYPE │
│ ├─ Check for feature_list.json │
│ ├─ If missing → INIT session │
│ └─ If exists → CONTINUE session │
│ │
│ 2. CREATE SESSION │
│ ├─ Initialize SDK client │
│ ├─ Configure tools and permissions │
│ └─ Set working directory │
│ │
│ 3. RUN SESSION │
│ ├─ Execute prompt (initializer or coding) │
│ ├─ Handle tool calls │
│ └─ Capture results │
│ │
│ 4. END SESSION │
│ ├─ Save state │
│ ├─ Check completion status │
│ └─ Trigger auto-continue or shutdown │
│ │
└─────────────────────────────────────────────────────────────┘
Key Features
| Feature | Description |
|---|---|
| Session Detection | Automatically determines if INIT or CONTINUE |
| State Restoration | Reads progress files at session start |
| Auto-Continue | Configurable delay between sessions |
| Graceful Shutdown | Saves state before termination |
| Iteration Tracking | Counts sessions for limits |
Configuration
# Session configuration
SESSION_CONFIG = {
"model": "claude-sonnet-4-5-20250929",
"max_turns": 1000,
"continue_delay": 3, # seconds
"max_iterations": None, # None = unlimited
}
Integration Points
- context-state-tracker: Provides state persistence
- security-sandbox: Provides command validation
- autonomous-loop: Uses session manager for continuous operation
References
references/SESSION-LIFECYCLE.md- Detailed lifecycle documentationreferences/CONFIGURATION.md- Configuration options
Scripts
scripts/session_manager.py- Core SessionManager classscripts/session_detector.py- Session type detectionscripts/auto_continue.py- Auto-continuation logic