brain-clone

brain-clone is a skill for Claude Code, Codex from Artesiana/agent2. It costs 96 tokens per session (8,368 once invoked), scanned A, original, MIT.

An interview process for turning a domain expert's working knowledge into a complete Agent2 agent. It captures the expert's identity, reasoning pattern, tools, knowledge, examples, and preferred output format.

In plain words
What is it for?
Use it to interview an expert and generate an agent with its prompt, knowledge collections, memory, tools, schema, and output checks.
Why use it?
It provides a structured way to preserve practical expertise instead of recording only a list of facts or rules. The result follows a defined production-agent architecture.

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/artesiana/agent2/brain-clone
Any agent
npx skills add Artesiana/agent2 --skill brain-clone
Clone the repo
git clone --depth 1 https://github.com/Artesiana/agent2

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 brain-clone

README.md
[![agentmods](https://agentmods.dev/badge/skills/artesiana/agent2/brain-clone.svg)](https://agentmods.dev/skills/artesiana/agent2/brain-clone)
Your own site
<a href="https://agentmods.dev/skills/artesiana/agent2/brain-clone"><img src="https://agentmods.dev/badge/skills/artesiana/agent2/brain-clone.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,368 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.00096 $0.08368
Opus 5 $0.00048 $0.04184
Sonnet 5 $0.00019 $0.01674
Haiku 4.5 $0.00010 $0.00837

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

Security

Grade A, and why

brain-clone 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 5d 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.

.agents/skills/brain-clone/SKILL.md · 790 lines

How it starts

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

Brain Clone

Overview

Turn a domain expert's brain into a production Agent2 agent through structured interview. The skill extracts tacit professional knowledge — not just facts, but the expert's Chain-of-Thought — and generates a complete agent following the proven Sachbearbeiter architecture: 5-layer Chain-of-Thought prompt, tool metaphors, knowledge collections, memory, sandbox tools, and structured output with outcome consistency validation.

Canonical references in this repo:

  • docs/brain-clone-pattern.md explains the Agent2 Brain Clone pattern.
  • docs/reference-agents/sachbearbeiter-pattern.md explains the production reference architecture.
  • agents/procurement-compliance-officer is the full public flagship example to study before generating a serious domain agent.

Core insight: Domain expertise is not a list of rules. It is a Sachbearbeiter-style Chain-of-Thought: a professional mental loop of intake, lookup, checking, clarification, decision, and memory update. Facts go into knowledge books. The expert's Chain-of-Thought goes into the prompt.

Important: In Agent2, "Chain-of-Thought" means the domain professional's explicit work-thinking pattern, not a request to expose private model internals. The prompt should make the agent run the expert's mental chain; the output should expose concise reasoning and review_steps[] as the observable trace of that work.

When to Use

  • Domain expert wants to "clone" their professional decision-making into an AI agent
  • User says "brain clone", "clone my brain", "create domain expert", "extract my expertise"
  • Building an agent for a regulated/specialized domain (accounting, legal, medical, compliance, procurement, HR, insurance)
  • Need to go beyond simple "You are an expert in X" prompts to Sachbearbeiter-level Chain-of-Thought prompts

Do NOT use for: Generic chatbots, simple CRUD agents, or agents that don't need domain expertise. Use creating-agents skill instead.

The 5-Layer Prompt Architecture

Read the full file on GitHub · 790 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. 5d ago First seen · 790 lines · 96 tokens per session scan A 3ccbe56ce80d

Subscribe to this mod's changes

brain-clone is a skill published in the GitHub repository Artesiana/agent2 (36 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 8,368 once invoked, about $0.0005 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.