hooks-plugin/skills/hooks-session-end-issue-hook/SKILL.md
Configure a Stop hook that surfaces unfinished todos at session end. Use when you want deferred work automatically flagged for GitHub issue creation.
npx skillsauth add laurigates/claude-plugins hooks-session-end-issue-hookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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) |
testing
Verify accumulated bug claims at upstream HEAD and dedup against trackers before filing issues. Use when filing upstream reports from backlogs, audit docs, or git-history findings.
documentation
Gate outward-bound text (upstream issues, docs, PR bodies) through isolated haiku fresh-reader critique before publishing. Use when an artifact must survive a reader with zero project context.
tools
Suggest improvements to SKILL.md content, descriptions, or tool config from eval results. Use when raising pass rates, fixing triggering, or iterating on a skill after evaluation.
tools
deadbranch CLI for stale-branch cleanup — dry-run preview, TUI or non-interactive delete, protects main/develop/WIP. Use when asked to clean up branches, prune branches, or remove stale branches.