OpenCode-GraphAgent: Command for Claude Code

.opencode/command/watch-ci.md

watch-ci is a command for Claude Code, OpenCode from LeXwDeX/OpenCode-GraphAgent. It costs 14 tokens per session (313 once invoked), scanned A, original, MIT.

A repository command that starts a background watcher for a GitHub pull request or the current branch's pull request. A pull request is a proposed code change awaiting review, and the watcher reports its continuous-integration checks.

In plain words
What is it for?
Installing the repository watcher, monitoring a pull request's checks, and prompting follow-up repairs when checks fail.
Why use it?
It avoids repeatedly checking whether automated checks have finished while work continues. It also helps the agent notice failures after a new commit is pushed without merging the pull request automatically.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: $ARGUMENTS substitution, but also installed under .opencode/. Also seen: mentions OpenCode.

This is LeXwDeX/OpenCode-GraphAgent's own configuration. It tells Claude Code and OpenCode how to work on OpenCode-GraphAgent 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 OpenCode-GraphAgent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LeXwDeX/OpenCode-GraphAgent. 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/LeXwDeX/OpenCode-GraphAgent/main/.opencode/command/watch-ci.md
Clone the repo
git clone --depth 1 https://github.com/LeXwDeX/OpenCode-GraphAgent

Made for: Claude Code, OpenCode.

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 watch-ci

README.md
[![agentmods](https://agentmods.dev/badge/commands/lexwdex/opencode-graphagent/watch-ci/github.svg)](https://agentmods.dev/commands/lexwdex/opencode-graphagent/watch-ci)
Your own site
<a href="https://agentmods.dev/commands/lexwdex/opencode-graphagent/watch-ci"><img src="https://agentmods.dev/badge/commands/lexwdex/opencode-graphagent/watch-ci/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 watch-ci

Your own site · 80×15
<a href="https://agentmods.dev/commands/lexwdex/opencode-graphagent/watch-ci"><img src="https://agentmods.dev/badge/commands/lexwdex/opencode-graphagent/watch-ci.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 313 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00014 $0.00313
Opus 5.5 $0.00006 $0.00125
Sonnet 5.5 $0.00003 $0.00063
Haiku 4.5 $0.00001 $0.00031

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

Security

Grade A, and why

watch-ci scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/command/watch-ci.md · 13 lines

What it actually says

Watch CI for $ARGUMENTS (omit the argument to use the current branch's PR).

  1. Ensure the repository watcher is installed with bun .opencode/hooks/install-ci-watcher.ts. This merges its two owned handlers into ignored .opencode/hooks.json, preserving user hooks. Do not replace that file with the template.
  2. Run bun .opencode/hooks/watch-ci.ts request <PR> through the Bash tool; omit <PR> when no argument was supplied. Accept only a PR number or an HTTPS PR URL on the configured GitHub host. Pass it as a literal argument, never interpolate arbitrary user text into shell syntax.
  3. The successful helper prints a validated OPENCODE_CI_WATCH URL. The PostToolUse hook starts a background watcher and returns immediately. Tell the user it is running, then continue useful work without starting another foreground watch.
  4. On its result, inspect the exact reported head. Repair failing checks within the task scope and use this command again after pushing a new head. A timeout or unavailable result permits another attempt. Required-check acceptance and merge remain the main agent's responsibility; this helper never merges.

A successful direct gh pr create ... invocation already starts this watcher when installed. Use this command for existing PRs, changed heads, or creation through compound commands/wrappers. Repeated requests for an active or successfully reported PR/head in the same session are deduplicated.

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. 3d ago First seen · 13 lines · 14 tokens per session scan A bd68f9ddec90

Subscribe to this mod's changes

watch-ci is a command published in the GitHub repository LeXwDeX/OpenCode-GraphAgent (114 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 313 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-20.