setup
Bootstrap an UnClaw agent from scratch. Converts a stock Claude Code instance into a persistent personal agent with identity, memory, and scheduling.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Bootstrap an UnClaw agent from scratch. Converts a stock Claude Code instance into a persistent personal agent with identity, memory, and scheduling.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Run the morning standup. Use when {{OWNER_NAME}} says "good morning", "standup", or "what's on my plate".
Compress and save the key context from this session to the daily log. Run before ending a long session.
Search through all past daily logs, cold memory files, and conversation history. Use when {{OWNER_NAME}} asks "when did we...", "do you remember...", "what did I say about...", or needs context from a past session.
Proactive check-in with pre-gathered context. Run automatically via launchd every 30 minutes.
Distill this session's key learnings into long-term memory. Use after completing significant work or when user says "update memory" or "save this session".
Extract key learnings from daily logs and promote them to identity/memory.md. Run automatically via launchd once per day, or manually after a productive day.
| name | setup |
| description | Bootstrap an UnClaw agent from scratch. Converts a stock Claude Code instance into a persistent personal agent with identity, memory, and scheduling. |
This skill bootstraps the entire agent. Do not assume hooks, launchd jobs, or even .claude/settings.json already exist.
Before personalizing anything:
Ensure these directories exist:
.claude/.claude/rules/.claude/skills/.claude/scripts/.claude/runtime/launchd/memory/daily-logs/Ensure these critical files exist:
CLAUDE.mdidentity/SOUL.mdidentity/user.mdidentity/memory.mdconfig/agent.env.claude/settings.json.claude/rules/*.md.claude/scripts/*.shtemplates/settings.jsontemplates/launchd/*.plistIf .claude/settings.json is missing or malformed, recreate it from templates/settings.json.
Verify these required hooks exist in .claude/settings.json:
SessionStartNotificationPreCompactPostCompactPostToolUseIf any are missing, repair .claude/settings.json from templates/settings.json.
Ensure scripts are executable:
chmod +x bin/start-agent.sh bin/setup.sh .claude/scripts/*.sh
Ask the user for:
Replace placeholders in:
CLAUDE.md — {{AGENT_NAME}}, {{OWNER_NAME}}, {{AGENT_ROLE}}identity/SOUL.md — {{AGENT_NAME}}, {{OWNER_NAME}}, {{AGENT_ROLE}}identity/user.md — {{OWNER_NAME}}, {{OWNER_FULL_NAME}}, {{TIMEZONE}}, {{DOMAIN_EXPERTISE}}, {{OS}}, {{EDITOR}}, {{COMMUNICATION_STYLE}}config/agent.env — AGENT_SESSION_NAME (lowercase agent name), AGENT_CHANNEL.claude/rules/communication.md — {{OWNER_NAME}}.claude/skills/daily-standup/SKILL.md — {{OWNER_NAME}}.claude/skills/distill-session/SKILL.md — {{OWNER_NAME}}.claude/skills/search-memory/SKILL.md — {{OWNER_NAME}}.claude/rules/domain.mdGenerate this file based on the chosen role and domain expertise. It should contain role-appropriate conventions and best practices. Examples:
Keep it concise (under 20 lines). The user can always expand it later.
Use config/agent.env as the source of truth for runtime config:
AGENT_SESSION_NAME → lowercase agent nameAGENT_CHANNEL → blank by default, filled if messaging is configuredTELEGRAM_STATE_DIR → per-agent path, set only if Telegram is configuredAsk: "Do you want to connect a messaging channel like Telegram?"
If yes, walk through the prerequisites first, then configure the channel.
Handle these before configuring the channel. Do each silently and report the result to the user.
Check ~/.claude/settings.json for "DISABLE_TELEMETRY": "1" in the env object.
--channels to fall back to "Channels are not currently available."DISABLE_TELEMETRY or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC. If either is exported there, remove it and restart the terminal.The Telegram MCP server runs on Bun. Run bun --version to check.
curl -fsSL https://bun.sh/install | bash, then verify with bun --version. Tell the user it was installed.The user needs to create a bot through BotFather — this is the one step that requires manual action on their phone/desktop. Tell the user:
Open @BotFather on Telegram and send
/newbot. It asks for a name (display name, anything) and a username (must end inbot, e.g.my_assistant_bot). BotFather replies with a token like123456789:AAHfiqksKZ8...— copy the whole thing including the number and colon, and paste it here.
Wait for the user to provide the token before proceeding.
Check if the Telegram plugin is already installed by running claude plugin list 2>&1 | grep -i telegram or checking ~/.claude/plugins/installed_plugins.json.
/plugin install telegram@claude-plugins-official
/reload-plugins
If running inside Cursor rather than the Claude Code CLI, add the Telegram MCP server entry to .cursor/mcp.json instead (see the plugin's README for the server command and args).After either path, verify the Telegram plugin appears in the installed list. Tell the user the result. Also verify if the Telegram MCP server appears in the active MCP list.
Each agent gets its own Telegram state directory so multiple agents can run
different bots on the same machine without conflict. The Telegram MCP plugin
reads TELEGRAM_STATE_DIR from its environment; config/agent.env vars are auto-exported
via set -a in the session scripts, so child processes (including MCP servers) inherit them.
~/.claude/channels/telegram-<agent-name>/
(e.g. telegram-tony, telegram-ray — lowercase agent name)~/.claude/channels/telegram-<agent-name>/.env with TELEGRAM_BOT_TOKEN=<token>~/.claude/channels/telegram-<agent-name>/access.json with:
{"dmPolicy": "pairing", "allowFrom": [], "groups": {}, "pending": {}}
config/agent.env:
AGENT_CHANNEL="plugin:telegram@claude-plugins-official"
TELEGRAM_STATE_DIR="$HOME/.claude/channels/telegram-<agent-name>"
Why per-agent dirs? The Telegram MCP plugin defaults to ~/.claude/channels/telegram/ for
its bot token and access list. If two agents share that path, they fight over the same bot token
(409 Conflict) and share access lists. TELEGRAM_STATE_DIR overrides this per-agent.
After the agent is started and Telegram is connected:
25255d).~/.claude/channels/telegram-<agent-name>/access.json to find the pending entry matching that code.senderId from the pending entry.senderId to the allowFrom array and remove it from pending.access.json.mkdir -p ~/.claude/channels/telegram-<agent-name>/approved
then write the senderId to ~/.claude/channels/telegram-<agent-name>/approved/<senderId>.
The bot polls this directory and sends a "Paired!" confirmation to the user.Do not rely on /telegram:access pair for per-agent setups. That command reads
~/.claude/channels/telegram/access.json instead of the per-agent directory.
For isolated bots, pair by editing the per-agent access.json directly.
If the user doesn't have the code yet or the pending entry hasn't appeared, wait a moment and re-read the file. The bot writes the pending entry when it receives the first DM.
If no, leave AGENT_CHANNEL="" and TELEGRAM_STATE_DIR commented out in config/agent.env — tmux-only mode is valid.
Hooks are required for daily logs, compaction safety, and indexing.
.claude/settings.json existstemplates/settings.jsonAsk: "Do you want automatic heartbeats, session logging, memory promotion, nightly self-improvement, and watchdog restarts via launchd?"
If yes:
templates/launchd/ by replacing:
{{AGENT_SESSION_NAME}}{{PROJECT_DIR}}{{AGENT_CHANNEL}}~/Library/LaunchAgents/plutil -lintlaunchctl load the new oneslaunchctl list | grep <session>Operation not permitted or exit code 126, tell the user to grant Full Disk Access to /bin/bash in System Settings → Privacy & Security → Full Disk Access. Until then, they should start the agent manually after reboot.If no, skip — the agent still works, but recurring tasks must be run manually or via /loop.
./bin/start-agent.sh
Then verify the tmux session reaches the ❯ prompt. If Claude shows the workspace trust prompt,
accept it and re-check the pane. If it shows "Channels are not currently available," go back to
Step 3 prerequisite 1.
tmux has-session -t <session>.claude/settings.json exists and includes the required hooksListening for channel messages from: plugin:telegram@... (if Telegram enabled)❯ prompt (session is ready)launchctl list | grep <session>Tell the user:
tmux attach -t <session>