ticket-guard
Guards one workflow ticket with marker-scoped hooks that freeze its RED tests, re-run GREEN before a goal-mode stop, and restore the ticket's context after compaction. Use when ticket:execute starts or resumes a ticket, or when a session must pick a ticket back up after compaction.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install jeffallan-skills-ticket-guardManual setup by platform
Claude Code
~/.claude/skills/jeffallan-skills-ticket-guard/SKILL.md
Instructions
Ticket Guard
Ticket rules, kept through compaction:
- RED first: the failing test and its
guard run redrecord come before any implementation edit. A collection or import error is not RED. - After RED the test files are frozen. Never edit, delete, skip or weaken them to get a pass.
- Under unattended rules: never call
AskUserQuestion, never write to the tracker, never push. A stuck ticket goes throughguard block <ticket> "<reason>"; its dependents get"depends on <ticket>". BLOCKED:ends a turn only for a spec-wide stop named in the goal prompt's<stops>.- After a compaction, re-read the spec's
goal-prompt.md(goal runs) and rebuild state from the Completion Status table andgit log, then continue at the step the session-start hook names.
Role Definition
You are the guard for one ticket of a spec workflow. ticket:execute invokes this skill after guard marker start so the ticket rules above stay in context. The guard hooks ship in the plugin's hooks/hooks.json: they run on every edit, every stop and every compaction in every session, a resumed one included, and do nothing without a marker or for another session's marker. The work itself stays in ticket:execute and ticket:complete.
When to Use This Skill
ticket:executehas started or resumed a ticket and needs the hooks registered.- A session resumed or compacted mid-ticket and must pick the ticket back up.
- You need to know what a guard hook did, or why it denied an edit or blocked a stop.
Core Workflow
- Check the marker. Run
guard marker status;guard <command>meansuv run -q --no-project --python ">=3.11" "${CLAUDE_PLUGIN_ROOT}/runtime/guard.pyz" <command>(typed out or as a shell function, never a variable, which zsh doesn't split), and spec files and goal prompts write it that way. No marker means no ticket is in progress: say so and stop. - Load the ticket. Read the ticket's section of the spec's
implementation-plan.mdand the mode the marker records (goalorattended). - Follow the ticket rules above for the rest of the ticket. The hooks enforce the freeze and the GREEN re-run; the rules cover what they can't see.
- Record evidence through the runtime only:
guard run redandguard run green, never hand-written results. - Hand off to
ticket:complete, which runs the boundary checks, commits and clears the marker. Never clear the marker yourself.
Reference Guide
| Topic | Reference | Load When |
|---|---|---|
| Hooks and guard commands | references/hooks-and-commands.md | A hook denied or blocked something, or you need a guard command's behavior |
Constraints
MUST DO
- Keep every edit in the main session; subagents only read
- Leave the marker in place until
ticket:completeclears it - Report a hook denial in your next message, with the file and the rule
- In goal mode, block a ticket the Stop hook keeps failing instead of looping
- Update every doc
guard docs-affectedlists, or record it withguard docs-checkedand the reason, before handing off
MUST NOT DO
- Delete, move or edit
marker.json, the evidence record ordecisions.jsonl - Run
guard decide, or pass--reasonor--accept-lost-markerunder unattended rules - Edit files under
text.ticketsDirin goal mode - Treat the hooks as the only check:
ticket:completere-runs everything in a clean worktree
Output Templates
After a compaction, before continuing:
Resuming <ticket> (<mode>) on <branch>, started at <start SHA>.
Evidence so far: RED <yes/no>, GREEN <yes/no>.
Next step: <the step the session-start hook named>.
Knowledge Reference
Claude Code hooks (PreToolUse and Stop in skill frontmatter, SessionStart with the compact source in the plugin's hooks.json), the bundled guard runtime, uv run -q --no-project --python ">=3.11" "${CLAUDE_PLUGIN_ROOT}/runtime/guard.pyz" (marker, evidence JSONL, RED and GREEN records, test freeze, Stop-hook GREEN re-run, block, summary), goal runs and /goal evaluator behavior.
Maintained by @jeffallan, Principal Consultant at Synergetic Solutions
Documentation
Security
Reviews (0)
Related skills
Browse all →More from Jeffallan Skills
View source →More Build skills
Browse category →Frequently asked questions about ticket-guard
What does the ticket-guard skill do?
Guards one workflow ticket with marker-scoped hooks that freeze its RED tests, re-run GREEN before a goal-mode stop, and restore the ticket's context after compaction. Use when ticket:execute starts or resumes a ticket, or when a session must pick a ticket back up after compaction. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the ticket-guard skill?
Run `npx @skills-hub-ai/cli install jeffallan-skills-ticket-guard` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/jeffallan-skills-ticket-guard/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does ticket-guard work with?
ticket-guard runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the ticket-guard skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use ticket-guard after installing it?
In Claude Code, type `/jeffallan-skills-ticket-guard` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the ticket-guard skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.