Agent SkillsOpenPetsHQ/openpets › cli-review

cli-review

GitHub

在本地Git仓库中运行Greptile CLI代码审查,处理安装与认证,解析并汇总JSON格式的审查结果,提供严重性排序的发现项及修复建议,适用于PR提交前的本地检查。

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

触发场景

用户希望在本地进行代码审查 需要在打开PR前获取Greptile反馈 从本地检出目录直接运行审查

安装

npx skills add OpenPetsHQ/openpets --skill cli-review -g -y
更多选项

非标准路径

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

不安装直接使用

npx skills use OpenPetsHQ/openpets@cli-review

指定 Agent (Claude Code)

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

安装 repo 全部 skill

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

预览 repo 内 skill

npx skills add OpenPetsHQ/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.

版本历史

  • d5af8e9 当前 2026-07-24 15:56

同 Skill 集合

skills/openpets/SKILL.md

元信息

文件数
0
版本
18fd4ed
Hash
56a93ea9
收录时间
2026-07-24 15:56

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 14:27
浙ICP备14020137号-1 $访客地图$