> ## Documentation Index
> Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Skills

> Automated Claude Code skills for fixing PR review comments and iterating to a perfect Greptile score.

Agent skills automate the full auto-fix workflow in [Claude Code](https://claude.ai/download). Instead of manually prompting your assistant to fetch comments and apply fixes, invoke a skill and let it handle the entire loop.

Both skills are open source and available at [github.com/greptileai/skills](https://github.com/greptileai/skills).

<Note>
  **Prerequisites:**

  * [Claude Code](https://claude.ai/download) installed
  * `git` and `gh` (GitHub CLI) installed and authenticated
  * [Greptile installed](https://app.greptile.com/signup) on your repository
  * [Greptile MCP server configured](/mcp-v2/setup) in Claude Code
</Note>

## Install

Clone the skills into your Claude Code skills directory. See the [Claude Code skills docs](https://docs.anthropic.com/en/docs/claude-code/skills) for more on how skill discovery works.

```bash theme={}
git clone https://github.com/greptileai/skills.git ~/.claude/skills/greptile
```

Or add as a submodule in your project:

```bash theme={}
git submodule add https://github.com/greptileai/skills.git .skills/greptile
```

***

## check-pr

Checks a pull request for unresolved review comments, failing status checks, and incomplete descriptions — then fixes and resolves them.

### Usage

```text theme={}
/check-pr
```

Or with a specific PR number:

```text theme={}
/check-pr 42
```

If no PR number is given, the skill auto-detects the PR for your current branch.

### What It Does

<Steps>
  <Step title="Waits for pending checks">
    Polls until all CI and review bot checks (Greptile, linters, etc.) reach a terminal state. This ensures all comments are available before analysis.
  </Step>

  <Step title="Analyzes the PR">
    Evaluates four areas:

    * **Status checks** — Are CI checks passing or failing?
    * **PR description** — Is it complete? Any TODOs or placeholders?
    * **Review comments** — Inline comments from Greptile, linters, and human reviewers
    * **General comments** — Discussion threads and bot notifications
  </Step>

  <Step title="Categorizes issues">
    Each issue is classified as:

    | Category              | Meaning                                          |
    | --------------------- | ------------------------------------------------ |
    | **Actionable**        | Code changes, test improvements, or fixes needed |
    | **Informational**     | Verification notes, questions, or FYIs           |
    | **Already addressed** | Resolved by subsequent commits                   |
  </Step>

  <Step title="Fixes and resolves">
    If there are actionable items, the skill makes the fixes, commits, pushes, and resolves the corresponding review threads.
  </Step>
</Steps>

***

## greploop

Iteratively improves a PR until Greptile gives it a 5/5 confidence score with zero unresolved comments. Triggers a Greptile review, fixes all actionable comments, pushes, re-triggers, and repeats.

### Usage

```text theme={}
/greploop
```

Or with a specific PR number:

```text theme={}
/greploop 42
```

### What It Does

<Steps>
  <Step title="Triggers a Greptile review">
    Pushes the latest changes and waits for the Greptile review check to complete.
  </Step>

  <Step title="Parses review results">
    Reads the confidence score (e.g. `3/5`) and fetches all unresolved inline comments from Greptile.
  </Step>

  <Step title="Fixes actionable comments">
    For each unresolved comment, reads the file in context, determines if a code change is needed, and applies the fix. Informational comments and false positives are noted and resolved.
  </Step>

  <Step title="Commits, pushes, and loops">
    Commits the fixes, pushes, and goes back to step 1. The loop runs up to **5 iterations** to avoid runaway cycles.
  </Step>

  <Step title="Exits when clean">
    Stops when Greptile returns **5/5 confidence** with **zero unresolved comments**, or after the max iterations.
  </Step>
</Steps>

### Output

On success:

```
Greploop complete.
  Iterations:    2
  Confidence:    5/5
  Resolved:      7 comments
  Remaining:     0
```

If the loop hits the iteration limit:

```
Greploop stopped after 5 iterations.
  Confidence:    4/5
  Resolved:      12 comments
  Remaining:     2

Remaining issues:
  - src/auth.ts:45 — "Consider rate limiting this endpoint"
  - src/db.ts:112 — "Missing index on user_id column"
```

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Auto-Fix Workflow" icon="wand-magic-sparkles" href="/mcp-v2/auto-fix">
    Manual auto-fix patterns using MCP tools
  </Card>

  <Card title="Claude Code Setup" icon="terminal" href="/mcp-v2/setup#claude-code-cli">
    Set up the Greptile MCP server for Claude Code
  </Card>
</CardGroup>
