ops-codegraph-tool: Skill for Claude Code

.claude/skills/sweep/SKILL.md

sweep is a skill for Claude Code from optave/ops-codegraph-tool. It costs 34 tokens per session (14,746 once invoked), scanned A, original, Apache-2.0.

A workflow for reviewing every open GitHub pull request, which is a proposed code change awaiting merging. It checks conflicts, automated checks, and reviewer feedback.

In plain words
What is it for?
Use it to update branches, resolve conflicts, fix CI failures, address Claude and Greptile comments, and request fresh reviews.
Why use it?
It brings many unfinished pull requests toward a mergeable state without checking each one separately.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; positional $N argument.

This is optave/ops-codegraph-tool's own configuration. It tells Claude Code how to work on ops-codegraph-tool itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ops-codegraph-tool configures →

Reuse

Borrowing it

Nothing to install: this file belongs to optave/ops-codegraph-tool. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/optave/ops-codegraph-tool/main/.claude/skills/sweep/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/optave/ops-codegraph-tool

Made for: Claude Code.

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 sweep

README.md
[![agentmods](https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/sweep/github.svg)](https://agentmods.dev/skills/optave/ops-codegraph-tool/sweep)
Your own site
<a href="https://agentmods.dev/skills/optave/ops-codegraph-tool/sweep"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/sweep/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 sweep

Your own site · 80×15
<a href="https://agentmods.dev/skills/optave/ops-codegraph-tool/sweep"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 75
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
  • high Tool Misuse · line 115
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 301
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Prompt Injection · line 410
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Tool Misuse · line 712
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found 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.00034 $0.14746
Opus 5.5 $0.00014 $0.05898
Sonnet 5.5 $0.00007 $0.02949
Haiku 4.5 $0.00003 $0.01475

Measured 2mo ago against content hash a39f7c0b5d1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sweep scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# block is tested, executable code — not prose. Keep it hermetic: no gh/curl/git in command
.claude/skills/sweep/SKILL.md · 731 lines

How it starts

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

PR Review Sweep

You are performing a full review sweep across all open PRs in this repository. Your goal is to bring every PR to a clean, mergeable state: no conflicts, CI passing, all reviewer comments addressed, and reviewers re-triggered until satisfied.


Step 0: Worktree Isolation

Before doing anything else, run /worktree to get an isolated copy of the repo. CLAUDE.md mandates that every session starts with /worktree to prevent cross-session interference. All subsequent steps run inside the worktree.


Step 1: Discover Open PRs

Detect the repo slug dynamically so this skill works in any fork or renamed org — never hardcode it:

REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null \
  || git remote get-url origin 2>/dev/null \
     | sed -nE 's#^(git@github\.com:|https://github\.com/|ssh://git@github\.com/)([^/]+/[^/]+)/?$#\2#p' \
     | sed -E 's/\.git$//')
if [ -z "$REPO" ]; then
  echo "ERROR: could not detect GitHub repo slug — ensure 'gh' is authenticated or 'origin' points to GitHub"
  exit 1
fi
echo "Detected repo: $REPO"

gh pr list --repo "$REPO" --state open --json number,title,headRefName,baseRefName,mergeable,statusCheckRollup,reviewDecision --limit 50

Record each PR's number, branch, base, merge status, and CI state.


Step 2: Launch Parallel Subagents

Each PR is independent work — launch one Agent subagent per PR, all in parallel. Use isolation: "worktree" so each agent gets its own copy of the repo with no cross-PR contamination.

Pass each agent the full PR processing instructions (Steps 2a–2i below) along with the PR number, branch, base, current state from Step 1, and the $REPO slug detected in Step 1. Every <repo> placeholder in the instructions below and in every gh/gh api command must be substituted with that literal detected value before handing the prompt to the agent — never let a subagent fall back to a hardcoded or guessed repo name. The agent prompt must include all the rules from the Rules section at the bottom of this skill — copy them verbatim, do not paraphrase or summarize.

Read the full file on GitHub · 731 lines

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. 2mo ago First seen · 731 lines · 34 tokens per session scan A a39f7c0b5d1d

Subscribe to this mod's changes

sweep is a skill published in the GitHub repository optave/ops-codegraph-tool (99 stars, last pushed 5d ago), licensed Apache-2.0. It adds 34 tokens to every session and 14,746 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review

The definitive code review, for any codebase. Five-phase workflow: git context detection (worktree, branch, base, changed files), Pharaoh recon (architecture map, module context, blast radius in one call, with a fallback when the repo isn't mapped), parallel specialized agent dispatch (code quality, security against…

Pharaoh-so/pharaoh-mcp · 131 tokens

autofix-pr

Watch a pull request and fix it from a worktree of its own - CI failures, review feedback from trusted authors and merge conflicts are fixed, pushed to the PR branch and answered on the PR under the user's git and gh identity. Usage - /autofix-pr [ | ] [--once] [--every ] [--no-reply] [--yes] [instructions]…

QwenLM/qwen-code · 123 tokens

gh-find-prs

Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.

Hmbown/CodeWhale · 27 tokens

hunk-release

Prepares, publishes, verifies, and curates Hunk releases. Use for release metadata, benchmarks, tags, publishing, release videos, backports, or recovery.

modem-dev/hunk · 38 tokens

git

Git and code hosting platform management — GitHub, GitLab, Codeberg, Forgejo. Zero barrier — install x-cmd and manage repos from the terminal. Use for "git", "github", "gitlab", "repo", "pull request", "code hosting".

x-cmd/x-cmd · 58 tokens

vhs-e2e-gif

Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit. Use when asked to record an e2e run, demo a fix on a PR, attach a GIF or screen recording to a pull request, show a test passing visually, or produce a terminal…

dimetron/pi-go · 106 tokens