Skip to main content

Claude Code Integration

Integrate tk with Claude Code to give your AI assistant context about your project’s issues, priorities, and workflow.

Quick Setup

Run a single command to install the integration:
tk setup claude
This adds tk prime to your Claude Code SessionStart hook, automatically injecting issue context when you start a new session.
Restart Claude Code for changes to take effect.

What tk prime Does

When Claude starts a session, tk prime outputs:
  • Project summary — Issue counts by status
  • Ready work — Issues with no blockers
  • In-progress work — What’s currently being worked on
  • Top priorities — PageRank-sorted recommendations
  • Quick reference — Common commands
This gives Claude the context it needs to help you work on the right things.

Manual Configuration

If you prefer to configure manually, add to .claude/settings.local.json:
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "tk prime"
          }
        ]
      }
    ]
  }
}
Or install globally in ~/.claude/settings.json:
tk setup claude --global

AGENTS.md Setup

Add a minimal pointer to your AGENTS.md (or CLAUDE.md):
## Issue Tracking

This project uses **tk (ticket-rs)** for issue tracking.
Run `tk prime` for workflow context.

**Quick reference:**
- `tk ready` - Find unblocked work
- `tk create "Title" -t task -p 2` - Create issue
- `tk close <id>` - Complete work
- `tk triage` - AI-powered recommendations
Run tk onboard to get a copy-pasteable snippet.

Working with Claude

Once configured, Claude can help you:

Find Work to Do

Ask Claude: “What should I work on next?” Claude will use tk ready and tk triage to recommend the highest-impact work.

Create Issues

Ask Claude: “Create an issue for adding dark mode support” Claude will run:
tk create "Add dark mode support" -t feature -p 2

Manage Dependencies

Ask Claude: “The auth feature blocks the dashboard, add that dependency” Claude will run:
tk dep add tk-dashboard tk-auth

Close Issues

Ask Claude: “I finished the login bug, close it” Claude will run:
tk close tk-abc123 "Fixed in this session"

Remove Integration

To remove the Claude hooks:
tk setup claude --remove

Troubleshooting

  1. Verify hooks are installed: Check .claude/settings.local.json
  2. Restart Claude Code completely
  3. Re-run tk setup claude
Make sure you’re in a directory with a .tickets/ folder, or a subdirectory of one.
tk doctor
Use --global to install for all projects:
tk setup claude --global

Next Steps