Claude Integration

Claude Integration

Leverage Claude AI for code reviews, CI fixes, and issue auto-resolution.

Setup

Claude integration requires the Claude Code CLI. Install it from claude.ai/code.

Run wt --setup to verify claude is available in your PATH.

Claude Modes

When launching Claude from a PR or issue, choose your preferred autonomy level:

+------------------------------------------------------------+
| Claude mode for Issue #7                                   |
+------------------------------------------------------------+
| > >> Forced (full auto)                                    |
|   ?> Ask (confirm actions)                                 |
|   ## Plan (plan first)                                     |
+------------------------------------------------------------+

Forced Mode

>>

Claude executes all actions automatically without asking for confirmation. Use with caution.

--dangerously-skip-permissions

Ask Mode

?>

Claude asks for confirmation before executing impactful actions. Recommended for most cases.

(default behavior)

Plan Mode

##

Claude analyzes and creates a detailed plan before any execution. Best for complex tasks.

--permission-mode=plan

Auto-Resolve Issues

Select "Auto-resolve (full auto)" on an issue and Claude will autonomously:

  1. 1

    Understand the issue

    Read and analyze the issue details, identify requirements

  2. 2

    Explore the codebase

    Find relevant files, understand patterns and architecture

  3. 3

    Implement the solution

    Write code, handle edge cases, add tests if available

  4. 4

    Verify locally

    Run tests and build to ensure the code works

  5. 5

    Create a PR

    Commit, push, and create a pull request referencing the issue

Runs in Forced Mode

Auto-resolve always runs with --dangerously-skip-permissions for full autonomy. Review the PR before merging.

Auto-Fix CI Failures

When a PR has failed CI checks, select "Fix CI issues (auto)" and Claude will:

  1. 1

    Get CI logs

    Fetch the failed workflow run logs from GitHub

  2. 2

    Analyze errors

    Identify the root cause (tests, lint, build, types, etc.)

  3. 3

    Fix the issues

    Make code changes and verify locally

  4. 4

    Push the fix

    Commit and push to trigger a new CI run

Smart Package Detection

Claude automatically detects your package manager (pnpm, yarn, npm) by checking for lock files.

PR Review

Select "Review this PR" and Claude will analyze the code changes with a comprehensive checklist:

  • *Logic & Correctness: Does it work? Edge cases handled?
  • *Security: Injection, auth issues, data exposure?
  • *Performance: N+1 queries, memory leaks, blocking ops?
  • *Error Handling: Proper error messages?
  • *Code Quality: Readable, DRY, good abstractions?
  • *Testing: Tests present and meaningful?
  • *Breaking Changes: Could this break existing code?

Review Output Format

Claude provides a structured review with:

SectionDescription
SummaryOverview of what the PR does
[OK]What looks good
[~]Concerns (with file:line references)
[!!]Blocking issues
[?]Optional improvements
RecommendationApprove / Request Changes / Discuss

Tips

*

Start with Ask mode: For first-time use, start with Ask mode to understand how Claude works before using Forced mode.

*

Review auto-resolved PRs: Always review PRs created by auto-resolve before merging. Claude is powerful but not infallible.

*

Use Plan mode for complex tasks: For large refactors or complex features, Plan mode helps you review the approach before execution.