Skip to main content

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.

v1.0.0New

Unsigned, install at your own risk

Unverified

This 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-guard
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/jeffallan-skills-ticket-guard/SKILL.md

Setup guide →
0Save

Instructions

Ticket Guard

Ticket rules, kept through compaction:

  1. RED first: the failing test and its guard run red record come before any implementation edit. A collection or import error is not RED.
  2. After RED the test files are frozen. Never edit, delete, skip or weaken them to get a pass.
  3. Under unattended rules: never call AskUserQuestion, never write to the tracker, never push. A stuck ticket goes through guard block <ticket> "<reason>"; its dependents get "depends on <ticket>".
  4. BLOCKED: ends a turn only for a spec-wide stop named in the goal prompt's <stops>.
  5. After a compaction, re-read the spec's goal-prompt.md (goal runs) and rebuild state from the Completion Status table and git 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:execute has 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

  1. Check the marker. Run guard marker status; guard <command> means uv 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.
  2. Load the ticket. Read the ticket's section of the spec's implementation-plan.md and the mode the marker records (goal or attended).
  3. 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.
  4. Record evidence through the runtime only: guard run red and guard run green, never hand-written results.
  5. Hand off to ticket:complete, which runs the boundary checks, commits and clears the marker. Never clear the marker yourself.

Reference Guide

TopicReferenceLoad When
Hooks and guard commandsreferences/hooks-and-commands.mdA 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:complete clears 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-affected lists, or record it with guard docs-checked and the reason, before handing off

MUST NOT DO

  • Delete, move or edit marker.json, the evidence record or decisions.jsonl
  • Run guard decide, or pass --reason or --accept-lost-marker under unattended rules
  • Edit files under text.ticketsDir in goal mode
  • Treat the hooks as the only check: ticket:complete re-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

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
php-proUse when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects, sets up dependency injection, and scaffolds REST/GraphQL APIs. Use when working with Eloquent, Doctrine, Composer, Psalm, ReactPHP, or any PHP API development.2 installsnestjs-expertCreates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating TypeORM or Prisma, or working with .module.ts, .controller.ts, and .service.ts files. Invoke for guards, interceptors, pipes, validation, Swagger documentation, and unit/E2E testing in NestJS projects.2 installsreact-native-expertBuilds, optimizes, and debugs cross-platform mobile applications with React Native and Expo. Implements navigation hierarchies (tabs, stacks, drawers), configures native modules, optimizes FlatList rendering with memo and useCallback, and handles platform-specific code for iOS and Android. Use when building a React Native or Expo mobile app, setting up navigation, integrating native modules, improving scroll performance, handling SafeArea or keyboard input, or configuring Expo SDK projects.2 installsangular-architectGenerates Angular 17+ standalone components, configures advanced routing with lazy loading and guards, implements NgRx state management, applies RxJS patterns, and optimizes bundle performance. Use when building Angular 17+ applications with standalone components or signals, setting up NgRx stores, establishing RxJS reactive patterns, performance tuning, or writing Angular tests for enterprise apps.2 installssecurity-reviewerIdentifies security vulnerabilities, generates structured audit reports with severity ratings, and provides actionable remediation guidance. Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews, dependency audits, secrets scanning, or compliance checks. Produces vulnerability reports, prioritized recommendations, and compliance checklists.2 installsrust-engineerWrites, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions. Implements ownership patterns, manages lifetimes, designs trait hierarchies, builds async applications with tokio, and structures error handling with Result/Option. Use when building Rust applications, solving ownership or borrowing issues, designing trait-based APIs, implementing async/await concurrency, creating FFI bindings, or optimizing for performance and memory safety. Invoke for Rust, Cargo, ownership, borrowing, lifetimes, async Rust, tokio, zero-cost abstractions, memory safety, systems programming.1 installs

More from Jeffallan Skills

View source →
cpp-proWrites, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance bottlenecks, concurrency issues, and build system configuration with CMake.6 installsarchitecture-designerUse when designing new high-level system architecture, reviewing existing designs, or making architectural decisions. Invoke to create architecture diagrams, write Architecture Decision Records (ADRs), evaluate technology trade-offs, design component interactions, and plan for scalability. Use for system design, architecture review, microservices structuring, ADR authoring, scalability planning, and infrastructure pattern selection — distinct from code-level design patterns or database-only design tasks.3 installsdjango-expertUse when building Django web applications or REST APIs with Django REST Framework. Invoke when working with settings.py, models.py, manage.py, or any Django project file. Creates Django models with proper indexes, optimizes ORM queries using select_related/prefetch_related, builds DRF serializers and viewsets, and configures JWT authentication. Trigger terms: Django, DRF, Django REST Framework, Django ORM, Django model, serializer, viewset, Python web.3 installsgolang-proImplements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with generics, interfaces, and robust error handling. Use when building Go applications requiring concurrent programming, microservices architecture, or high-performance systems. Invoke for goroutines, channels, Go generics, gRPC integration, CLI tools, benchmarks, or table-driven testing.2 installsprompt-engineerWrites, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot learning, creating system prompts with personas and guardrails, building JSON/function-calling schemas, or developing prompt evaluation frameworks to measure and improve model performance.2 installsjavascript-proWrites, debugs, and refactors JavaScript code using modern ES2023+ features, async/await patterns, ESM module systems, and Node.js APIs. Use when building vanilla JavaScript applications, implementing Promise-based async flows, optimising browser or Node.js performance, working with Web Workers or Fetch API, or reviewing .js/.mjs/.cjs files for correctness and best practices.2 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.631 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.532 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.342 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.244 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.172 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions144 installs

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.