longgraph-skill

by levi-qiaoVerified

Long-horizon agent skill for Claude Code / Cursor / Codex / Grok Build — multi-task ledger loop, host-portable, clean-context supervisor, verified gates. Markdown library (loop-graph), not a framework.

58
Stars
7
Forks
Shell
Language
8/24/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/levi-qiao/longgraph-skill

Getting Started

Guides for using skills like longgraph-skill.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

longgraph

Long-horizon agent skill for Claude Code, Cursor, Codex & Grok Build.

Stop agent drift with a durable ledger, a clean-context supervisor, and verified gates. Queue many long tasks in one loop — even unrelated ones — and keep going after a host switch by re-sending the same prompt against the files.

Design once → compile a durable loop-graph → verify all the way to done.

GitHub stars License: MIT PRs welcome Hosts: Claude Code · Cursor · Codex · Grok Build Type: agent skill · prompt library

English · 简体中文

Executor and clean-context supervisor loops running side by side

longgraph (longgraph-skill) is a curated agent skill and cross-host prompt library for long-running / long-horizon agent work — multi-hour coding, multi-milestone migrations, a queue of long tasks in one loop (they need not be related), and anything that outlives one context window. It is graph engineering for agents: specialized roles (executor · supervisor · scout) connected through durable, inspectable files — not another orchestration runtime. Because the scoreboard lives on disk, you can change hosts mid-run: open the same workspace, re-send the frozen node prompt, and continue.

One durable graph, portable across hosts. For a simple self-contained goal, use the host's normal task or goal directly; longgraph starts where durable graph structure adds value.

Evidence

These are not one-shot demos. longgraph is a Markdown skill / prompt library (not an orchestration runtime). The table mixes checkable public Git, a function-only redacted multi-day pattern, and synthetic pedagogy.

CaseWhat a reader can verifyKind
Self-iteration of this skill87 public commits across ~14 calendar days (2026-07-19 → 2026-08-02), 74 files, method rules written back into the library (no wake edge, gate-wait backlog, blocked≠parked, bounded live edges, authoring≠runtime)Public Git facts — fixed anchor 6efcb7f
Multi-day control-plane patternMulti-day wall-clock, tens of rounds, many directives: durable ledger, clean-context supervisor overturns self-reported evidence, non-skippable gates, blocked-work lane, owner A/B/C — functions only, no private payloadRedacted real-run pattern
migrate-blob-storageMulti-milestone ledger: pilot → cohort, forced convergence, supervisor overturns self-reported evidence, non-skippable gate + blocked-work laneSynthetic pedagogy (fictional app)
add-tests-to-cliSmallest full run: three rounds, register-then-defer, clean-context supervisor intentSynthetic pedagogy (fictional CLI)

How to read the clock. The self-iteration window’s ~14 days / ~340 hours is project wall-clock (first public commit → frozen anchor), not continuous model execution and not a claim of unattended production autonomy. Re-check Git with the commands in the self-iteration case. The redacted multi-day card uses coarse buckets only and is not private-Git re-checkable — see its evidence boundary.

Publication rules for future cases: public / private boundary.

When to use this

Reach for longgraph when you need any of:

  • A long-horizon agent that keeps working after context compaction / session resets
  • A durable task ledger (single scoreboard) instead of chat-memory progress
  • Several long tasks in one loop — a continuous queue, even when items are unrelated
  • Host-portable continuity — switch Claude Code ↔ Cursor ↔ Codex ↔ Grok Build mid-run by re-sending the prompt against the same files
  • An independent clean-context supervisor — not the same agent grading itself
  • Verified done: acceptance gates re-run against real output, not self-reported “done”
  • Multi-milestone work with non-skippable gates and explicit owner red lines
  • A Markdown skill / prompt library that works across Claude Code · Cursor · Codex · Grok Build

When not to use this

  • One-shot edits, small PR-sized tasks, or anything that fits a single clean session
  • You want a runtime framework (LangGraph, CrewAI, AutoGen, custom agent server)
  • You only need a single short prompt with no ledger, gates, or independent review

How it compares

ApproachRuntime / server?Independent verifierDurable scoreboardMulti-task queue + mid-run host switch
LangGraph / CrewAI / AutoGenYesYou build itUsually yesFramework-bound; often one deployment stack
One mega-prompt / single skillNoNo (self-check)Weak (chat memory)Weak — progress dies with the session
longgraph (this repo)No — Markdown onlyYes (supervisor node)Yes (ledger.md)Yes — files are the run; re-send the prompt

Also called / related searches: longgraph skill, long-horizon agent skill, long-running agent skill, prevent agent drift, multi-task agent loop, switch AI coding host mid-task, Claude Code multi-agent supervisor, Grok Build agent loop, agent ledger, loop-graph, graph engineering for agents, clean-context review.

Why longgraph

Long-running agents tend to drift in predictable ways: scope expands, “done” becomes self-reported, tests stop proving the real path, and early decisions disappear from context. longgraph moves the safeguards outside the model’s memory:

  • Verified, not merely written — acceptance gates are rerun against real output.
  • Durable state — the ledger survives context loss and remains the single scoreboard.
  • Many long tasks, one loop — the ledger is a continuous queue; items can be independent (migrations, test debt, docs, gates) without forcing one mega-goal.
  • Host-portable — progress is files under .longgraph/<date-slug>/, not chat history. Point another host at the same workspace, re-send the compiled node prompt, and pick up the next open ledger item.
  • Clean-context review — an independent supervisor can catch drift the executor cannot see.
  • Forced convergence — growth is periodically stopped, measured, and simplified.
  • Low-friction owner decisions — genuine owner-only calls arrive as a short recommended A/B/C choice, not a technical homework assignment.

It is Markdown, not an orchestration framework: no application runtime, server, or vendor lock-in. Install as a Claude Code plugin, or symlink into Codex / Cursor / Grok Build (see install script). Runtime nodes on Grok Build stay prompts-only — two /loop pastes, no direct launch.

Multi-task loops & switching hosts

One loop is a queue, not a single story. Each round still completes one independently verifiable ledger work item end-to-end (implement → verify → record). That item may be one coherent workset of coupled changes sharing a behavior claim, write set, and gate; unrelated work stays separate. The ledger can hold many long items at once — related milestones or unrelated backlog (the gate-wait backlog pattern is the extreme case: useful work with no dependency on the item under audit). You do not need a new graph every time the next long task is about something else.

The host is swappable; the files are not. A compiled loop-graph run freezes prompts and state under .longgraph/<date-slug>/. To continue elsewhere:

  1. Use a workspace that can see those files (and the project).
  2. Re-send the same frozen executor (and, if used, supervisor) prompt on the new host.
  3. The node reads ledger.md / directives.md and continues from the next open item.

You are not exporting chat transcripts. Invocation syntax still follows each host’s dialect (per-host references) — only the progress is portable.

Is longgraph the right tool?

Your task shapeChooseWhat you get
One self-contained goal that fits a normal task/sessionUse the host's ordinary task or goal directlyNo longgraph wrapper or extra prompt layer
A feature, integration, migration, or behavior requirement across many verified slices/loop-deliverA requirement pack on the shared graph, with traceable acceptance proof
Multi-round unused / duplicate / reuse / slim (same two-node graph)/loop-convergeThe shared compiler with a pre-bound convergence pack
Compare feasible approaches with open-source evidence, primary research, and experiments/loop-researchAn evidence-led decision pack; it selects only when results are comparable
Many rounds with a custom shape not covered abovelonggraph / loop-graphThe shared compiler for a custom graph run

Rule of thumb: if you do not need the graph, do not use longgraph.

Quick start

Claude Code

Install the plugin from the marketplace:

/plugin marketplace add levi-qiao/longgraph-skill
/plugin install longgraph@longgraph-skill

Codex, Cursor, or Grok Build

Install the library and symlink /longgraph, /loop-converge, /loop-deliver, and /loop-research into hosts whose loaders follow symlinks:

curl -fsSL https://raw.githubusercontent.com/levi-qiao/longgraph-skill/main/install.sh | sh

From a local clone, run ./install.sh at the repository root.

Authoring on Grok Build is /longgraph after that install. Starting the two runtime nodes is still prompts-only: paste the compiled /loop lines — see Grok Build. Cursor and shell/cron use the same prompts-only execution path — see host compatibility.

Design a run

Invoke /longgraph; it routes cleanup to /loop-converge, requirements to /loop-deliver, and evidence-led option selection to /loop-research. It detects the current host, inspects the workspace, and asks only for unresolved owner decisions before compiling the run. Choose direct creation on Codex or Claude Code to have it start both same-host runtime nodes, or prompts-only for manual/cross-host launch (including Grok Build). Use loop-graph directly only for a genuinely custom run shape.

Authoring and runtime stay separate: the author skill compiles the work but never executes it. Generated nodes follow their frozen run contract under .longgraph/<date-slug>/.

How the graph works

RoleResponsibilityDurable edge
ExecutorWorks one independently verifiable ledger work item, verifies it in the same round, then records the resultReads and writes ledger.md
SupervisorRe-verifies from its own separate context, checkpoints passing work, and corrects driftReads the ledger; steers only through the directives edge (live queue + cold archive)
Scout (optional)Researches a bounded question away from the critical pathWrites a findings file read only on reference

The load-bearing rule is one node = one prompt + one single-writer edge. The ledger has exactly one writer. The supervisor never shares the executor’s context, never edits its scoreboard, and steers only through the one-way directives edge.

For the rationale behind every constraint, read the methodology. For the node and edge model, see the loop-graph model.

Host compatibility

Hostloop-graph execution
Codex✅ detects the host and directly creates both runtime nodes
Claude Code✅ detects the host and directly creates two background runtime sessions when capability checks pass
Grok Buildprompts-only — two /loop tasks (executor + supervisor), no wake edge
Cursorprompts-only execution target
shell / cronprompts-only execution target

Authoritative syntax, pacing, context carry, and hooks live in separate per-host references, so authoring loads only the selected host. Mid-run host switches reuse the same durable run directory; only how you start each tick changes.

Repository map

PathPurpose
Root SKILL.md/longgraph router; chooses the focused pack or custom compiler path
Loop-graph compilerGenerates the shared executor, supervisor, ledger, directive, and ops artifacts
loop-convergePreset entry: code-convergence interview → same loop-graph compile
loop-deliverPreset entry: requirement-delivery interview → same compile
loop-researchPreset entry: evidence-led solution-selection interview → same compile
Preset contractBoundary between the shared compiler and goal-specific packs
lib/Shared methodology
Host referencesOne independently loaded owner for each host's runtime facts
Worked examplesPublic-Git self-iteration plus fictional ledgers showing gates in action
Public / private boundaryWhat may enter the public tree vs stay project-local

Governance

longgraph applies its own anti-bloat rule to the library: no prompt enters without a real run that proved its value. Curated and opinionated beats comprehensive.

Contributions are welcome. Start with the contribution guide.

Credits

The loop-graph skill grew from real runs and community input. A public-Git self-iteration case records how the method was hardened into this library. Special thanks to @BrightProgrammer7 for the migrate-blob-storage example and the discussions that sharpened milestone gates and the node/edge vocabulary.

License

MIT © 2026 levi-qiao

Frequently Asked Questions

What is longgraph-skill?

longgraph-skill is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by levi-qiao. Long-horizon agent skill for Claude Code / Cursor / Codex / Grok Build — multi-task ledger loop, host-portable, clean-context supervisor, verified gates. Markdown library (loop-graph), not a framework. It has 58 GitHub stars.

Is longgraph-skill safe to use?

Yes. longgraph-skill passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install longgraph-skill?

Clone the repository with "git clone https://github.com/levi-qiao/longgraph-skill" and add it to your Claude Code skills directory (see the Installation section above). longgraph-skill ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is longgraph-skill written in?

longgraph-skill is primarily written in Shell. It is open-source under levi-qiao on GitHub, so you can review or fork the full source.

Are there alternatives to longgraph-skill?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh longgraph-skill against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details