OpenCode-GraphAgent CLAUDE.md

Repository guidance for contributing to OpenCode-GraphAgent, a fork of a terminal coding agent with a workflow engine for coordinating dependent agent tasks.

In plain words
What is it for?
Use it when running, building, generating code for, or modifying this repository.
Why use it?
It tells contributors where the project’s architecture, coding rules, commands, and quality checks are documented.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/lexwdex/opencode-graphagent/claude-md
Clone the repo
git clone --depth 1 https://github.com/LeXwDeX/OpenCode-GraphAgent
Per session 4,083 This file is loaded in full into every session.
When invoked 4,083 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.04083 $0.04083
Opus 5 $0.02041 $0.02041
Sonnet 5 $0.00817 $0.00817
Haiku 4.5 $0.00408 $0.00408

Measured 2d ago against content hash df39e164af3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

OpenCode-GraphAgent CLAUDE.md 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 2d 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.

CLAUDE.md · 289 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

OpenCode-GraphAgent (product name "GraphAgent"): a fork of the MIT-licensed opencode terminal AI agent that adds a DAG workflow engine for multi-agent orchestration. A task is decomposed into a dependency graph of child-agent sessions, driven to completion with durable, crash-recoverable, inspectable state. Upstream opencode capabilities (multi-provider LLM, built-in LSP, TUI/desktop/web clients, client/server architecture) are preserved.

AGENTS.md is the canonical contributor guide. It holds the full style guide, git workflow (铁律), and二次开发 (extending) invariants. Read it for how to write code here; this file covers the what and the big-picture architecture, and does not repeat AGENTS.md. Default branch is main.

Commands

Requirements: Bun 1.3+ (packageManager: [email protected]). All commands run from repo root unless noted.

bun install                              # install (postinstall fixes node-pty)

# Run the app (bun dev == local equivalent of the built `opencode` CLI)
bun dev                                  # TUI, in packages/opencode by default
bun dev <directory>                      # TUI against another dir (`bun dev .` for repo root)
bun dev serve                            # headless HTTP API server (default port 4096)
bun dev serve --port 8080                # custom port
bun dev web                              # server + web UI
bun run --cwd packages/app dev           # web app dev server (needs `bun dev serve` running)
bun run --cwd packages/desktop dev       # Electron desktop app

# Quality gates
bun typecheck                            # turbo typecheck across all packages (the commit gate)
bun typecheck                            # also runnable from a package dir, e.g. packages/opencode
bun lint                                 # oxlint, ratcheted: --max-warnings=4852 (see below)

# Tests — NEVER run from repo root (guard: do-not-run-tests-from-root; bunfig enforces it)
cd packages/opencode && bun test                                  # full suite (only-failures shown)
cd packages/opencode && bun test path/to/file.test.ts            # one file
cd packages/opencode && bun test --test-name-pattern "pattern"   # filtered tests
cd packages/opencode && bun run test:dag-core                    # DAG scheduling/state-machine coverage gate
cd packages/opencode && bun run test:httpapi                     # HTTP API contract exerciser (3 modes)

# Build & codegen
./packages/opencode/script/build.ts --single   # standalone binary → packages/opencode/dist/<platform>/bin/opencode
./packages/sdk/js/script/build.ts              # regenerate the JS SDK from the OpenAPI spec (after HTTP route changes)
bun run generate                               # root: regen SDK + openapi.json + format (wrapper of the above)

Read the full file on GitHub · 289 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. 2d ago First seen · 289 lines · 4,083 tokens per session scan A df39e164af3d

Subscribe to this mod's changes

OpenCode-GraphAgent CLAUDE.md is an instructions file published in the GitHub repository LeXwDeX/OpenCode-GraphAgent (111 stars, last pushed 3d ago), licensed MIT. It adds 4,083 tokens to every session, about $0.0204 per session on Opus 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-08-30.