chains
Skill41 starsChanged 6 days agoApache-2.0View on GitHub
Save, load, fork and search .chains links: work context that survives sessions, compaction and handoffs between agents (Claude Code, Codex, pi). Use on 'continue', 'resume', 'pick up', 'where were we', 'save progress', before a long task switch, and when handing work to another agent.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- 2233admin/reverse-skill-evolvertheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- 2233admin/reverse-skill-evolver★ 26same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codebase-orientationSkill
- concept-diagramsSkill
- datadog-pupSkill
- diagnoseSkill
- hcSkill
- validation-reviewSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run the bundled script from this skill's folder (Node is on PATH):
- Very specific: line 33
Before non-trivial work in a project with a .chains folder: one quick search before rediscovering old decisions.
- Distinctive: line 40
After a milestone: feature works, fix verified, design decided, approach rejected for a reason worth keeping, review done.
- Distinctive: line 42
Before context may be lost: long session, before compacting, task switch, handoff, stopping with work pending.
- Distinctive: line 44
Not for one-shot answers, tiny edits, or what the git diff already says, and never when the user says not to.
- Very specific: line 47
Always pass --next with the single next step.
- Distinctive: line 70
When a branch is accepted or dropped, save an outcome link on main.
- Very specific: line 74
Put node $C context <chain> output (or the chain name and "run the chains skill's context") in the delegate's task, whether it's a subagent …
- Distinctive: line 76
When its report changes decisions, exposes a risk or creates follow-up work, save a link naming who reported and what changed.
- Very specific: line 81
Write the file yourself, same layout: .chains/<chain>/YYYY-MM-DD-HHMMSSmmm-<slug>.md (local time), starting with
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chains
A chain is a folder of markdown links in the project: .chains/<chain>/<timestamp>-<slug>.md.
Each link is a handoff: what was asked, what's done, what was decided, what's next. Any
agent on any machine reads the same files.
Run the bundled script from this skill's folder (Node is on PATH):
C=<this skill's folder>/chain.mjs
node $C list [--max N] # chains here, newest first, with next steps (sessions start with this)
node $C list <chain> # its links, newest first
node $C load <chain> # newest link on main (--branch B, --link FILE)
node $C context <chain> # newest link + 2 parents + recent titles: for resuming or a delegate
node $C search <words> [--chain C] # ranked hits with the matching line
node $C save <chain> --next "…" < link.md # parent = the branch's newest link
node $C fork <chain> <branch> # prints the parent for the branch's first save.chains is found by walking up from the current folder, no further than the git root (outside
git, no further than just below ~); a new one goes at the git root, else in the current folder.
--json on any command gives JSON. Chain and branch names: letters, digits, ., _, -.
When to load
- "Continue", "resume", "pick up", or a reference to earlier work:
loadorcontextthe named chain; if you don't know which,list, thensearch. - Before non-trivial work in a project with a
.chainsfolder: one quicksearchbefore rediscovering old decisions. - A link older than 7 days (marked stale), or one that conflicts with the files: treat it as a lead to verify, not as fact.
When to save
- After a milestone: feature works, fix verified, design decided, approach rejected for a reason worth keeping, review done.
- Before context may be lost: long session, before compacting, task switch, handoff, stopping with work pending.
- Not for one-shot answers, tiny edits, or what the git diff already says, and never when the user says not to.
Always pass --next with the single next step. Write the link as a handoff another agent
could act on without this conversation:
- Request and intent
- Key decisions and why
- Work completed (files, commands, results)
- Open issues, blockers, risks
- Next step
For important handoffs, follow link-rubric.md in this folder. Include exact paths,
commands, ids and unresolved errors; skip routine tool chatter.
Branches
main is the default. Branch only for a different hypothesis: a competing design, a risky
spike, a delegate's research track. Continuations, fixes and end-of-session handoffs stay
on the current branch.
node $C fork work spike # → parent: <file>
node $C save work --branch spike --parent <file> --next "…" < link.mdWhen a branch is accepted or dropped, save an outcome link on main.
Handing work to another agent
Put node $C context <chain> output (or the chain name and "run the chains skill's
context") in the delegate's task, whether it's a subagent or an agent started with hc.
When its report changes decisions, exposes a risk or creates follow-up work, save a link
naming who reported and what changed.
Without Node
Write the file yourself, same layout: .chains/<chain>/YYYY-MM-DD-HHMMSSmmm-<slug>.md
(local time), starting with
---
chain: "<chain>"
branch: "main"
parent: "<previous link's file name>"
nextStep: "<next step>"
created: "<ISO time>"
---Load = read the newest file; search = rg in .chains.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

