greploop

greploop is a skill for Claude Code from kellykampen/agent-skills. It costs 93 tokens per session (3,370 once invoked), scanned A, a copy of greploop, MIT.

An iterative review-and-fix workflow for GitHub pull requests, GitLab merge requests, and Perforce changelists. It uses Greptile's review to guide repeated improvements.

In plain words
What is it for?
Use it to identify a change under review, address Greptile's comments, update the branch or changelist, and repeat until the stated review target is reached.
Why use it?
It removes the need to manually repeat review, fixes, pushing, and re-review until actionable comments are resolved.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-skills plugin — 25 skills, 7 commands shipped together

Good fit Use it to identify a change under review, address Greptile's comments, update the branch or changelist, and repeat until the stated review target is reached.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kellykampen/agent-skills/greploop
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kellykampen/agent-skills --skill greploop
Clone the repo
git clone --depth 1 https://github.com/kellykampen/agent-skills

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 25 skills, 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for greploop

README.md
[![agentmods](https://agentmods.dev/badge/skills/kellykampen/agent-skills/greploop/github.svg)](https://agentmods.dev/skills/kellykampen/agent-skills/greploop)
Your own site
<a href="https://agentmods.dev/skills/kellykampen/agent-skills/greploop"><img src="https://agentmods.dev/badge/skills/kellykampen/agent-skills/greploop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for greploop

Your own site · 80×15
<a href="https://agentmods.dev/skills/kellykampen/agent-skills/greploop"><img src="https://agentmods.dev/badge/skills/kellykampen/agent-skills/greploop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,370 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.03370
Opus 5 $0.00046 $0.01685
Sonnet 5 $0.00019 $0.00674
Haiku 4.5 $0.00009 $0.00337

Measured 9d ago against content hash b515e64c91ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

greploop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to greploop — 32 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/engineering/greploop/SKILL.md · 433 lines

How it starts

The opening of the file, as written. The whole thing — 433 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Greploop

Iteratively fix a PR/MR/CL until Greptile gives a perfect review: 5/5 confidence, zero unresolved comments.

Inputs

  • PR/MR/CL number (optional): If not provided, detect the PR/MR for the current branch, or the default pending changelist for p4.

Instructions

0. Detect platform

First check for Perforce, then fall back to git remote detection:

# Check for Perforce environment
if p4 info >/dev/null 2>&1; then
  VCS="perforce"
else
  REMOTE_URL=$(git remote get-url origin)
  if echo "$REMOTE_URL" | grep -qi "gitlab"; then
    VCS="gitlab"
  else
    VCS="github"
  fi
fi

For self-hosted GitLab instances whose hostname doesn't contain "gitlab", the user can override by passing --vcs gitlab as an input. For Perforce, pass --vcs perforce.

1. Identify the PR/MR/CL

GitHub:

gh pr view --json number,headRefName -q '{number: .number, branch: .headRefName}'

GitLab:

glab mr view --output json | jq '{iid: .iid, branch: .source_branch}'

Switch to the PR/MR branch if not already on it.

Perforce:

# List pending changelists for current user/client
p4 changes -s pending -u $P4USER -c $P4CLIENT

# Describe a specific CL
p4 describe -s <CL_NUMBER>

Ensure the correct workspace (p4 client) is set before proceeding.

Key field differences:

  • GitHub: number, headRefName, headRefOid
  • GitLab: iid, source_branch, sha
  • Perforce: changelist number, P4CLIENT, shelved files

2. Loop

Repeat the following cycle. Max 5 iterations to avoid runaway loops.

A. Trigger Greptile review

Push/shelve the latest changes (if any):

GitHub/GitLab:

git push

Perforce:

# Re-shelve to update the shelved files for review
p4 shelve -f -c <CL_NUMBER>

Wait for checks to start after push/shelve:

sleep 5

GitHub — check if Greptile is already running before posting a new trigger comment:

GREPTILE_STATE=$(gh pr checks <PR_NUMBER> --json name,state | jq -r '.[] | select(.name | test("greptile"; "i")) | .state')

Read the full file on GitHub · 433 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 433 lines · 93 tokens per session scan A b515e64c91ea

Subscribe to this mod's changes

greploop is a skill published in the GitHub repository kellykampen/agent-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 93 tokens to every session and 3,370 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to greploop, differing in 32 lines, and is treated as a copy.

Related

Other skills, from other repositories

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

engram-branch-pr

PR creation workflow for Engram following the issue-first enforcement system. Trigger: When creating a pull request, opening a PR, or preparing changes for review.

Gentleman-Programming/engram · 37 tokens

verify-behavior

Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…

nicknisi/dotfiles · 68 tokens

github-contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…

daymade/claude-code-skills · 133 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in agterm/tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 248 tokens

write-pr

Reference standards for writing pull request titles and descriptions in the tldraw repository, plus the pre-flight comment sweep over the diff. Use as supporting guidance when another skill or workflow needs PR content standards, not as the user-facing create/update PR workflow.

tldraw/tldraw · 53 tokens