diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..81dac2c --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "greptile-skills", + "description": "Agent skills for automated PR/MR/CL review workflows (GitHub, GitLab, Perforce): check PRs for unresolved comments and failing checks, loop reviews to 5/5 confidence, and run local Greptile CLI reviews.", + "version": "1.0.0", + "author": { + "name": "greptileai" + }, + "repository": "https://github.com/greptileai/skills", + "license": "MIT", + "skills": [ + "./check-pr", + "./greploop", + "./cli-review" + ] +} diff --git a/README.md b/README.md index 56e7d3f..5e9f1f1 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ Authenticate before use: `gh auth login`, `glab auth login`, configure `P4PORT`/ ## Install +### Claude Code + ```bash git clone https://github.com/greptileai/skills.git ~/.claude/skills/greptile cd ~/.claude/skills @@ -44,9 +46,54 @@ ln -s greptile/greploop .skills/greploop Claude Code discovers skills by looking for `SKILL.md` files at `~/.claude/skills//SKILL.md`. Since this is a multi-skill repo, symlinks are needed to expose each sub-skill at the expected depth. +### Pi / open-skills ecosystem + +Agents that use the open [`skills`](https://skills.sh) CLI (the package manager for the [Agent Skills](https://agentskills.io) spec linked above) — such as Pi — install directly from the repo, no cloning or symlinks needed: + +```bash +# Install all three skills +npx skills add greptileai/skills + +# Or install a single skill +npx skills add greptileai/skills/check-pr +npx skills add greptileai/skills/cli-review +npx skills add greptileai/skills/greploop +``` + +This resolves each `/SKILL.md`, copies it into your agent's skills directory, and records it in `skills-lock.json`. Update later with `npx skills update`. + ## Usage -Invoke by name in your agent (e.g. `/check-pr 123`, `/cli-review`, or `/greploop`). If no PR/MR/CL number is given, `check-pr` and `greploop` auto-detect the PR/MR for the current branch, or the pending changelist for Perforce. +### Claude Code + +Invoke by name (e.g. `/check-pr 123`, `/cli-review`, or `/greploop`). + +### Pi / intent-based agents + +Pi loads a skill via **progressive disclosure**: it keeps every skill's +`description` in context and reads the full `SKILL.md` on demand when a request +matches that description. So activation is driven entirely by the `description` +field — just describe what you want: + +- "check my PR for unresolved comments" → `check-pr` +- "loop greptile review until it's 5/5" / "fix the greptile comments and re-review" → `greploop` +- "run a greptile review before I open a PR" → `cli-review` + +To force a specific skill explicitly, use Pi's skill command: + +```bash +/skill:check-pr 123 +/skill:greploop +/skill:cli-review +``` + +(The `metadata.triggers` entries in each skill's frontmatter are optional catalog +hints for tooling that indexes skills; Pi ignores unknown metadata and does not +use them for activation.) + +### Common options + +If no PR/MR/CL number is given, `check-pr` and `greploop` auto-detect the PR/MR for the current branch, or the pending changelist for Perforce. For self-hosted GitLab instances whose hostname doesn't contain "gitlab", pass `--vcs gitlab` explicitly. For Perforce, pass `--vcs perforce` if auto-detection fails. diff --git a/check-pr/SKILL.md b/check-pr/SKILL.md index 38fd27f..8e4a172 100644 --- a/check-pr/SKILL.md +++ b/check-pr/SKILL.md @@ -11,6 +11,14 @@ compatibility: Requires git and gh (GitHub CLI), glab (GitLab CLI), or p4 (Perfo metadata: author: greptileai version: "1.3" + triggers: + - check.?(my )?(pr|mr|cl) + - check (the )?pull.?request + - review (comments|feedback) on (the )?(pr|mr) + - unresolved (comments|threads|review) + - failing (checks|ci) on (the )?(pr|mr) + - prepare (the )?(pr|mr|cl|change) for (merge|submit|review) + - address review feedback allowed-tools: Bash(gh:*) Bash(glab:*) Bash(git:*) Bash(p4:*) --- diff --git a/cli-review/SKILL.md b/cli-review/SKILL.md index 91ad16b..0b4c96d 100644 --- a/cli-review/SKILL.md +++ b/cli-review/SKILL.md @@ -8,6 +8,12 @@ license: MIT metadata: author: greptileai version: "1.0" + triggers: + - greptile (cli )?review + - run greptile (on |for )?.*(branch|local|checkout) + - local greptile review + - review .*before .*(pr|opening|push) + - greptile feedback allowed-tools: Bash(git:*) Bash(greptile:*) Bash(command:*) Bash(curl:*) Bash(npm:*) --- diff --git a/greploop/SKILL.md b/greploop/SKILL.md index 43ddb60..b183287 100644 --- a/greploop/SKILL.md +++ b/greploop/SKILL.md @@ -10,6 +10,14 @@ compatibility: Requires git, gh (GitHub CLI) or glab (GitLab CLI) authenticated, metadata: author: greptileai version: "1.3" + triggers: + - greploop + - grep.?loop + - loop .*greptile + - (fix|address) .*greptile .*comments + - keep .*reviewing .*until + - (get|reach|hit) .*5/5 .*greptile + - iterate .*(pr|mr|cl) .*greptile allowed-tools: Bash(gh:*) Bash(glab:*) Bash(git:*) Bash(p4:*) ---