chains

chains is a skill for Claude Code, Codex from DeevsDeevs/agent-system. It costs 74 tokens per session (1,023 once invoked), scanned A, original, Apache-2.0.

A file-based handoff system that stores work context as linked Markdown notes in a project. The links record what was requested, completed, decided, and planned so another session or agent can resume.

In plain words
What is it for?
Use it to save progress, continue interrupted work, create branches of a task, hand work to another agent, and search previous decisions.
Why use it?
It preserves context across sessions, summarization, machines, and different coding agents. Searching and loading the latest notes avoids repeating earlier investigation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Good fit Use it to save progress, continue interrupted work, create branches of a task, hand work to another agent, and search previous decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/deevsdeevs/agent-system/chains
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.

Any agent
npx skills add DeevsDeevs/agent-system --skill chains
Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system

Made for: Claude Code, Codex.

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 chains

README.md
[![agentmods](https://agentmods.dev/badge/skills/deevsdeevs/agent-system/chains/github.svg)](https://agentmods.dev/skills/deevsdeevs/agent-system/chains)
Your own site
<a href="https://agentmods.dev/skills/deevsdeevs/agent-system/chains"><img src="https://agentmods.dev/badge/skills/deevsdeevs/agent-system/chains/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 chains

Your own site · 80×15
<a href="https://agentmods.dev/skills/deevsdeevs/agent-system/chains"><img src="https://agentmods.dev/badge/skills/deevsdeevs/agent-system/chains.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,023 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.00074 $0.01023
Opus 5.5 $0.00030 $0.00409
Sonnet 5.5 $0.00015 $0.00205
Haiku 4.5 $0.00007 $0.00102

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

Security

Grade A, and why

chains 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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (chain.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/chains/SKILL.md · 97 lines

How it starts

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

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, ., _, -. A [chains reminder] comes from the end-of-turn hooks (node $C remind), once a session has worked 30 minutes with no link: save one if the work is worth keeping, otherwise just finish.

When to load

  • "Continue", "resume", "pick up", or a reference to earlier work: load or context the named chain; if you don't know which, list, then search.
  • Before non-trivial work in a project with a .chains folder: one quick search before 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.

Read the full file on GitHub · 97 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago Changed · +4 tokens per session f20c8862b6bc
  2. 24d ago Changed · +2 lines abeacc2bb081
  3. 26d ago Changed · +1 lines 3e903eb6ee19
  4. 27d ago First seen · 94 lines · 70 tokens per session scan A 046c2ceecceb

Subscribe to this mod's changes

chains is a skill published in the GitHub repository DeevsDeevs/agent-system (42 stars, last pushed 2d ago), licensed Apache-2.0. It adds 74 tokens to every session and 1,023 once invoked, about $0.0003 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-11-05.

Related

chains compared with skills from other repositories

chains next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chainsDeevsDeevs/agent-systemSkill422d agoApache-2.0A74Claude Code, Codex
git-ai-searchgit-ai-project/git-aiSkill3.0kyesterdayApache-2.0A13Claude Code
rememberpacifio/atlasSkill9.2k11d agoApache-2.0A32Claude Code
ctxctxrs/ctxSkill1.2ktodayApache-2.0A106Claude Code
misakanet-failure-memoryIkalus1988/MisakaNetSkill567todayApache-2.0A31Claude Code
brain-pagemindmuxai/brain.mdSkill72819d agoApache-2.0A47Claude Code
brain-setupmindmuxai/brain.mdSkill72819d agoApache-2.0A63Claude Code