Agent skill

Migrate Doctor

by smixs in smixs/agent-second-brain

Diagnose and repair a broken or non-standard agent-second-brain install/migration.

MITAuto-check: notesKnowledge Management

Install Migrate Doctor

skills CLI
$ npx skills add smixs/agent-second-brain --skill migrate-doctor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install smixs/agent-second-brain migrate-doctor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/smixs/agent-second-brain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/vault/.claude/skills/migrate-doctor .claude/skills/migrate-doctor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
migrate-doctor
GitHub stars
393
Token cost
~904 tokens
SKILL.md length
330 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Diagnose and repair a broken or non-standard agent-second-brain install/migration.

  • Works in 5 steps: Backup before any destructive step: tar… → Never modify or delete vault content… → Prefer re-running bash upgrade.sh after… → …
  • — upgrade.sh failed
  • SKILL.md covers Known version layouts, Diagnosis checklist (read-only…, Repair rules and Verification (must pass before…
  • Calls git, claude and bash; needs TODOIST_API_KEY

What it does

Migrate Doctor is an agent skill from smixs/agent-second-brain. Diagnose and repair a broken or non-standard agent-second-brain install/migration. Triggers — upgrade.sh failed, bot won't start after upgrade, "миграция сломалась", "бот не стартует после обновления", legacy d-brain units still present, brain session won't boot, doctor reports failures.

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering Second brain and Legacy modernization. It works with Git, Linux and Todoist. The repository describes itself as: An always-on second brain you talk to. Voice notes in Telegram → typed, linked knowledge in your Obsidian vault. Runs 24/7 on the Claude subscription you already have. The licence is MIT.

When your agent uses it

  • — upgrade.sh failed
  • Bot wont start after upgrade
  • Миграция сломалась
  • Бот не стартует после обновления

Example prompts

  • “t start after upgrade,”
  • “/migrate-doctor”

Requirements

  • Python 3
  • A credential in TODOIST_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Backup before any destructive step: tar czf ~/dbrain-backup-$(date +%s).tgz -C ~/projects agent-second-brain --exclude=.venv and note the…
  2. Never modify or delete vault content (vault/daily, notes, cards). The vault is the user's data; migration touches code, units and runtime…
  3. Prefer re-running bash upgrade.sh after each fix — it is idempotent. Fix the obstacle, not the symptom.
  4. Typical obstacles and fixes
  5. Report honestly: if a step failed, say so with the output. Never claim health you didn't verify.

What it can do on your machine

Read from SKILL.md and the folder at commit 7828ed6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • claude
    • bash
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TODOIST_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Migrate Doctor loads about 904 tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~904

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:19
    brain-bot.service`, `TODOIST_API_KEY` in .env, mcp-config.json | Todoist/MCP era, `claude -p` per message |
  • NoteRuns commands with sudoSKILL.md:28
    sudo systemctl list-units 'd-brain-*' --all      # legacy system-level
  • NoteMentions a .env fileSKILL.md:32
    cat ~/projects/agent-second-brain/.env | grep -v 'TOKEN\|KEY'  # never print secrets
  • NoteRuns commands with sudoSKILL.md:44
    - legacy system-level units conflict → `sudo systemctl disable --now 'd-brain-*'` and remove files from `/etc/systemd/s
  • NoteMentions a .env fileSKILL.md:47
    ODOIST_API_KEY` / `DBRAIN_MODE` lines in .env → remove them (v3 ignores but they confuse humans)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from smixs/agent-second-brain at commit 7828ed6, republished under its MIT licence (© smixs). 330 words, ~904 tokens.

Download SKILL.mdSave it as .claude/skills/migrate-doctor/SKILL.md (or your agent's skills folder).
name
migrate-doctor
description
Diagnose and repair a broken or non-standard agent-second-brain install/migration. Triggers — upgrade.sh failed, bot won't start after upgrade, "миграция сломалась", "бот не стартует после обновления", legacy d-brain units still present, brain session won't boot, doctor reports failures.

Migrate Doctor

You are running INSIDE an interactive Claude Code session on the user's server (subscription billing — this is the supported way to use AI for repair). Your job: get a broken or half-migrated install to a healthy v3.0 state. The deterministic path is bash upgrade.sh — your job is to diagnose WHY it fails, remove the obstacle, and re-run it. Do not re-implement the migration by hand unless upgrade.sh itself cannot work.

Known version layouts

VersionMarkersNotes
v1 (Dec 2025)system-level /etc/systemd/system/d-brain-bot.service, TODOIST_API_KEY in .env, mcp-config.jsonTodoist/MCP era, claude -p per message
v2d-brain-* units, claude -p/claude --print pipeline, weekly timerheadless calls — dead after 2026-06-15 billing change
v3.0 (target)dbrain-* systemd --user units, persistent tmux brain, ~/.dbrain/ runtime dir, cron subsysteminteractive session on subscription

Diagnosis checklist (read-only first)

bash
# What's installed and running?
systemctl --user list-units 'dbrain-*' --all
sudo systemctl list-units 'd-brain-*' --all      # legacy system-level
ls ~/.dbrain/ 2>/dev/null                         # runtime dir (v3)
tmux ls 2>/dev/null                               # brain sessions
git -C ~/projects/agent-second-brain log --oneline -3
cat ~/projects/agent-second-brain/.env | grep -v 'TOKEN\|KEY'  # never print secrets
claude auth status --json                         # needs "loggedIn": true
journalctl --user -u dbrain-bot -n 50 --no-pager

Repair rules

  1. Backup before any destructive step: tar czf ~/dbrain-backup-$(date +%s).tgz -C ~/projects agent-second-brain --exclude=.venv and note the current commit (git rev-parse HEAD).
  2. Never modify or delete vault content (vault/daily, notes, cards). The vault is the user's data; migration touches code, units and runtime files only.
  3. Prefer re-running bash upgrade.sh after each fix — it is idempotent. Fix the obstacle, not the symptom.
  4. Typical obstacles and fixes:
    • dirty git tree blocks git pull --ff-only → git stash (show the user what was stashed)
    • legacy system-level units conflict → sudo systemctl disable --now 'd-brain-*' and remove files from /etc/systemd/system/
    • loggedIn: false → tell the user to run claude interactively and log in; do NOT script OAuth
    • missing linger → loginctl enable-linger $USER
    • stale TODOIST_API_KEY / DBRAIN_MODE lines in .env → remove them (v3 ignores but they confuse humans)
    • wedged brain session → dbrain restart or tmux kill-session -t <brain> (the bot recreates it lazily)
  5. Report honestly: if a step failed, say so with the output. Never claim health you didn't verify.

Verification (must pass before you declare success)

bash
bash scripts/check-no-claude-p.sh                 # guard clean
systemctl --user is-active dbrain-bot dbrain-watchdog dbrain-process.timer dbrain-doctor.timer
uv run python -m d_brain.services.doctor          # ok=True
cat ~/.dbrain/STATUS.md                            # state: healthy

Finish with a short summary: what was broken, what you changed, what the user should watch for. Suggest sending the bot a test voice message.

© smixs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in vault/.claude/skills/migrate-doctor of smixs/agent-second-brain.

Open the folder on GitHubat commit 7828ed6

Compare with similar skills

Migrate Doctor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Migrate Doctor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Migrate Doctor this skillsmixs/agent-second-brain393—~904Automated safety check: NotesMIT
Obsidian PKM Vault Upgradeballred/obsidian-claude-pkm1.9k—~1.1kAutomated safety check: NotesMIT
Radarcoreyhaines31/makerskills851—~4kAutomated safety check: WarnMIT
Convert Internal Package to TypeScriptTryGhost/Ghost56k—~1.2kAutomated safety check: PassMIT
Wtfnoobnooc/agent1.4k—~2.1kAutomated safety check: NotesNone
Dirextalk DeployerYingSuiAI/dirextalk-deployer457—~7.2kAutomated safety check: PassMIT

Similar skills

  • Obsidian PKM Vault Upgrade

    ballred/obsidian-claude-pkm

    Updates an obsidian-claude-pkm vault's system files to the latest version, with a backup, per-file diff review and no changes to your own notes.

    1.9k GitHub stars~1.1k tokensUpdated 7 mo ago
    Knowledge ManagementAuto-check: notes
  • Radar

    coreyhaines31/makerskills

    When you want to monitor known sources on a schedule and feed the good stuff into your second brain.

    851 GitHub stars~4k tokensUpdated 2 days ago
    Knowledge ManagementAuto-check: warnings
  • Moves a legacy internal Ghost package from JavaScript and CommonJS to TypeScript and ESM in three focused commits that keep git file history intact.

    56k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Wtf

    noobnooc/agent

    Pre-launch and pre-commit audit for vibe coding projects. An agent skill from noobnooc/agent.

    1.4k GitHub stars~2.1k tokensUpdated 1 mo ago
    DatabasesAuto-check: notes
  • Dirextalk Deployer

    YingSuiAI/dirextalk-deployer

    Deploy, resume, verify, update, recover, reset, or destroy production Dirextalk services and nodes on AWS, and wire local agent runtimes.

    457 GitHub stars~7.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Release

    notepadqq/notepadqq

    Release a new Notepadqq version. An agent skill from notepadqq/notepadqq.

    2.3k GitHub stars~2k tokensUpdated 5 days ago
    MobileAuto-check passed

More from smixs/agent-second-brain

  • Autograph

    smixs/agent-second-brain

    Schema-as-code enforcement for any Obsidian vault. An agent skill from smixs/agent-second-brain.

    393 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Dbrain Processor

    smixs/agent-second-brain

    Personal assistant for processing daily voice/text entries from Telegram.

    393 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Cron

    smixs/agent-second-brain

    Управление собственным расписанием — напоминания, рутины, периодические задачи.

    393 GitHub stars~856 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Migrate Doctor

What does Migrate Doctor do?

Diagnose and repair a broken or non-standard agent-second-brain install/migration. Migrate Doctor is an agent skill from smixs/agent-second-brain. Diagnose and repair a broken or non-standard agent-second-brain install/migration.

When should I use Migrate Doctor?

Migrate Doctor fits situations like: — upgrade.sh failed; bot wont start after upgrade; Миграция сломалась; Бот не стартует после обновления.

How do I install Migrate Doctor in Claude Code?

Run `npx skills add smixs/agent-second-brain --skill migrate-doctor -a claude-code`. Or copy the skill folder (vault/.claude/skills/migrate-doctor in smixs/agent-second-brain) into .claude/skills/migrate-doctor in your project. Claude Code loads it when a task matches its description.

How do I install Migrate Doctor in Codex?

Run `npx skills add smixs/agent-second-brain --skill migrate-doctor -a codex`. Or copy the skill folder (vault/.claude/skills/migrate-doctor in smixs/agent-second-brain) into .agents/skills/migrate-doctor in your project. Codex loads it when a task matches its description.

Can I use Migrate Doctor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add smixs/agent-second-brain --skill migrate-doctor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate-doctor, .gemini/skills/migrate-doctor, .github/skills/migrate-doctor and .opencode/skills/migrate-doctor in your project.

What does Migrate Doctor need to run?

Going by SKILL.md and its folder, Migrate Doctor needs the command-line tools its instructions call (git, claude, bash and uv) and credentials named TODOIST_API_KEY. Our summary lists: Python 3; A credential in TODOIST_API_KEY.

Does Migrate Doctor access the network?

SKILL.md contains no URLs. Its commands use git and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Migrate Doctor safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Migrate Doctor use?

Migrate Doctor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Migrate Doctor use?

About 904 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Migrate Doctor?

Skills that share tags, products or a category with Migrate Doctor: Obsidian PKM Vault Upgrade (ballred/obsidian-claude-pkm, 1.9k stars), Radar (coreyhaines31/makerskills, 851 stars), Convert Internal Package to TypeScript (TryGhost/Ghost, 56k stars) and Wtf (noobnooc/agent, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Migrate Doctor?

smixs (a GitHub user) maintains it in smixs/agent-second-brain, which has 393 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on August 5, 2026.

Source: smixs/agent-second-brain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.