ticket-worker

Work on a single tk ticket end-to-end. Use when the user says 'work on ticket X' or when spawned by work-tickets.sh.

215 stars

Best use case

ticket-worker is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Work on a single tk ticket end-to-end. Use when the user says 'work on ticket X' or when spawned by work-tickets.sh.

Teams using ticket-worker should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ticket-worker/SKILL.md --create-dirs "https://raw.githubusercontent.com/megalithic/dotfiles/main/home/common/programs/ai/pi-coding-agent/skills/ticket-worker/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ticket-worker/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ticket-worker Compares

Feature / Agentticket-workerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Work on a single tk ticket end-to-end. Use when the user says 'work on ticket X' or when spawned by work-tickets.sh.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Ticket worker

Work on a single ticket from start to finish. Follow each step in order. Do not skip verification.

## Workflow

### 1. Read the ticket

```bash
tk show <id>
```

Check that the ticket has the `ready-for-development` tag. If it doesn't, **stop** — the ticket is not refined enough for automated work. Add a note and exit:

```bash
tk add-note <id> "Skipped: ticket not tagged ready-for-development. Needs refinement before work can start."
```

If the tag is present, mark the ticket as in progress:

```bash
tk start <id>
```

Understand the title, description, acceptance criteria, and any file hints.

### 2. Explore the codebase

- If `lat.md/` exists at project root: run `lat search` with keywords from the ticket title and description. Read relevant sections with `lat section` to understand the architecture before exploring code files.
- Read the files mentioned in the description
- grep for relevant patterns, function names, imports
- Understand the scope of changes needed
- Do not start implementing yet

### 3. Discover verification commands

Check these files in order to find how to build, test, and lint:

1. `devenv.nix` — look for `scripts`, `tasks`, `processes`, `git-hooks`, test commands
2. `package.json` — look for `scripts.test`, `scripts.lint`, `scripts.build`
3. `Makefile` — look for `test`, `lint`, `check`, `build` targets
4. `flake.nix` — look for `checks`

Remember what you find. You will need these after every change.

### 4. Implement incrementally

- Make one focused change
- Run the verification commands you discovered in step 3
- If broken: fix before moving on
- If context is getting heavy: commit what you have, stop — the next session can continue

### 5. Verify each acceptance criterion

Go through the acceptance criteria one by one. For each criterion:

- If it specifies a command: run that command and check the output
- If it says "tests pass": run the test suite
- If it says "linter clean": run the linter
- If it is behavioral: verify by reading the changed code or running relevant commands
- Explicitly state whether each criterion passes or fails

If `lat.md/` exists at project root: run `lat check`. If it fails, update `lat.md/` to reflect your changes and re-run until it passes. The ticket is not complete with a failing `lat check`.

Do not declare victory until every criterion is verified.

### 6. Commit and close

If all acceptance criteria pass:

1. Commit using the conventions in the `git-commit` skill (`git commit -S -m "type(scope): description"`). If `lat.md/` was updated, include those changes in the same commit.
2. Close the ticket: `tk close <id>` (not `done` — `done` is not a valid status)
3. Add a summary note: `tk add-note <id> "Summary of what was done"`

### 7. If stuck

If you cannot complete the ticket:

1. Add a note to the ticket explaining the blocker: `tk add-note <id> "Blocked because..."`
2. Do not close the ticket
3. Commit any partial progress if it makes sense
4. Exit cleanly

## Rules

- **Verify, don't assume.** Run the commands. Check the output.
- **Stay focused.** Only change files relevant to the ticket.
- **No bonus refactoring.** Fix what the ticket asks, nothing more.
- **Weak acceptance criteria?** Fall back to: description satisfied + existing tests pass.
- **One ticket per session.** Don't carry context from unrelated work.
- **Work in the current checkout.** The pipeline handles worktree setup (task-pipeline skill). When invoked manually or via work-tickets.sh, just work in the current directory.
- **Commit message format.** Always use conventional commits, single line, GPG-signed, no AI attribution.

Related Skills

ticket-creator

215
from megalithic/dotfiles

Create and refine tickets for the tk ticket system. Use when the user says 'create tickets for X', 'refine ticket X', 'break this into tickets', 'seed tickets from plan', or anything about creating or refining tk tickets.

writing-clearly-and-concisely

215
from megalithic/dotfiles

Apply Strunk's timeless writing rules to ANY prose humans will read - documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.

web-search

215
from megalithic/dotfiles

Web search using DuckDuckGo (free, unlimited). Falls back to pi-web-access extension for content extraction.

web-browser

215
from megalithic/dotfiles

Interact with web pages using agent-browser CLI. MUST run 'browser connect 9222' FIRST to use existing browser with authenticated sessions.

tmux

215
from megalithic/dotfiles

Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output.

tell

215
from megalithic/dotfiles

Delegate tasks to other agents - pi sessions or external agents (claude, opencode, aider). Non-blocking with task tracking and completion notifications.

task-pipeline

215
from megalithic/dotfiles

Structured workflow for research → plan → tickets → work. Use when starting or continuing a task with /task, /plan, or /tickets commands.

preview

215
from megalithic/dotfiles

Display code, diffs, images, and other content in a tmux pane or popup. Auto-detects nvim/megaterm for floating popups.

mcpctl

215
from megalithic/dotfiles

Manage MCP server configurations — add, remove, list, inspect, troubleshoot. Use when asked to "add mcp server", "remove mcp", "list mcp servers", "mcp status", "configure mcp", "troubleshoot mcp", or any MCP server management task.

handoff

215
from megalithic/dotfiles

Save session state for later pickup. Use /handoff when context is degrading, /pickup to resume in a new session.

github

215
from megalithic/dotfiles

Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.

git-worktrees

215
from megalithic/dotfiles

Git worktree conventions and commands. Use when creating, switching to, or cleaning up git worktrees for branch work.