Agent Skillsalvinunreal/openpets › cli-review

cli-review

GitHub

在本地Git仓库中运行Greptile CLI代码审查,处理安装认证并汇总JSON格式的审查结果与修复建议。

.agents/skills/cli-review/SKILL.md alvinunreal/openpets

Trigger Scenarios

用户希望在提交PR前获取本地代码审查反馈 从本地检出环境直接请求代码分析

Install

npx skills add alvinunreal/openpets --skill cli-review -g -y
More Options

Non-standard path

npx skills add https://github.com/alvinunreal/openpets/tree/main/.agents/skills/cli-review -g -y

Use without installing

npx skills use alvinunreal/openpets@cli-review

指定 Agent (Claude Code)

npx skills add alvinunreal/openpets --skill cli-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add alvinunreal/openpets --all -g -y

预览 repo 内 skill

npx skills add alvinunreal/openpets --list

SKILL.md

Frontmatter
{
    "name": "cli-review",
    "license": "MIT",
    "metadata": {
        "author": "greptileai",
        "version": "1.0"
    },
    "description": "Runs a Greptile CLI review for the current local branch, installing or authenticating the CLI when needed, then summarizes JSON findings for the user. Use when the user wants Greptile feedback before opening a PR, outside a hosted PR review flow, or directly from a local checkout.\n",
    "allowed-tools": "Bash(git:*) Bash(greptile:*) Bash(command:*) Bash(curl:*) Bash(npm:*)"
}

CLI Review

Run a Greptile review from the local checkout and summarize the findings.

Instructions

1. Confirm repository context

Start from the current repository root:

git rev-parse --show-toplevel

If the command fails, tell the user that the Greptile CLI review must be run from a git repository.

2. Check for the Greptile CLI

Check whether greptile is installed:

command -v greptile

If it is missing, do not install it automatically. Ask the user for permission, then show the recommended install command:

npm i -g greptile

If npm is unavailable, offer the shell installer fallback:

curl -fsSL "https://greptile.com/cli/install" | sh

After installation, re-run command -v greptile.

3. Ensure authentication

Check the signed-in account:

greptile whoami

If the CLI reports that authentication is missing, run:

greptile login

Wait for the user to complete the login flow before continuing.

4. Run the review

Prefer JSON output:

greptile review --json

If JSON output is unsupported or fails with a usage error, fall back to:

greptile review --agent

Do not hide the raw command failure if both commands fail. Summarize the failing command and the next action the user needs to take.

5. Summarize results

Parse JSON output when available and report:

  • Review status
  • Number of findings
  • Highest severity findings first
  • Files that need edits
  • Suggested next command or fix path

When output is plain text, preserve the same structure as much as possible. Keep the summary concise and focused on actionable findings.

Version History

  • d5af8e9 Current 2026-07-24 15:56

Same Skill Collection

skills/openpets/SKILL.md

Metadata

Files
0
Version
32abea1
Hash
56a93ea9
Indexed
2026-07-24 15:56

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-18 17:00
浙ICP备14020137号-1 $방문자$