agentleFS
BboyfaroukBboyfarouk/skills/greploop/SKILL.md

greploop

Skill2 starsChanged 9 months agoMITView on GitHub

Iteratively improves a PR until Greptile gives it a 5/5 confidence score with zero unresolved comments. Triggers Greptile review, fixes all actionable comments, pushes, re-triggers review, and repeats. Use when the user wants to fully optimize a PR against Greptile's code review standards.

  • Commits and pushes

We split this skill into the rules it gives an agent

8 rules. 6 are common, 1 is distinctive, and 1 is very specific to this project.

  • 6

    Common

    Most of the 16 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for the most recent review from greptile-apps[bot] or greptile-apps-staging[bot].

    line 60
  2. Common:

    Stop the loop if any of these are true:

    line 76
  3. Common:

    Read the file and understand the comment in context.

    line 84
  4. Common:

    If actionable, make the fix.

    line 86
  5. Common:

    If informational or a false positive, note it but still resolve the thread.

    line 87
  6. Common:

    After exiting the loop, summarize:

    line 135
  7. Common:

    If the loop exited due to max iterations, list any remaining unresolved comments and suggest next steps.

    line 144
  8. Distinctive:

    If not fully resolved:

    line 156

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Greploop

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

Inputs

  • PR number (optional): If not provided, detect the PR for the current branch.

Instructions

1. Identify the PR

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

Switch to the PR branch if not already on it.

2. Loop

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

A. Trigger Greptile review

Push the latest changes (if any) and wait for Greptile's review check to appear:

git push

Then poll for the Greptile check to complete:

gh pr checks <PR_NUMBER> --watch

B. Fetch Greptile review results

Get the latest review from Greptile:

gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/reviews

Look for the most recent review from greptile-apps[bot] or greptile-apps-staging[bot].

Parse the review body for:

  • Confidence score: Greptile includes a score like 3/5 or 5/5 in its review summary.
  • Comment count: Number of inline review comments.

Also fetch all unresolved inline comments:

gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/comments

Filter to comments from Greptile that are on the latest commit.

C. Check exit conditions

Stop the loop if any of these are true:

  • Confidence score is 5/5 AND there are zero unresolved comments
  • Max iterations reached (report current state)

D. Fix actionable comments

For each unresolved Greptile comment:

  1. Read the file and understand the comment in context.
  2. Determine if it's actionable (code change needed) or informational.
  3. If actionable, make the fix.
  4. If informational or a false positive, note it but still resolve the thread.

E. Resolve threads

Fetch unresolved review threads and resolve all that have been addressed (see GraphQL reference):

gh api graphql -f query='
query($cursor: String) {
  repository(owner: "OWNER", name: "REPO") {
    pullRequest(number: PR_NUMBER) {
      reviewThreads(first: 100, after: $cursor) {
        pageInfo { hasNextPage endCursor }
        nodes {
          id
          isResolved
          comments(first: 1) {
            nodes { body path author { login } }
          }
        }
      }
    }
  }
}'

Resolve addressed threads:

gh api graphql -f query='
mutation {
  t1: resolveReviewThread(input: {threadId: "ID1"}) { thread { isResolved } }
  t2: resolveReviewThread(input: {threadId: "ID2"}) { thread { isResolved } }
}'

F. Commit and push

git add -A
git commit -m "address greptile review feedback (greploop iteration N)"
git push

Then go back to step A.

3. Report

After exiting the loop, summarize:

FieldValue
IterationsN
Final confidenceX/5
Comments resolvedN
Remaining commentsN (if any)

If the loop exited due to max iterations, list any remaining unresolved comments and suggest next steps.

Output format

Greploop complete.
  Iterations:    2
  Confidence:    5/5
  Resolved:      7 comments
  Remaining:     0

If not fully resolved:

Greploop stopped after 5 iterations.
  Confidence:    4/5
  Resolved:      12 comments
  Remaining:     2

Remaining issues:
  - src/auth.ts:45 — "Consider rate limiting this endpoint"
  - src/db.ts:112 — "Missing index on user_id column"

Download now (ZIP)

  • Other versions16 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 11

    1. elsa-workflows/elsa-core★ 7.9k20% same
    2. tmoroney/auto-subs★ 4.3k23% same
    3. greptileai/skills★ 42522% same
    4. haseeb-heaven/gworkspace-agent★ 8224% same
    5. canvascoding/canvas-notebook★ 1111% same
    6. The-Utopia-Studio/skills★ 633% same
    7. kellykampen/agent-skills★ 223% same
    8. Nagacash/nagacodex-factory-skill★ 120% same
    9. NemesLaszlo/Agent-Collection★ 120% same
    10. imornar/skills★ 020% same

    1 more not listed

    Wrote their own version · 5

    1. michaelshimeles/rstack★ 1.4ksame name
    2. michaelshimeles/skills★ 1.4ksame name
    3. jaydubya818/MissionControl★ 2same name
    4. nitikeshq/skills★ 2same name
    5. Rajveerx11/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use greploop-apps, evidence-driven-testing and 5 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • jaydubya818Skill

      greploop-apps

      Run greploop through @greptile-apps when the normal trigger rejects a large PR. Use only with the companion greploop skill.

      Also in 5 projects that use this

    • jaydubya818Skill

      evidence-driven-testing

      Capture observable runtime proof with video, screenshots, or measured output. Use when a change needs evidence beyond test reports.

      Also in 5 projects that use this

    • VercelSkill

      before-and-after

      Add existing screenshots or screen recordings to a GitHub pull request as a before/after or preview block. Use when a PR needs visual media attached to its description. Browser navigation and capture belong to agent-browser.

      Also in 5 projects that use this

    • DonTiziSkill

      new-feature

      Plan new features/integrations following SOLID principles. Analyzes codebase architecture, researches official documentation and best practices, designs extensible solution, and creates comprehensive GitHub issue with implementation blueprint.

      Also in 4 projects that use this

    • photon-groveSkill

      unslop

      Detects and rewrites generic, overly polished, or AI-sounding prose while preserving meaning. Use when the user asks to "unslop", humanize, de-AI, tighten, or review whether writing sounds generated.

      Also in 5 projects that use this

    • StrayDragonSkill

      ui-ux-pro-max

      UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

      Also in 3 projects that use this

    • +1 more from jaydubya818
  • In this repositoryOne other file it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.