chain-link

A command that creates a detailed summary of the current conversation for use in a later session. It records requests, decisions, technical details, attempted solutions, and unresolved problems.

In plain words
What is it for?
Use it to preserve coding-task progress, architecture choices, file details, bugs, and next steps between sessions.
Why use it?
It prevents important context from being lost when work continues in a new conversation.

Command

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 commands/deevsdeevs/agent-system/chain-link
Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 980 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.00000 $0.00980
Opus 5 $0.00000 $0.00490
Sonnet 5 $0.00000 $0.00196
Haiku 4.5 $0.00000 $0.00098

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

Security

Grade A, and why

chain-link 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/commands/chain-link.md · 124 lines

How it starts

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

Creates a detailed summary of the conversation chunk for continuing work in future sessions.

Chain name: $ARGUMENTS

If no chain name provided, ask the user for one.

Goal

Create a thorough summary capturing technical details, code patterns, architectural decisions, unresolved bugs, and solutions attempted. This enables seamless continuation without losing context.

Process

Before your final summary, wrap analysis in <analysis> tags to organize thoughts. Chronologically analyze each message, identifying:

  • User's explicit requests and intents
  • Your approach to addressing requests
  • Key decisions, technical concepts, code patterns
  • Specific details: file names, full code snippets, function signatures, line numbers
  • Bugs encountered and solutions attempted (successful and failed)

Your summary should include:

  1. Primary Request and Intent: Capture all user's explicit requests in detail
  2. Key Technical Concepts: Technologies, frameworks, and patterns discussed
  3. Work Completed: What was successfully finished and is working (e.g., "Auth handler fully implemented and tested")
  4. Decisions and Rationale: Key decisions made (approach A over B) and why
  5. Files and Code Changes:
    • Created: New files with full code
    • Modified: Changed files with before/after snippets and line numbers
    • Read: Files examined for context (brief note on why)
  6. Unresolved Issues and Blockers: ONLY unresolved problems with:
    • Complete error messages and stack traces
    • Symptoms and when discovered
    • All solutions attempted (what worked, what didn't, why)
    • Current status
  7. Pending Tasks: Explicitly requested but incomplete tasks
  8. Current Work: What was in progress when this link was created (file names, line numbers, code snippets)
  9. Next Step: Immediate next action, directly aligned with user's requests

Create a slug (e.g., implement-auth-handler) and readable summary (e.g., "Implement Auth Handler")

Output Structure

Read the full file on GitHub · 124 lines

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 · 124 lines · 0 tokens per session scan A bbd5737b6073

Subscribe to this mod's changes

chain-link is a command published in the GitHub repository DeevsDeevs/agent-system (40 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 980 tokens. 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.