Agent skill

Greploop

by galfrevn in galfrevn/apollo

Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments.

MITAuto-check: notesDevelopment

Install Greploop

skills CLI
$ npx skills add galfrevn/apollo --skill greploop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install galfrevn/apollo greploop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/galfrevn/apollo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/greploop .claude/skills/greploop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
greploop
GitHub stars
237
Token cost
~2k tokens
SKILL.md length
1,018 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments.

  • Works in 7 steps: Preflight → Start from a clean worktree → Review → …
  • The user says greploop
  • SKILL.md covers You are the loop and Loop
  • Calls git, jq and npm

What it does

Greploop is an agent skill from galfrevn/apollo. Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments. Use when the user says "greploop", asks to iterate on Greptile feedback until the review is clean, wants a branch polished before pushing or opening a PR, or wants local review findings fixed and re-reviewed automatically.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code review. The repository describes itself as: The open-source brain for physical agentic devices, powered by Cloudflare Workers. The licence is MIT.

When your agent uses it

  • The user says greploop
  • Asks to iterate on Greptile feedback until the review is clean
  • Wants a branch polished before pushing
  • Wants local review findings fixed and re-reviewed automatically

Example prompts

  • “greploop”
  • “/greploop”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash(greptile *), Bash(git *)

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Preflight
  2. Start from a clean worktree
  3. Review
  4. Check exit conditions
  5. Fix findings
  6. Commit and re-review
  7. Report

What it can do on your machine

Read from SKILL.md and the folder at commit c7605d6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(greptile *)
    • Bash(git *)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • jq
    • npm
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Greploop loads about 2k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 1,018 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:167
    `.env` someone dropped in) and buries it in a commit labelled as review feedback. Keep a list of

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from galfrevn/apollo at commit c7605d6, republished under its MIT licence (© galfrevn). 1,018 words, ~2,018 tokens.

Download SKILL.mdSave it as .claude/skills/greploop/SKILL.md (or your agent's skills folder).
name
greploop
description
Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments. Use when the user says "greploop", asks to iterate on Greptile feedback until the review is clean, wants a branch polished before pushing or opening a PR, or wants local review findings fixed and re-reviewed automatically.
allowed-tools
Bash(greptile *), Bash(git *)
license
MIT
metadata.author
greptileai
metadata.minCliCompat
3.3.0

Greploop

Run a Greptile review on the local branch, fix what it finds, review again. Stop at 5/5 with zero comments.

This is the local CLI loop. No PR, nothing pushed. Command and output details are in the greptile-cli skill.

You are the loop

Run the steps below yourself, once per iteration. Do not reach for watch(1):

  • It never exits, so it hangs the session. BusyBox watch has no exit condition, and GNU's --chgexit only stops when output changes, not when the score reaches 5/5.
  • Nothing edits the code between ticks, so it re-reviews the same commit and returns the same findings forever, billing a real review each time without ever converging.
  • It is not installed on macOS.

The fix between reviews is the entire point, and only you can make it.

If the user explicitly wants a hands-off shell loop with no agent in it, this is the shape. It still cannot fix anything, so it only reports:

bash
for i in $(seq 1 5); do
  greptile review --json > review.json || break
  [ "$(jq '.confidence == 5 and (.comments | length) == 0' < review.json)" = "true" ] && break
  echo "iteration $i: $(jq -r '.confidence')/5, $(jq '.comments | length' < review.json) comments"
done

Loop

Copy this checklist and check items off as you go:

Greploop progress:
- [ ] Step 0: Preflight
- [ ] Step 1: Start from a clean worktree
- [ ] Step 2: Review
- [ ] Step 3: Check exit conditions
- [ ] Step 4: Fix findings
- [ ] Step 5: Commit, then back to Step 2
- [ ] Step 6: Report
Step 0: Preflight
bash
git rev-parse --show-toplevel   # must be a git repo with a remote
command -v greptile             # must be installed
greptile whoami                 # check the OUTPUT, not the exit code

If greptile is missing, stop and tell the user to install it (npm install -g greptile, or brew install greptileai/tap/greptile).

greptile whoami exits 0 even when signed out, printing Not signed in. … to stdout, so gate on its text:

bash
greptile whoami | grep -q '^Not signed in' && echo "needs login"

If it needs a login, stop and tell the user to run greptile login. It is an interactive browser flow; do not attempt it yourself.

Step 1: Start from a clean worktree

greptile review reviews committed changes against the branch base, and this loop commits once per iteration, so it needs a clean tree to begin with.

bash
git status --porcelain     # must be empty before you start

If anything is listed, stop and hand it back to the user. Ask them to commit or stash it, and say why: once the loop starts, any file it edits gets staged whole, so a change they had in that file would be swept into a commit labelled as review feedback. You cannot separate their edits from yours inside a single file, and an agent should not be splitting hunks to try.

Do not commit or stash on their behalf, and do not proceed with a dirty tree because the dirty files look unrelated. The loop only learns which files it will touch after the first review.

Step 2: Review
bash
greptile review --json > review.json

Always --json, and capture it. The next steps read review.json. A review takes on the order of a minute; do not wrap it in a short timeout, and do not start a second one while one is running.

Pass -b <branch> when the user named a base. Otherwise omit it and let the CLI resolve the repository default.

A zero exit with findings is the normal case. greptile review exits 0 whatever it finds. A non-zero exit means the review did not complete: report the stderr message and stop. Several of those are about the input and will never clear by looping: detached HEAD, more than 500 changed files, a diff over 3 MB, a base sharing no history with HEAD, or every changed file held back as sensitive.

Step 3: Check exit conditions
bash
jq '{confidence, count: (.comments | length)}' < review.json

Stop the loop when any of these is true:

  • confidence is 5 and comments is empty. Success, go to Step 6.
  • Iteration count reaches 5. Stop and report what remains.
  • Two consecutive iterations produce the same findings with no successful fix. You are stuck.

confidence: 5 with comments still open means keep going: the comments are the work.

Show full SKILL.md (447 more words)Show less
Step 4: Fix findings

Work findings in this order: securityIssue: true, then P0, then P1, then P2. Ignore category and verifiedEvidence. On the --json path they are always "comment" and null, so they carry no ranking signal.

For each finding:

  1. Read the file at path around startLine to endLine. Do not rely on hunk.before alone. The working tree has usually moved since the review ran.
  2. Decide whether it is actionable. It is not when it is factually wrong about the code, describes intended behavior, or asks for something the user already rejected this session.
  3. If actionable, make the smallest fix that resolves it.
  4. If not, note it with a one-line reason for the final report.

Do not apply suggestion fields blindly in bulk. Each is a proposal. Read it, confirm it fits the surrounding code, then apply.

Never disable a rule, add a suppression comment, or weaken a test to make a finding go away. If a finding can only be cleared that way, treat it as not actionable and report it. A 5/5 bought by silencing the reviewer is worth nothing.

Step 5: Commit and re-review

Stage only the files you edited in Step 4, by path:

bash
git add -- src/auth.ts src/db.ts        # the paths you actually changed
git commit -m "address greptile review feedback"

Never git add -A or git add . here. This loop runs unattended across several iterations, and a catch-all stage sweeps in whatever else appeared in the worktree (scratch files, build output, a .env someone dropped in) and buries it in a commit labelled as review feedback. Keep a list of the paths you touched as you fix, and stage exactly that list.

Staging by path is only safe if those files still contain exactly what you wrote. Step 1 started clean, but the loop runs for minutes, and someone editing in their IDE meanwhile would have their change staged wholesale under your commit message. Before staging, confirm each path still matches your edit. Re-read it, or diff it against what you intended:

bash
git diff -- src/auth.ts     # every hunk here should be one you made

If a file changed underneath you, stop the loop and tell the user which file and why. Do not stage it, and do not try to separate their hunks from yours.

If git status --porcelain shows changes in files you did not edit, leave them alone and note them in the final report. They are not yours to commit.

Return to Step 2 and increment the iteration counter. Do not push. This loop stays local unless the user asks otherwise.

Step 6: Report
Greploop complete.
  Iterations:   2
  Confidence:   5/5
  Fixed:        7 findings
  Remaining:    0

When the loop stopped without a clean review, say so plainly and list what is left:

Greploop stopped after 5 iterations.
  Confidence:   4/5
  Fixed:        12 findings
  Remaining:    2

Remaining:
  - src/auth.ts:45 (P1) "Consider rate limiting this endpoint"
    Not fixed: needs a product decision on limits.
  - src/db.ts:112 (P2) "Missing index on user_id"
    Not actionable: the index exists in migration 0043.

Report the state you actually reached. A loop that ran out of iterations at 3/5 is a 3/5 result. Never describe it as complete.

© galfrevn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/greploop of galfrevn/apollo.

Open the folder on GitHubat commit c7605d6

Compare with similar skills

Greploop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Greploop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Greploop this skillgalfrevn/apollo237—~2kAutomated safety check: NotesMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Backend Code Reviewlangflow-ai/langflow156k—~3.5kAutomated safety check: NotesMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
Mole Bug Patternstw93/Mole70k—~2kAutomated safety check: PassGPL-3.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Backend Code Review

    langflow-ai/langflow

    Review backend code for quality, security, maintainability, and best practices based on established checklist rules.

    156k GitHub stars~3.5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Backend Code Review

    langgenius/dify

    Reviews backend code under api/ for concrete, reproducible defects, routes to rule packs for architecture, schema, repositories and SQLAlchemy, and ranks findings from P0 to P3.

    158k GitHub stars~676 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from galfrevn/apollo

  • Bun

    galfrevn/apollo

    A skill your agent uses when building, running, testing, or bundling JavaScript/TypeScript applications.

    237 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check: notes
  • Diagnose SEO

    galfrevn/apollo

    Structured diagnostic for technical SEO problems. An agent skill from galfrevn/apollo.

    237 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Optimize For AI

    galfrevn/apollo

    Optimize content for AI search engines — ChatGPT, Perplexity, Claude, Gemini, Google AI Overviews.

    237 GitHub stars~4.3k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Greploop

What does Greploop do?

Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments. Greploop is an agent skill from galfrevn/apollo. Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments.

When should I use Greploop?

Greploop fits situations like: the user says greploop; asks to iterate on Greptile feedback until the review is clean; wants a branch polished before pushing; wants local review findings fixed and re-reviewed automatically.

How do I install Greploop in Claude Code?

Run `npx skills add galfrevn/apollo --skill greploop -a claude-code`. Or copy the skill folder (.agents/skills/greploop in galfrevn/apollo) into .claude/skills/greploop in your project. Claude Code loads it when a task matches its description.

How do I install Greploop in Codex?

Run `npx skills add galfrevn/apollo --skill greploop -a codex`. Or copy the skill folder (.agents/skills/greploop in galfrevn/apollo) into .agents/skills/greploop in your project. Codex loads it when a task matches its description.

Can I use Greploop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add galfrevn/apollo --skill greploop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/greploop, .gemini/skills/greploop, .github/skills/greploop and .opencode/skills/greploop in your project.

What does Greploop need to run?

Going by SKILL.md and its folder, Greploop needs the command-line tools its instructions call (git, jq, npm and brew). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(greptile *), Bash(git *).

Does Greploop access the network?

SKILL.md contains no URLs. Its commands use git and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Greploop safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Greploop use?

Greploop is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Greploop use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Greploop?

Skills that share tags, products or a category with Greploop: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Backend Code Review (langflow-ai/langflow, 156k stars) and Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Greploop?

galfrevn (a GitHub user) maintains it in galfrevn/apollo, which has 237 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on August 17, 2026.

Source: galfrevn/apollo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.