Guide new users through macrodata setup. Creates identity, human profile, and workspace files. Use when get_context returns isFirstRun true, or user asks to set up their profile.
View on GitHubSelect agents to install to:
npx add-skill https://github.com/ascorbic/macrodata/blob/main/plugins/macrodata/skills/onboarding/SKILL.md -a claude-code --skill onboardingInstallation paths:
.claude/skills/onboarding/# Onboarding Skill
Guide new users through initial macrodata setup.
## When to Use
- `get_context` returns `isFirstRun: true`
- User explicitly asks to set up or reset their profile
- State files are empty or missing
## Guidelines
Use `AskUserQuestion` for any choice with multiple options (location, permissions, etc.). This provides a better UX than asking in plain text.
## Onboarding Flow
### Phase 0: Prerequisites
Check that Bun is installed (required for the MCP server):
```bash
command -v bun
```
If not found, offer to install it:
**Ask:** "Macrodata needs Bun to run. Would you like me to install it?"
If yes, run:
```bash
curl -fsSL https://bun.sh/install | bash
```
After installation, verify it worked:
```bash
# Source the updated PATH
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
command -v bun && bun --version
```
If they decline, explain that macrodata won't work without Bun and ask if they'd like to install it manually later.
### Phase 1: User Info
User info has been pre-detected and is available in the context above as "Detected User Info". This JSON contains:
- `username`, `fullName`, `timezone`
- `git.name`, `git.email`
- `github.login`, `github.name`, `github.blog`, `github.bio`
- `codeDirs` - array of existing code directories
Use this data throughout onboarding - no need to run detection scripts.
### Phase 2: Location
Use `AskUserQuestion` to offer location options. Always include:
- `~/Documents/macrodata` - easy to find
- `~/.config/macrodata` - hidden, default
Only include a code directory option if `codeDirs` from the detection was non-empty.
If they choose a non-default location, write it to `~/.config/macrodata/config.json`:
```json
{
"root": "/path/to/chosen/location"
}
```
After writing the config, signal the daemon to reload:
```bash
kill -HUP $(cat ~/.config/macrodata/.daemon.pid) 2>/dev/null || true
```
Then create the directory structure:
- `<root>/`
- `<root>/state/`
- `<root>/journal/`
-