Slash Commands
Features

Slash Commands

19 commands triggered from PR comments, CI steps, or the autonomous agent.

How to trigger commands

There are three ways to run a command:

  1. PR comment — mention @ferret /command in any PR or MR comment (requires webhook bot mode)
  2. CLI / CI step — run ferret run /command directly in a pipeline step
  3. Agent — the autonomous agent selects commands automatically as tools
shell
# In a CI step
$ ferret run /review
$ ferret run /describe
$ ferret run /ask "Is this change thread-safe?"
$ ferret run /docs readme
$ ferret run /security
# In a PR comment (bot mode must be running)
@ferret /review
@ferret /ask Why does this file skip validation?
@ferret /docs adr

Command reference

/review

Run a full AI code review on the current PR/MR. Posts inline comments and a summary.

/describe

Generate a structured PR title and description based on the diff and post it back to the PR.

/ask <question>

Ask a specific question about the PR diff. Ferret answers with a PR comment.

/improve [focus]

Suggest code improvements as GitHub suggestion blocks. Pass an optional focus area (e.g. 'error handling').

/generate_labels

Auto-generate and apply labels based on diff content and PR size.

/update_changelog

Prepend a changelog entry to CHANGELOG.md and commit it.

/add_doc

Generate missing docstrings/comments for changed functions and post as suggestions.

/similar_issue

Find open issues in the same repo similar to this PR and post a table.

/test

Generate unit tests for the changed code and post them as a PR comment.

/explain [target]

Explain what the PR does in plain English. Pass an optional file or function name to focus on.

/security

Dedicated security analysis: OWASP top-10, secret detection, insecure patterns.

/approve

AI-assisted verdict: approve the PR if no blocking issues are found, otherwise request changes.

/commit_message

Generate three conventional commit message options for the PR.

/docs [mode]

Generate documentation. Mode: readme | api | adr | module | wiki | auto (default: auto-detect).

/snyk

Scan changed dependencies against the Snyk vulnerability database.

/coverage

Analyse test coverage for files changed in the PR.

/link_jira

Find related Jira issues and link them to the PR as a comment.

/link_linear

Find related Linear issues and link them to the PR as a comment.

/triage

Find similar open issues on CodeTriage for the changed packages.

Adding a new command

To add your own slash command, implement the FerretTool trait in a new file under src/tools/ and register it in route_command(). See the Contributing guide for a step-by-step walkthrough.