chain-system

A system for saving and restoring structured notes about coding work between sessions. It stores links containing decisions, changed files, unresolved issues, and next steps.

In plain words
What is it for?
Use it to save progress, load the latest context for a project, list previous links, and continue unfinished work.
Why use it?
It prevents you from having to rediscover project context after a session ends or when work resumes later.

Skill for Claude CodeCodex

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 skills/deevsdeevs/agent-system/chain-system
Any agent
npx skills add DeevsDeevs/agent-system --skill chain-system
Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 The whole file, excluding the scripts and references it only reads on demand.
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.00068 $0.00778
Opus 5 $0.00034 $0.00389
Sonnet 5 $0.00014 $0.00156
Haiku 4.5 $0.00007 $0.00078

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

Security

Grade A, and why

chain-system 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.

chain-system/SKILL.md · 84 lines

How it starts

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

Chain System

Overview

Capture durable, structured summaries of work so a later session can resume without re-discovery. Provide three subcommands under one skill: link, load, and list.

Usage

Invoke with a subcommand:

$chain-system link <chain-name>
$chain-system load <chain-name>
$chain-system list

If the chain name is missing for link or load, ask the user for it.

Chain Root

Default to .claude/chains to remain compatible with the existing Claude chain-system plugin. If the user explicitly wants Codex-only storage, switch to .codex/chains and confirm.

Subcommands

link

Create a new chain link summarizing the current work.

Steps:

  1. Build a concise but complete summary using this structure:
    • Primary Request and Intent
    • Key Technical Concepts
    • Work Completed
    • Decisions and Rationale
    • Files and Code Changes (Created/Modified/Read)
    • Unresolved Issues and Blockers (only if any)
    • Pending Tasks
    • Current Work
    • Next Step
  2. Create a slug (kebab-case) and a human readable title.
  3. Create the directory: mkdir -p .claude/chains/<chain-name>.
  4. Generate timestamp in local time: date '+%Y-%m-%d-%H%M'.
  5. Write the summary to: .claude/chains/<chain-name>/<timestamp>-<slug>.md
  6. Write only the summary (no analysis), then tell the user the file path and how to load it.

Use the same file format each time so load can extract summary and next step reliably.

load

Load the most recent chain link for a named chain.

Steps:

  1. Find the most recent link:
    • ls .claude/chains/<chain-name>/*.md 2>/dev/null | sort -r | head -1
  2. If none, tell the user the chain does not exist and suggest list.
  3. Read the file fully and internalize it as working context.
  4. List the 5 most recent links:
    • ls .claude/chains/<chain-name>/*.md 2>/dev/null | sort -r | head -5
  5. Detect insufficiency and ask questions if needed:
    • Missing context referenced by the link
    • Ambiguous "Next Step"
    • Stale link (>7 days old)
  6. Show the user: chain name, most recent link filename, short summary, next step, and the 5 most recent links.
  7. If any insufficiency flags exist, stop and clarify before proceeding.

Read the full file on GitHub · 84 lines

Files

What ships with it

5 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. 2d ago First seen · 84 lines · 68 tokens per session scan A 8dec0e83b302

Subscribe to this mod's changes

chain-system is a skill published in the GitHub repository DeevsDeevs/agent-system (40 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 68 tokens to every session and 778 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via omc ask, with artifact capture and no raw CLI assembly.

Yeachan-Heo/oh-my-claudecode · 37 tokens

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup.

Yeachan-Heo/oh-my-claudecode · 16 tokens

reflect

Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.

alvinunreal/oh-my-opencode-slim · 53 tokens

codemap

Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping.

alvinunreal/oh-my-opencode-slim · 34 tokens

scientific-schematics

Create publication-quality scientific diagrams using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.1 Pro Preview for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways…

xintaofei/codeg · 68 tokens

openpets

Use when the user asks to install, configure, verify, troubleshoot, or understand OpenPets; install or select a pet; connect Claude Code, OpenCode, Cursor, Codex, or MCP clients; configure a project to use a specific pet; or debug openpetsstatus, openpetsreact, or openpetssay.

alvinunreal/openpets · 70 tokens