Expert Capsule: Turn Your AI Chat History Into a Skill

    by hiếu hoàng

    1

    Turn your own ChatGPT, Claude or Gemini chat history into a personal Agent Skill that makes an AI work by your standards, style and domain rules.

    Free

    Security scanned

    Works with the AI Agents you already use

    Expert Capsule: Turn Your AI Chat History Into a Skill

    Example session with this skill installed

    Build an expert capsule of how I work from my ChatGPT history. The export is at ~/Downloads/chatgpt-export.zip. Name: Minh. I'll use it in Claude Code and ChatGPT.

    • Read your context and instructions
    • Compiled the expert capsule

    Summary

    Your capsule

    expert-minh is built, reviewed and installed. It covers the 2 domains you picked, with 8 rules you approved, each backed by at least 2 verbatim quotes from 2 different sessions.

    (Example built from the synthetic demo data shipped in the repo, examples/expert-demo/.)

    MetricValue
    Sessions ingested73
    Feedback events mined13
    Rules kept after review8 (1 core + 7 domain)
    Style rules3
    Playbooks1
    SKILL.md size~530 tokens (limit 5,000)
    Secrets / PII redacted at ingestyes, before any model call

    Domains you chose

    DomainSessionsRulesPlaybooks
    Macroeconomics4231
    Investment analysis3140

    Rules learned (excerpt)

    • R01 (core). When giving a number or a quantitative claim: state the value, the source and the period (month, quarter, year). Never write "high" or "strong" instead of the number. Because you want to verify and compare it yourself.
    • Style. Go straight to the numbers, skip greetings and preamble.
    • Style. When asked "compared to what?", give a concrete benchmark first (its own history and the sector median), then explain.

    What was installed

    ~/.claude/skills/expert-minh/
      SKILL.md
      references/domains/kinh-te-vi-mo.md
      references/domains/phan-tich-dau-tu.md
      references/style.md
      references/exemplars.md
      exports/custom_instructions.txt     <- paste into ChatGPT custom instructions (1,500-char limit respected)
      exports/project_instructions.md     <- for ChatGPT / Claude Projects, Gemini Gems
      exports/system_prompt.md            <- for the API
    

    private/ (evidence quotes, events, edit history) stayed in your workspace and was not copied.

    Next steps

    1. Blind taste test (recommended): give me 3-5 real questions from your work. I'll run capsule demo --blind, show you answers A and B without saying which used the capsule, and reveal the score after you pick.
    2. In ChatGPT: paste exports/custom_instructions.txt into Settings > Personalization > Custom instructions.
    3. Later, log a correction any time with capsule correct "<the right way>" --domain phan-tich-dau-tu.
    4. Keep capsule-workspace/ and private/ to yourself: they contain your raw chat history.
    SKILL.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Turn your own ChatGPT, Claude or Gemini chat history into a personal Agent Skill that makes an AI work by your standards, style and domain rules.

    What it does

    Expert Capsule turns your own AI chat history into expert-<you>/, an Agent Skill folder that makes an AI work by your standards, style and domain rules.

    The strongest signal of how you work is not how you describe yourself, it's the moments you corrected, rejected, challenged or accepted an AI answer. Expert Capsule finds those moments, turns them into rules of the form "When X, do Y, because Z", and packages them for whichever AI you use.

    How it works

    StepWhat happens
    1. IngestReads your ChatGPT / Claude export (or a .txt for Gemini), keeps edit and regenerate branches, redacts API keys, passwords, emails and phone numbers before any model call
    2. DomainsLabels each session by field and shows you the list: you pick 1-4 domains to distill
    3. Signal filterScores every turn (regenerations, correction keywords, repeated requests, short commands after long answers, specific praise) and keeps 200-400
    4. MiningExtracts feedback type, target aspect, how personal it is, and a verbatim quote (rejected if it isn't an exact substring)
    5. SynthesisDomain rules, situations, playbooks, conflicts, shared core, style guide. Rules with fewer than 2 events or from only 1 session are dropped
    6. Quick checkOn 15 held-out corrections: does the AI with the capsule anticipate your critique better than without it?
    7. ReviewYou keep, reword, narrow or delete every rule, right in the chat
    8-9. Package & installOne source, every export: Claude Code skill, Claude.ai ZIP, ChatGPT custom instructions, Projects / Gems instructions, API system prompt
    10. Blind taste testYou judge A/B answers to your own real questions without knowing which one used the capsule

    What you get

    expert-<you>/
      SKILL.md                     # always-on core: shared rules, style, three working modes (< 5,000 tokens)
      references/domains/<d>.md    # per-domain coded rules (KT-07), situations, playbooks, open questions
      references/style.md          # style guide with verbatim examples
      references/exemplars.md      # model answers that meet your bar
      exports/                     # custom_instructions.txt, project_instructions.md, system_prompt.md
      capsule.json                 # version, stats, quick-check result
      private/                     # never shared: evidence quotes, events, edit history
    

    Why it's different

    • No API key needed in Claude Code. Haiku/Sonnet subagents answer the model requests through a queue, billed to your normal plan. Every result is cached, so reruns only pay for new work.
    • Evidence, not vibes. Every rule points to at least two verbatim quotes from two different sessions.
    • You stay in control. You choose the domains and approve every rule. Nothing is decided for you.
    • Private by design. The workspace is git-ignored, evidence stays in private/, and install never ships private/. Want nothing to leave your machine? Run it with a local Ollama model.
    • Honest reporting. The quick check and blind taste test report results even when the capsule loses to the plain AI.

    Good for

    • Building an AI that answers "like me" in your own field (research, code review, investing, writing)
    • Onboarding teammates or students to how you work
    • Giving ChatGPT / Claude Projects a real, evidence-backed set of instructions instead of a hand-written persona

    Current limits

    • The CLI messages and generated capsules are currently in Vietnamese (the agent translates for you).
    • Needs enough history: domains with fewer than 15 sessions are marked thin; playbooks need 6+ sessions of the same task.
    • The quick check is small and noisy (15 turns): use the blind taste test as the real judge.

    Free & open source ⭐

    Expert Capsule is 100% free and MIT-licensed. If it helps you, please give it a star on GitHub, it really helps a solo student developer keep improving it:

    👉 github.com/HThiuhiu/expert-capsule

    Issues, ideas and pull requests are very welcome.

    CLI messages and generated capsules are currently in Vietnamese. Needs enough history (domains under 15 sessions are marked thin). The built-in quick check is small (15 turns) and noisy, so use the blind A/B taste test. On Claude.ai (no subagents) it only suits small histories.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    • Free with an Agensi account

    Software
    Python 3.11+PyYAML (pip install pyyaml)
    ChatGPT, Claude
    orGemini chat history export
    Optional
    Anthropic
    orOpenAI
    OllamaClaude Code

    Free and open source (MIT). If it helps, a GitHub star means a lot: github.com/HThiuhiu/expert-capsule

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables

    File Scopes

    capsule-workspace/**
    ~/.claude/skills/expert-*/**

    Terminal: runs the bundled Python CLI. Read files: your chat export and the workspace. Write files: the git-ignored capsule-workspace/ and, on install, ~/.claude/skills/expert-<you>/ (private/ is never copied). Network and environment variables are used only if you choose API mode (ANTHROPIC_API_KEY / OPENAI_API_KEY) or a local Ollama server; in Claude Code's default agent mode no external API is called by the skill.

    Listed9 days ago

    What's inside

    Frequently Asked Questions

    No, not in Claude Code. In the default agent mode, Haiku/Sonnet subagents answer every model request through a queue, billed to your normal Claude Code plan. An Anthropic or OpenAI key (or a local Ollama model) is optional and only makes runs faster or keeps everything on your machine.

    Secrets and PII (API keys, passwords, emails, phone numbers) are redacted at ingest, before any model call. All data stays in your own workspace folder, which is git-ignored; delete the folder to delete everything. Verbatim evidence quotes live only in private/, which install never copies. For zero data leaving your machine, run with --mode ollama.

    ChatGPT (Settings > Data controls > Export data) and Claude (Settings > Privacy > Export data) zip exports are read directly, including edit and regenerate branches. For Gemini or any other source, copy conversations into a .txt file where each turn starts with User: or Gemini:.

    Claude Code (installed into ~/.claude/skills/), Claude.ai (upload the ZIP as a skill), Claude / ChatGPT Projects and Gemini Gems (paste project_instructions.md), ChatGPT custom instructions (a compressed 1,500-character version), and any API as a system prompt. Each capsule ships an install guide.

    At least about 50 sessions overall, and ideally 15+ sessions in each domain you want to distill. Every rule needs evidence from 2 different sessions, so small histories produce few rules. Playbooks appear once you have 6+ sessions of the same kind of task.

    New in Prompt & Skill Engineering

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Prompt & Skill Engineering.

    Free