Index of every page on this site: llms.txt
All skills
Run it yourself

Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments. Triggers Greptile review, fixes all actionable comments, pushes/re-shelves, re-triggers review, and repeats. Use when the user wants to fully optimize a PR/MR/CL against Greptile's code review standards.

Use this Skill: https://skilld.dev/gh/aditya-deokar/software-factory/code-review-loop

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesgitlab-api.md

≈689 tokens on demand. Your agent reads this file only when SKILL.md points to it.

GitLab API Reference

Useful GitLab REST API calls for the code-review-loop workflow, using glab api.

glab api automatically resolves :fullpath to the URL-encoded project path from the local git remote.

Fetch MR details

glab mr view <MR_IID> --output json

Key fields:

  • iid — internal MR number (use this, not id)
  • source_branch — equivalent to GitHub's headRefName
  • sha — HEAD commit SHA
  • description — MR body (Greptile may update this with the confidence score)

Trigger Greptile review

glab mr note <MR_IID> --message "@greptile review"

Fetch pipelines for an MR

glab api "projects/:fullpath/merge_requests/<MR_IID>/pipelines"

Check status field: running, pending, success, failed, canceled, skipped.

Fetch jobs for a pipeline (to find the Greptile job)

glab api "projects/:fullpath/pipelines/<PIPELINE_ID>/jobs"

Filter jobs where name matches greptile (case-insensitive). Terminal statuses: success, failed, canceled.

Check if any pipeline is running

glab api "projects/:fullpath/merge_requests/<MR_IID>/pipelines" | \
  jq '[.[] | select(.status == "running" or .status == "pending")] | length'

Returns 0 if no pipelines are running/pending.

Find pipeline for a specific commit SHA

glab api "projects/:fullpath/merge_requests/<MR_IID>/pipelines" | \
  jq -r --arg sha "COMMIT_SHA" '[.[] | select(.sha == $sha)] | sort_by(.id) | last | .id // empty'

Fetch MR notes (to find Greptile's confidence score)

glab api "projects/:fullpath/merge_requests/<MR_IID>/notes?per_page=100&sort=desc&order_by=created_at"

Filter by author.username for the Greptile bot. Scan body for a confidence pattern like 3/5 or 5/5.

The Greptile bot username on GitLab may differ from GitHub's greptile-apps[bot] — check the first Greptile comment on the MR to identify the exact username.

Fetch unresolved discussions (inline comments)

glab api "projects/:fullpath/merge_requests/<MR_IID>/discussions?per_page=100"

Paginate with &page=2, etc. until response array length < per_page.

Filter for unresolved inline diff comments from Greptile:

jq '[.[] | select(.resolved == false and (.notes[0].type == "DiffNote") and (.notes[0].author.username == "GREPTILE_BOT_USERNAME"))]'

Each discussion has:

  • id — use this for resolution
  • notes[0].body — the comment text
  • notes[0].position.new_path — file path

Resolve a discussion

glab api --method PUT \
  "projects/:fullpath/merge_requests/<MR_IID>/discussions/<DISCUSSION_ID>" \
  --field resolved=true

GitLab has no batch resolution — issue one PUT per discussion.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill automates iterative code reviews by interacting with GitHub, GitLab, and Perforce APIs. It triggers reviews from the Greptile service, parses the feedback, and automatically applies fixes to the codebase. The main security consideration is the indirect prompt injection surface where the agent processes external review comments to make code changes.

  • Socket2mo

    1 alert: gptAnomaly

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 546bbff. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago
What it can do
Runs commands
All 1 allowed tools
Bash(gh:*) Bash(glab:*) Bash(git:*) Bash(p4:*)
Other metadata
compatibility
Requires git, gh (GitHub CLI) or glab (GitLab CLI) authenticated, and Greptile installed on the repo. For Perforce, requires p4 CLI authenticated.
metadata
{
  "author": "greptileai",
  "vendored-from": "https://github.com/greptileai/skills",
  "version": "1.4"
}

README badge

README badge for aditya-deokar/software-factory/code-review-loop