ops-codegraph-tool: Skill for Claude Code

.claude/skills/resolve/SKILL.md

resolve is a skill for Claude Code from optave/ops-codegraph-tool. It costs 34 tokens per session (6,989 once invoked), scanned C, original, Apache-2.0.

A procedure for resolving merge conflicts in a GitHub pull request, where conflicting edits must be combined. It compares the changes and descriptions from both sides before deciding how to resolve each conflict.

In plain words
What is it for?
Use it with a pull request number when its branch has conflicts. It traces where conflicting lines came from, reviews both diffs, and resolves only conflicts whose intent is clear.
Why use it?
It helps preserve the intended functionality of both changes and stops when the correct choice cannot be determined safely.

Skill for Claude Code

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

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/resolve/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 resolve

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/optave/ops-codegraph-tool/resolve"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/resolve.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 6,989 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.06989
Opus 5.5 $0.00014 $0.02796
Sonnet 5.5 $0.00007 $0.01398
Haiku 4.5 $0.00003 $0.00699

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

Security

Grade C, and why

resolve scanned grade C 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

echo "Run: git merge --abort && rm -rf .codegraph/resolve"
.claude/skills/resolve/SKILL.md · 625 lines

How it starts

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

/resolve — Context-Aware Conflict Resolution

Resolve merge conflicts on a given PR by understanding the intent of both sides of every conflict. For each conflicting hunk, the skill finds which PR on the base branch introduced those lines, reads that PR's description and diff, reads the current PR's description and diff, and resolves the conflict so no intentional functionality from either side is lost.

If a conflict is genuinely ambiguous — the skill cannot determine which side's change is intentional without human judgment — it stops and explains rather than guessing.

Arguments

  • First positional argument: the GitHub PR number (required, e.g. /resolve 1490)
  • Set PR_NUMBER from $ARGUMENTS (trim whitespace, strip leading #)

Validation:

PR_NUMBER=$(echo "${ARGUMENTS:-}" | tr -d '[:space:]#')
if ! echo "$PR_NUMBER" | grep -qE '^[0-9]+$'; then
  echo "ERROR: PR number must be a positive integer (got: '${ARGUMENTS:-<empty>}')"
  echo "Usage: /resolve <pr-number>  e.g. /resolve 1490"
  exit 1
fi
echo "Resolving conflicts on PR #$PR_NUMBER"

Phase 0 — Pre-flight

Verify required tools and environment before doing any real work.

for tool in git gh jq; do
  # > /dev/null 2>&1: suppress command path on success and "not found" message on failure — the || clause provides the error message
  command -v "$tool" > /dev/null 2>&1 || { echo "ERROR: required tool '$tool' not found in PATH"; exit 1; }
done
# > /dev/null 2>&1: suppress git's own "fatal: not a git repository" — our message is more actionable
git rev-parse --show-toplevel > /dev/null 2>&1 || { echo "ERROR: not in a git repository"; exit 1; }

# Validate PR number (re-parse here since Phase 0 is self-contained)
PR_NUMBER=$(echo "${ARGUMENTS:-}" | tr -d '[:space:]#')
if ! echo "$PR_NUMBER" | grep -qE '^[0-9]+$'; then
  echo "ERROR: PR number must be a positive integer (got: '${ARGUMENTS:-<empty>}')"
  exit 1
fi

# Guard against a previously aborted merge left in place — if MERGE_HEAD exists but
# .codegraph/resolve/ was already cleaned, the next `git merge` call would fail immediately.
if git rev-parse --verify MERGE_HEAD > /dev/null 2>&1; then
  echo "ERROR: An in-progress merge (MERGE_HEAD) already exists."
  echo "Run: git merge --abort && rm -rf .codegraph/resolve"
  echo "Then re-run /resolve $PR_NUMBER"
  exit 1
fi

# Detect repo slug dynamically so the skill works in any fork or renamed org
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"

# Verify PR exists and is open
gh pr view "$PR_NUMBER" --repo "$REPO" --json number,state,headRefName,baseRefName \

  --jq '"PR #\(.number) [\(.state)] \(.headRefName) → \(.baseRefName)"' \
  || { echo "ERROR: PR #$PR_NUMBER not found or inaccessible"; exit 1; }

Read the full file on GitHub · 625 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 · 625 lines · 34 tokens per session scan C 26a72fd72e6d

Subscribe to this mod's changes

resolve 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 6,989 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). 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

repo-hygiene

Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.

QwenLM/qwen-code · 48 tokens

gh-skill

Manage agent skills with gh skill. Use this skill to discover, preview, install, update, and publish Agent Skills so an agent can self-manage the skills available in its environment.

cli/cli · 41 tokens

cw-gates

Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.

Hmbown/Codewhale · 48 tokens

atmos-hooks

Atmos hooks: lifecycle events, hook kinds, command/store/git/security hooks, step/steps hooks, when: conditions, scoping and overrides, toolchain integration, --skip-hooks, and Atmos Pro/local output.

cloudposse/atmos · 46 tokens

conventional-commit

Conventional Commit - Generate Conventional Commits 1.0.0 compliant messages. MANDATORY for all git commits. Invoke when user says 'commit', 'commit this', or asks to commit code.

termio-sh/termio · 47 tokens