From hooks-plugin
Configures a Stop hook to detect unfinished TodoWrite todos at Claude Code session end and prompt GitHub issue creation for deferred tasks. Use with GitHub-tracked projects to avoid forgetting work.
npx claudepluginhub laurigates/claude-plugins --plugin hooks-pluginThis skill is limited to using the following tools:
Configure a `Stop` hook that checks for unfinished `TodoWrite` todos at the end of each Claude response. If any pending or in-progress todos exist when you try to end the session, Claude is prompted to create GitHub issues for them before the conversation closes.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Configure a Stop hook that checks for unfinished TodoWrite todos at the end of each Claude response. If any pending or in-progress todos exist when you try to end the session, Claude is prompted to create GitHub issues for them before the conversation closes.
| Use this skill when... | Use /hooks:hooks-configuration instead when... |
|---|---|
| You want unfinished todos deferred to GitHub issues | Configuring other hook types (PreToolUse, SessionEnd, etc.) |
| Preventing tasks from being forgotten at session end | Need general hooks knowledge or debugging |
| Projects with active issue trackers on GitHub | Understanding hook lifecycle events |
| Teams that rely on GitHub issues for work tracking | Writing custom hook logic from scratch |
Detect current state:
find .claude -maxdepth 1 -name 'settings.json'jq -r '.hooks.Stop // empty' .claude/settings.jsongh auth statusjq --version| Flag | Default | Description |
|---|---|---|
--no-verify | off | Skip checking gh authentication status |
Verify that jq is installed — the hook requires it to parse the session transcript. Report if missing.
Unless --no-verify is passed: verify gh is installed and authenticated (gh auth status). Report the auth state so the user knows whether GitHub issue creation will work when the hook fires.
The hook script ships with the hooks-plugin. Determine its path:
${CLAUDE_PLUGIN_ROOT} is set: use ${CLAUDE_PLUGIN_ROOT}/hooks/session-end-issue-hook.sh../../hooks/session-end-issue-hook.sh)Report the resolved path to the user.
.claude/settings.jsonRead existing .claude/settings.json if it exists. Merge the Stop hook — preserve all existing configuration.
If a Stop hook pointing to session-end-issue-hook.sh already exists, report that the hook is already configured and skip to Step 4.
If other Stop hooks exist, add alongside them (both will run).
Configuration to merge under the hooks key:
{
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-end-issue-hook.sh\"",
"timeout": 15
}
]
}
]
}
Use timeout: 15 (15 seconds) — transcript parsing is fast. Create .claude/ directory if it does not exist.
Report a summary of what was configured, including:
.claude/settings.jsongh auth is readyAfter configuring the hook:
.claude/settings.json to share the hook with the teamgh is not authenticated, remind the user to run gh auth login so GitHub issue creation works when the hook firesWhen the hook fires at the end of a Claude response:
transcript_pathTodoWrite call — the final state of the todo liststatus: "pending" or status: "in_progress"gh issue create commandsClaude then has the opportunity to create the issues or ask the user what to do with the deferred work.
| Context | Approach |
|---|---|
| Quick setup, skip auth check | /hooks:session-end-issue-hook --no-verify |
| Full setup with auth verification | /hooks:session-end-issue-hook |
| Test the hook manually | echo '{"transcript_path":"/path/to/transcript","cwd":"."}' | bash hooks/session-end-issue-hook.sh |
| Item | Value |
|---|---|
| Hook event | Stop (fires after each Claude response) |
| Settings location | .claude/settings.json |
| Timeout | 15 seconds |
| Trigger condition | Pending or in-progress todos in last TodoWrite call |
| Silent when | All todos completed or no TodoWrite calls in transcript |
| Issue label | claude-deferred (suggested in output, not auto-applied) |