ticket
The ticket slash command manages end-to-end work on JIRA or Linear tickets by fetching ticket details, exploring related codebase, creating feature branches, implementing changes with test-driven development, updating ticket status, and creating pull requests linked to the original ticket. Use this when assigned a ticket requiring code changes across multiple steps from initial understanding through pull request submission.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/ChrisWiles/claude-code-showcase/HEAD/.claude/commands/ticket.md -o ~/.claude/commands/ticket.mdticket.md
# Ticket Workflow
Work on ticket: $ARGUMENTS
## Instructions
### 1. Read the Ticket
First, fetch and understand the ticket:
```
Use the JIRA/Linear MCP tools to:
- Get ticket details (title, description, acceptance criteria)
- Check linked tickets or epics
- Review any comments or attachments
```
Summarize:
- What needs to be done
- Acceptance criteria
- Any blockers or dependencies
### 2. Explore the Codebase
Before coding:
- Search for related code
- Understand the current implementation
- Identify files that need changes
### 3. Create a Branch
```bash
git checkout -b {initials}/{ticket-id}-{brief-description}
```
### 4. Implement the Changes
- Follow project patterns (check relevant skills)
- Write tests first (TDD)
- Make incremental commits
### 5. Update the Ticket
As you work:
- Add comments with progress updates
- Update status (In Progress → In Review)
- Log any blockers or questions
### 6. Create PR and Link
When ready:
- Create PR with `gh pr create`
- Link the PR to the ticket
- Add ticket ID to PR title: `feat(PROJ-123): description`
### 7. If You Find a Bug
If you discover an unrelated bug while working:
1. Create a new ticket with details
2. Link it to the current ticket if related
3. Note it in the PR description
4. Continue with original task
## Example Workflow
```
Me: /ticket PROJ-123
Claude:
1. Fetching PROJ-123 from JIRA...
Title: Add user profile avatar upload
Description: Users should be able to upload a profile picture...
Acceptance Criteria:
- [ ] Upload button on profile page
- [ ] Support JPG/PNG up to 5MB
- [ ] Show loading state during upload
2. Searching codebase for profile-related code...
Found: src/screens/Profile/ProfileScreen.tsx
Found: src/components/Avatar/Avatar.tsx
3. Creating branch: cw/PROJ-123-avatar-upload
4. [Implements feature with TDD approach]
5. Updating JIRA status to "In Review"...
Adding comment: "Implementation complete, PR ready for review"
6. Creating PR and linking to PROJ-123...
PR #456 created: feat(PROJ-123): add avatar upload to profile
```MUST BE USED PROACTIVELY after writing or modifying any code. Reviews against project standards, TypeScript strict mode, and coding conventions. Checks for anti-patterns, security issues, and performance problems.
Git workflow agent for commits, branches, and PRs. Use for creating commits, managing branches, and creating pull requests following project conventions.
Run code quality checks on a directory
Check if documentation is in sync with code
Review a pull request using project standards
Generate a summary for the current branch changes
Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.
Formik form handling with validation patterns. Use when building forms, implementing validation, or handling form submission.