Are you the author? Sign in to claim
๐ Graph engineering for long-horizon agents โ a curated prompt library wiring specialized clean-context roles (executor
One brain, many arms. A curated library of battle-tested prompts for long-horizon agent work, compiled to whatever host you run โ Claude Code, Grok, Cursor, Codex. The methodology is shared; each arm adapts it to a host's native shape (a loop, or a goal). Like an octopus, one nervous system reaching into different environments and changing color to fit each one.
This is graph engineering for agents: the shift from over-tuning a single agent loop to wiring specialized, clean-context roles โ executor, supervisor, scout โ into a graph that communicates only through durable, inspectable files. The loop stays dumb; the graph does the thinking.
English ยท ็ฎไฝไธญๆ
A strong model authoring a tuned, opinionated prompt beats hand-driving a host ad hoc โ for repeatable, long-horizon, high-stakes work. (For a quick one-off, just type the task; the library's ROI is in reuse.) The durable value isn't any one mechanism โ it's the discipline: "done" means verified not written, no test theater, no speculative building, forced convergence against growth, and hard owner red lines. That discipline is host-agnostic. octopus is where it lives, once, and gets compiled down to each host.
| Arm | Use when | Ships |
|---|---|---|
loop-graph | you'll drive it with /loop (Claude Code, Grok, Cursor, shell); multi-round work that scope-creeps or fakes "done"; multi-milestone phases; executor and supervisor split across hosts/models; owner-gated | an executor node (works a single-source-of-truth ledger) + a clean-context supervisor node that re-verifies from outside and corrects via a one-way directives file โ two loops |
quest | you'll hand it to a goal command that self-drives to done (Grok /goal, a Codex task); a single self-contained goal, executor+reviewer in the same run | one objective prompt that folds the discipline in and rides the host's own verifier โ no second loop |
Not sure which? The decision rule lives at the top of each arm's SKILL.md, and
the host capability matrix is in lib/host-dialects.md.
Two arms, one discipline. Pick the arm by task shape โ then run it the way your host wants. Most hosts now do both; the host only rules options out.
/loop, never a goal โ an auditor must wake from outside the
executor's context on an interval; a goal races to "done".Authoritative syntax + matrix: lib/host-dialects.md.
Columns are the two arms; โ / โ ๏ธ / โ is whether the host can run that arm, and the cell is how.
| Host | quest โ one self-contained goal | loop-graph โ multi-milestone / gated / want a verifier |
|---|---|---|
| Grok | โ
/goal <objective> โ native adversarial verifier | โ
executor /loop + supervisor /loop |
| Codex | โ
/goal, or just send the objective as a task (self-drives; no verifier) | โ
both nodes on an interval /loop (e.g. /loop 4m) โ never /goal (it livelocks a parked node) |
| Claude Code | โ ๏ธ a self-paced single /loop โ works, but no independent verifier | โ
executor /loop (self-paced) + supervisor /loop (the supervisor is the verifier) |
| Cursor | โ no goal primitive | โ
executor /loop + supervisor /loop โ keep each round < 20 min |
| shell / cron | โ no goal primitive | โ
both loops scheduled; break on a terminal ledger status |
Rule of thumb: task shape picks the arm; the host only rules options out โ โ hosts
can't quest (no goal). The supervisor is always a /loop, never a goal.
lib/)methodology.md โ why each rule exists, tied to the
specific failure mode of long agent runs it prevents. Read this to adapt rules
without breaking them.host-dialects.md โ the single owner of per-host
differences: loop/goal invocation syntax, adaptive-vs-interval behavior, and
wake/notify/keep-alive primitives (Grok Stop/Notification hooks, etc.).Claude Code โ plugin. Claude Code's skill loader does not follow symlinked skill dirs, so install it here as a plugin (versioned, auto-updating via the marketplace):
/plugin marketplace add levi-qiao/octopus-skill
/plugin install octopus@octopus-skill
Codex / Cursor โ script. These hosts' loaders do follow symlinks, so the script clones the library and symlinks it as a single /octopus skill (edits to the clone are live):
curl -fsSL https://raw.githubusercontent.com/levi-qiao/octopus-skill/main/install.sh | sh
Any existing /graphkit install is left untouched; to install from a local clone, run ./install.sh from the repo root.
How it's invoked. /octopus is user-invoked (type it) and model-invoked โ your agent auto-triggers it on a long-horizon task from the skill description, then routes to the right arm. Both arms are self-contained, so loop-graph and quest can also be invoked directly.
octopus applies its own anti-bloat rule to itself: no prompt enters the library without a real consumer โ a run it was actually proven on. Curated and opinionated beats comprehensive. Same bar the executor holds inside a run.
The loop-graph arm grew from real runs and community input โ it began life as the
standalone graphkit skill, and this repo is that project, evolved (the old
graphkit URL redirects here). Special thanks to
@BrightProgrammer7 โ the
migrate-blob-storage worked example and the design discussions that sharpened
the milestone-gate and node/edge vocabulary.
See LICENSE.
Playwright testing toolkit โ test generation, flaky test fix, migration helpers
WCAG accessibility audit โ automated scanning, manual review, remediation
Parallel development with git worktrees โ port isolation, env sync, cleanup
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams