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

# Git & PR commands

> Commands for creating commits, opening pull requests, reviewing code, and integrating with GitHub and Slack in Claurst.

Claurst has first-class support for git workflows. These commands let you commit changes, open pull requests, review diffs, and integrate with GitHub Actions and Slack — all without leaving the terminal.

<AccordionGroup>
  <Accordion title="/commit — create a git commit">
    **Type:** `prompt`\
    **Syntax:** `/commit`

    Asks the model to create a git commit from the current staged and unstaged changes. The model runs `git status`, inspects the diff, and writes a commit message following conventional-commit style.

    **Tools the model can use:**

    ```
    Bash(git add:*)
    Bash(git status:*)
    Bash(git commit:*)
    ```

    **What the model sees before writing the commit:**

    * `git status`
    * `git diff HEAD`
    * `git branch --show-current`
    * `git log --oneline -10`

    **Example:**

    ```bash theme={null}
    /commit
    ```

    **The model will:**

    1. Stage relevant files with `git add`.
    2. Summarize the changes.
    3. Create the commit using a HEREDOC for multi-line messages.

    <Tip>
      The model follows a built-in Git Safety Protocol: it never amends existing commits, never skips hooks (`--no-verify`), and never force-pushes to `main`/`master`.
    </Tip>

    <Note>
      `/commit` is currently restricted to Anthropic-internal builds (`USER_TYPE=ant`). External users can ask Claude to commit via natural language instead.
    </Note>
  </Accordion>

  <Accordion title="/commit-push-pr — commit, push, and open a PR">
    **Type:** `prompt`\
    **Syntax:** `/commit-push-pr [additional instructions]`

    Performs the full `commit → push → pull request` workflow in a single command. The model handles branch creation (if on `main`), commit, push, and PR creation or update.

    **Tools the model can use:**

    ```
    Bash(git checkout --branch:*)   Bash(git checkout -b:*)
    Bash(git add:*)                 Bash(git status:*)
    Bash(git push:*)                Bash(git commit:*)
    Bash(gh pr create:*)            Bash(gh pr edit:*)
    Bash(gh pr view:*)              Bash(gh pr merge:*)
    ToolSearch
    mcp__slack__send_message
    ```

    **What the model sees before acting:**

    * `git status`
    * `git diff HEAD`
    * `git branch --show-current`
    * `git diff <default-branch>...HEAD`
    * `gh pr view --json number` (to check for an existing PR)

    **PR body template sections:**

    | Section   | Description                     |
    | --------- | ------------------------------- |
    | Summary   | Bullet-point summary of changes |
    | Test plan | What was tested                 |
    | Changelog | User-visible change description |

    **Additional instructions:**

    Pass extra instructions after the command to customize the PR description or target branch.

    ```bash theme={null}
    /commit-push-pr target the staging branch and add a rollback note
    ```

    <Tip>
      If your `CLAUDE.md` mentions Slack channels, the model will offer to post a notification to those channels after the PR is created (via `mcp__slack__send_message`).
    </Tip>

    <Note>
      `/commit-push-pr` is currently restricted to Anthropic-internal builds. External users can describe the workflow in natural language and Claude will walk through the steps interactively.
    </Note>
  </Accordion>

  <Accordion title="/branch — fork a conversation">
    **Aliases:** `fork` (when `FORK_SUBAGENT` flag is off)\
    **Type:** `local-jsx`\
    **Syntax:** `/branch [name]`

    Creates a forked copy of the current conversation at this point. You immediately enter the fork; the original session can be resumed later with `claude -r <original-session-id>`.

    **Arguments:**

    | Argument | Description                                       |
    | -------- | ------------------------------------------------- |
    | *(none)* | Auto-generate a branch name from the first prompt |
    | `<name>` | Custom title for the branch                       |

    **How it works:**

    1. Reads the current transcript JSONL file.
    2. Generates a new UUID for the fork session.
    3. Copies all messages, rewriting `sessionId` and adding `forkedFrom` metadata.
    4. Saves the fork as a new JSONL file.
    5. Calls `context.resume()` to switch the live session into the fork.

    **Examples:**

    ```bash theme={null}
    /branch
    /branch try-a-different-approach
    ```
  </Accordion>

  <Accordion title="/diff — view git changes">
    **Type:** `local-jsx`\
    **Syntax:** `/diff`

    Opens an interactive diff viewer showing:

    * Uncommitted changes in the working tree
    * Per-turn diffs (what changed since the last model turn)

    ```bash theme={null}
    /diff
    ```
  </Accordion>

  <Accordion title="/pr-comments — view pull request comments">
    **Type:** `prompt`\
    **Syntax:** `/pr-comments [PR number or args]`

    Fetches and displays comments from a GitHub pull request using the `gh` CLI.

    **What it fetches:**

    1. PR-level comments (`gh api /repos/{owner}/{repo}/issues/{number}/comments`)
    2. Code review comments with file/line context (`gh api /repos/{owner}/{repo}/pulls/{number}/comments`)

    Each comment is formatted with: author, file, line, diff hunk, and comment text.

    **Examples:**

    ```bash theme={null}
    /pr-comments          # auto-detect current branch's PR
    /pr-comments 42       # specific PR number
    ```

    <Note>
      `/pr-comments` will direct users with the marketplace plugin installed to use `pr-comments@claude-code-marketplace` for the best experience.
    </Note>
  </Accordion>

  <Accordion title="/review — review a pull request">
    **Type:** `prompt`\
    **Syntax:** `/review [PR number]`

    Asks the model to review a GitHub pull request and provide structured feedback.

    **Arguments:**

    | Argument      | Description                            |
    | ------------- | -------------------------------------- |
    | *(none)*      | Run `gh pr list` and let you pick a PR |
    | `<PR number>` | Review the specified PR directly       |

    **Review output sections:**

    | Section      | Description                               |
    | ------------ | ----------------------------------------- |
    | Overview     | Summary of the change                     |
    | Code quality | Style, patterns, and correctness          |
    | Suggestions  | Improvements the author could make        |
    | Issues/risks | Bugs, security concerns, breaking changes |

    **Example:**

    ```bash theme={null}
    /review 142
    ```
  </Accordion>

  <Accordion title="/ultrareview — deep automated bug-finding review">
    **Type:** `local-jsx`\
    **Syntax:** `/ultrareview`

    Launches a deep, automated bug-finding review that runs as a remote agent session (Claude Code on the web, \~10–20 minutes). It finds and independently verifies bugs in the current branch.

    **Gate:** Available only when `isUltrareviewEnabled()` (controlled by the `tengu_review_bughunter_config.enabled` GrowthBook flag). Shows an overage dialog if free reviews are exhausted.

    ```bash theme={null}
    /ultrareview
    ```
  </Accordion>

  <Accordion title="/security-review — security-focused code review">
    **Type:** `prompt`\
    **Syntax:** `/security-review`

    Performs a security-focused review of pending branch changes. Runs a 3-phase analysis: codebase exploration, vulnerability scan, then false-positive filtering with confidence scoring.

    **Tools used:**

    ```
    Bash(git diff:*)    Bash(git status:*)   Bash(git log:*)
    Bash(git show:*)    Bash(git remote show:*)
    Read   Glob   Grep   LS   Task
    ```

    **Security categories analyzed:**

    * Input validation: SQL injection, command injection, XXE, template injection, NoSQL injection, path traversal
    * Authentication and authorization flaws
    * Cryptography and secrets handling
    * Injection and remote code execution
    * Sensitive data exposure

    **Hard exclusions** (not reported): DoS, secrets on disk, rate limiting, memory issues, test-only code, log spoofing, SSRF path-only, AI prompt injection, insecure docs, missing audit logs.

    ```bash theme={null}
    /security-review
    ```
  </Accordion>

  <Accordion title="/install-github-app — set up Claude GitHub Actions">
    **Type:** `local-jsx`\
    **Syntax:** `/install-github-app`

    An interactive wizard that configures Claude-powered GitHub Actions for a repository. It handles OAuth authentication, app installation, and workflow file creation.

    **Wizard steps:**

    | Step                      | Purpose                                                  |
    | ------------------------- | -------------------------------------------------------- |
    | `OAuthFlowStep`           | Authenticate with GitHub                                 |
    | `CheckGitHubStep`         | Verify `gh` CLI and remote setup                         |
    | `ChooseRepoStep`          | Select the target repository                             |
    | `CheckExistingSecretStep` | Check for an existing `ANTHROPIC_API_KEY` secret         |
    | `ApiKeyStep`              | Collect or create an API key                             |
    | `InstallAppStep`          | Install the Claude GitHub App                            |
    | `ExistingWorkflowStep`    | Handle any existing workflow files                       |
    | `WarningsStep`            | Review security warnings                                 |
    | `CreatingStep`            | Create `.github/workflows/claude.yml` and set the secret |
    | `SuccessStep`             | Confirm setup and show next steps                        |

    **Example:**

    ```bash theme={null}
    /install-github-app
    ```

    **Gate:** Available to claude.ai and Anthropic console users only.
  </Accordion>

  <Accordion title="/install-slack-app — install the Claude Slack app">
    **Type:** `local`\
    **Syntax:** `/install-slack-app`

    Opens the Claude Slack app installation page (`https://slack.com/marketplace/A08SF47R6P4-claude`) in your browser.

    ```bash theme={null}
    /install-slack-app
    ```

    **Gate:** Available to claude.ai subscribers only.
  </Accordion>
</AccordionGroup>

***

## Commit message best practices

When using `/commit` or `/commit-push-pr`, the model follows these conventions automatically. You can reinforce them by including commit guidelines in your `CLAUDE.md`.

```md theme={null}
## Git conventions

- Use Conventional Commits: `feat:`, `fix:`, `chore:`, `docs:`, etc.
- Keep the subject line under 72 characters
- Reference issue numbers in the body: `Closes #123`
- Never rewrite published history
```

<Tip>
  Add branch naming conventions, PR templates, and required reviewer rules to your `CLAUDE.md` so the model applies them consistently across every `/commit-push-pr` invocation.
</Tip>
