/hooks-plugin:hooks-session-end-issue-hook --no-verify to skip gh auth verificationfrom hooks-plugin
Configures a Stop hook that checks for unfinished todos at session end and prompts GitHub issue creation for deferred work.
Ships in hooks-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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 . -path '*/.claude/settings.json' -maxdepth 3find . -path '*/.claude/settings.json' -maxdepth 3 -exec jq -r '.hooks.Stop // empty' {} +gh 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.
Check that the todo tools are enabled for the sessions this hook will run in: the hook reads TodoWrite calls from the transcript, and TodoWrite/Task* are disabled on Opus 4.8, Sonnet 5, Fable 5/5.1 and newer (Claude Code 2.1.233+) unless CLAUDE_CODE_ENABLE_TODO_TOOLS=1 is set in the session environment. If it is not set, say so and offer to add it (for example under env in .claude/settings.json) — without it the hook never fires, and that silence is not "all todos completed".
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) |
| Requires | CLAUDE_CODE_ENABLE_TODO_TOOLS=1 on Opus 4.8+/Sonnet 5/Fable (todo tools are off by default there) |
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/hooks-configurationClaude Code hooks configuration and development. Use when the user mentions hooks, PreToolUse, PostToolUse, SessionStart, SubagentStart, PermissionRequest, or TaskCompleted./hooks-permission-request-hookGenerate a PermissionRequest hook with auto-approve/deny rules. Use when needing a safer alternative to --dangerouslySkipPermissions tailored to your project stack./hooks-session-start-hookCreate a SessionStart hook for Claude Code on the web. Use when setting up a repo so dependencies install and tests/linters run automatically on remote session start.npx claudepluginhub laurigates/claude-plugins --plugin hooks-pluginOther plugins' skills for the same job