> ## Documentation Index
> Fetch the complete documentation index at: https://simili.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code Workflows

> Comprehensive guide to using the Claude Code integration

# Claude Code Workflows

Simili Bot's integration with Claude Code allows for advanced automated workflows that go beyond simple triage. It transforms the bot from a passive analyzer into an active contributor.

## Setup Requirements

To use these workflows, you need:

1. **Claude Code** installed in your environment (for the GitHub Action runner).
2. **Anthropic API Key** configured as a GitHub Secret (`ANTHROPIC_API_KEY`).
3. **Simili Bot GitHub Action** configured to handle Claude Code triggers.

***

## Core Workflows

### 1. Interactive Commands

Trigger specific AI actions by mentioning the bot in a comment.

**Usage:**

* `@simili-bot refactor the error handling in internal/core/pipeline.go`
* `@simili-bot explain how the config inheritance works`

### 2. Automated Implementation (`issue_implement`)

Go from an issue description to a pull request with a single label.

**Configuration:**

```yaml theme={null}
claude_code:
  issue_implement:
    enabled: true
    trigger_label: "implement"
```

**Workflow:**

1. Add the `implement` label to an issue.
2. Claude Code explores the codebase, plans the implementation, and writes the code.
3. A new PR is automatically created with the changes.

### 3. Documentation Sync (`doc_sync`)

Ensure your documentation never falls behind your code changes.

**Configuration:**

```yaml theme={null}
claude_code:
  doc_sync:
    enabled: true
    watch_paths: ["internal/**/*.go"]
    doc_paths: ["docs/**/*.mdx"]
```

**Workflow:**

1. Modify files in `watch_paths`.
2. Claude Code analyzes the code diff and updates relevant files in `doc_paths`.
3. Documentation updates are committed to the PR.

### 4. Dynamic PR Checklists (`review_checklist`)

Generate context-aware review checklists for every PR.

**Configuration:**

```yaml theme={null}
claude_code:
  review_checklist:
    enabled: true
    trigger_label: "review-checklist"
    items:
      - "Ensure error handling follows the project pattern"
      - "Check for missing telemetry"
```

**Workflow:**

1. Apply the `review-checklist` label to a PR.
2. Claude Code reviews the diff against your project standards and generates a customized checklist as a PR comment.

***

## Specialized Workflows

### Security Audit (`security_review`)

Perform a focused security review on sensitive changes.

* **Trigger:** `security-review` label.
* **Action:** Claude Code performs a deep scan for vulnerabilities (SQLi, XSS, etc.) and posts findings.

### Scheduled Maintenance (`maintenance`)

Run routine tasks like dependency updates or code cleanup.

* **Action:** Claude Code executes tasks defined in your configuration on a schedule.

***

## Best Practices

* **Path Scoping**: For `doc_sync`, scope your `watch_paths` carefully to avoid unnecessary documentation rebuilds.
* **Human Review**: Always review pull requests and comments generated by Claude Code before merging.
* **Token Management**: Be aware of token usage when running large `issue_implement` tasks on complex codebases.
