Chainsのロゴ

Chains

コミュニティ
DeevsDeevs
chains

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.

概要

公開者DeevsDeevs
リポジトリagent-system
スキル名chains
スター
41
フォーク
6
同梱ファイル
2
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    DeevsDeevsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルChainsをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/DeevsDeevs/agent-system/tree/main/skills/chains
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DeevsDeevs/agent-system.git /tmp/agent-system
mkdir -p .claude/skills
cp -r /tmp/agent-system/skills/chains .claude/skills/chains
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでChainsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にChainsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Chainsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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):

sh
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.

Always pass --next with the single next step. Write the link as a handoff another agent could act on without this conversation:

  1. Request and intent
  2. Key decisions and why
  3. Work completed (files, commands, results)
  4. Open issues, blockers, risks
  5. 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.

sh
node $C fork work spike              # → parent: <file>
node $C save work --branch spike --parent <file> --next "…" < link.md

When 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

yaml
---
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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Chains」では何ができますか?

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.

TypingMindでChainsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Chainsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにChainsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/DeevsDeevs/agent-system/tree/main/skills/chainsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Chainsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Chainsは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもChainsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Chains」は無料ですか?

はい。DeevsDeevsがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇