Skip to main content
command

pac-create-ticket — Claude Code command: what it does, how to install

Creates a Product as Code YAML ticket under an epic in your project. Handy when you want to track issues and branch tasks directly in the codebase.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command project-management/pac-create-ticket
Open on GitHub

What pac-create-ticket does

The command writes a ticket YAML file into .pac/tickets/[ticket-id].yaml following the PAC v0.1.0 format. Claude Code inspects the local .pac/ folder, checks .pac/pac.config.yaml, and lists epics in .pac/epics/ before generating a ticket sequence number.

Each generated file includes metadata like acceptance criteria, assignee, priority, status, and subtasks. You can supply details via flags such as --epic, --type (feature, bug, task, or spike), --assignee, and --priority. Adding --create-branch instructs the tool to cut a dedicated git branch right away.

The command relies on an existing PAC layout: run /project:pac-configure first if your repository lacks the .pac directory.

What it helps with

  • generate structured ticket YAML files adhering to PAC v0.1.0
  • link tasks to an existing parent epic in .pac/epics/
  • branch Git repositories automatically for new tasks with --create-branch
  • define acceptance criteria and assignees through terminal flags

Example prompts for the agent

  • /pac-create-ticket "Implement login endpoint" --epic auth-epic --type feature --priority high
  • /pac-create-ticket "Fix null pointer in parser" --epic core-epic --type bug --create-branch
  • /pac-create-ticket

How to install pac-create-ticket

1claude-code-templates

npx claude-code-templates@latest --command project-management/pac-create-ticket

2Manually: put the files in place

.claude/commands/pac-create-ticket.md

Call it with /pac-create-ticket. For all projects use ~/.claude/commands/

Questions about pac-create-ticket

How to install pac-create-ticket in Claude Code?

Run npx claude-code-templates@latest --command project-management/pac-create-ticket. The command file lands in .claude/commands/pac-create-ticket.md.

What does pac-create-ticket do?

It creates a PAC v0.1.0 YAML specification in .pac/tickets/, links the ticket to a parent epic, and optionally branches Git.

What prerequisites does pac-create-ticket require?

Your project must contain a .pac/ directory and at least one parent epic. If missing, initialize it via /project:pac-configure.

Source text

pac-create-ticket.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[ticket-name] | --epic | --type | --assignee | --priority"
description: Create new PAC ticket within an epic following Product as Code specification
---

# Create PAC Ticket

Create a new ticket within an epic following Product as Code specification: **$ARGUMENTS**

## PAC Configuration Check

- PAC directory: !`ls -la .pac/ 2>/dev/null || echo "No .pac directory found"`
- PAC config: @.pac/pac.config.yaml (if exists)
- Available epics: !`ls -la .pac/epics/ 2>/dev/null | head -10`

## Task

Create a new Product as Code ticket within an existing epic:

**Arguments**:
- Ticket name (required if not using --name flag)
- --epic <epic-id>: Parent epic ID (required)
- --type <type>: Ticket type (feature/bug/task/spike)
- --assignee <assignee>: Assigned developer
- --priority <priority>: Priority level
- --create-branch: Automatically create git branch

**Ticket Creation Process**:
1. Validate PAC configuration exists (suggest `/project:pac-configure` if missing)
2. Select or validate parent epic
3. Generate unique ticket ID and sequence number
4. Create ticket YAML file following PAC v0.1.0 specification in `.pac/tickets/[ticket-id].yaml`
5. Include required metadata: id, name, epic, created timestamp, assignee
6. Add spec with description, type, status, priority, acceptance criteria, tasks
7. Link ticket to parent epic
8. Create git branch if requested

If information is missing, prompt user interactively for ticket details.

**Next Steps**: Use `/project:pac-update-status` to track ticket progress.

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Notes, tasks and projects →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor