workflow-migration
VM0 migration helper for Claude Code workflows. Use when user says "migrate to VM0", "move to VM0", "convert skill to VM0", or asks about migrating local Claude Code workflows.
What this skill does
## Troubleshooting
If requests fail, run `zero doctor check-connector --env-name NOTION_TOKEN`
## How It Works
### Step 1: Identify the Local Skill to Migrate
**Ask the user**:
- Which skill do they want to migrate?
- Where is the skill located? (usually `~/.claude/skills/{skill-name}/`)
**Discover local skills**:
```bash
# List all local Claude Code skills
ls -la ~/.claude/skills/
# Show available skills
find ~/.claude/skills -name "SKILL.md" -type f
```
**Read the skill definition**:
```bash
# Read the skill's SKILL.md file
cat ~/.claude/skills/{skill-name}/SKILL.md
```
**IMPORTANT**: Claude Code skills are defined in `SKILL.md` files with natural language descriptions, not YAML config files.
### Step 2: Analyze the Skill
For the skill found, understand:
1. **Purpose**: What does this skill do?
2. **Commands**: What scripts/commands does it run?
3. **Dependencies**: What tools/languages does it need?
4. **Environment**: What env vars/secrets does it use?
5. **Triggers**: When/how is it invoked?
**Read skill files**:
```bash
# Read the main skill definition
cat ~/.claude/skills/{skill-name}/SKILL.md
# Check for local .env file
cat ~/.claude/skills/{skill-name}/.env 2>/dev/null
# Check for dependencies
ls ~/.claude/skills/{skill-name}/requirements.txt 2>/dev/null
ls ~/.claude/skills/{skill-name}/package.json 2>/dev/null
# Check for helper scripts
ls -la ~/.claude/skills/{skill-name}/scripts/ 2>/dev/null
```
**Extract environment variables from SKILL.md**:
- Look for mentions of environment variables (e.g., `NOTION_TOKEN`, `DATABASE_ID`)
- Find patterns like `$VARIABLE_NAME` or `env.VARIABLE_NAME`
- Note which variables are required vs optional
### Step 3: Detect and Confirm Environment Variables
**Auto-detect environment variables**:
1. **Extract from local skill's .env file**:
```bash
# If skill has a .env file, read it
if [ -f ~/.claude/skills/{skill-name}/.env ]; then
cat ~/.claude/skills/{skill-name}/.env
fi
```
2. **Parse SKILL.md for environment variable references**:
```bash
# Look for patterns like $VAR_NAME, ${VAR_NAME}, or mentions of env vars
grep -E '\$\{?[A-Z_]+\}?|NOTION_|DATABASE_|API_|TOKEN|SECRET' ~/.claude/skills/{skill-name}/SKILL.md
```
3. **Read current environment values**:
```bash
# For each detected variable, get its current value
echo $NOTION_TOKEN
echo $DATABASE_ID
# etc.
```
**Present to user for confirmation**:
```
I detected the following environment variables from your local skill:
✓ CLAUDE_CODE_OAUTH_TOKEN: sk-ant-oat01-... (found in environment)
✓ NOTION_TOKEN: ntn_F391... (found in ~/.claude/skills/world-news-summary/.env)
✓ NOTION_TOKEN: ntn_F391... (found in ~/.claude/skills/world-news-summary/.env)
✓ DATABASE_ID: 2e80e96f... (found in ~/.claude/skills/world-news-summary/.env)
✓ NEWS_CATEGORIES: ai_agents,international,business (found in .env)
Should I use these values for the VM0 agent? (y/n)
If no, I'll ask you to provide the values manually.
```
**If user confirms**, proceed with these values.
**If user declines**, ask for each variable individually.
### Step 4: Create VM0 Agent Configuration
**Ask the user**:
- Where to create the VM0 project? (default: `~/Desktop/{skill-name}/`)
Generate `vm0.yaml` (NOT `.vm0/vm0.yaml`) with detected environment variables:
```yaml
version: "1.0"
agents:
{skill-name}:
provider: claude-code
instructions: AGENTS.md
# Include VM0 skills based on what the local skill uses
skills:
- https://github.com/vm0-ai/vm0-skills/tree/main/notion # if uses Notion
- https://github.com/vm0-ai/vm0-skills/tree/main/github # if uses GitHub
- https://github.com/vm0-ai/vm0-skills/tree/main/slack # if uses Slack
environment:
# Claude Code OAuth token (if needed)
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# Map all environment variables from local skill
API_KEY: ${{ secrets.API_KEY }}
DATABASE_ID: ${{ secrets.DATABASE_ID }}
# Add more as needed
```
**IMPORTANT**:
- Use `vm0.yaml` at project root, NOT `.vm0/vm0.yaml`
- Use `agents:` structure with skill name as key
- Use `instructions: AGENTS.md` (relative path)
**Also generate `.env` file for local testing** (using detected values):
```bash
# Auto-generate .env file with detected values
cat > .env << EOF
CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
NOTION_TOKEN=ntn_F391...
NOTION_TOKEN=ntn_F391...
DATABASE_ID=2e80e96f...
NEWS_CATEGORIES=ai_agents,international,business
EOF
```
**Security note**: Remind user that `.env` is for local testing only. For production, use VM0 secrets.
### Step 5: Convert SKILL.md to AGENTS.md
Create `AGENTS.md` at project root that translates the local skill's logic into agent instructions.
**Key Principle**: Translate the skill's natural language description into agent instructions that accomplish the same tasks.
**Conversion approach**:
1. Read the local `SKILL.md` carefully
2. Understand the workflow steps and logic
3. Preserve the same structure and steps
4. Add VM0-specific guidance (e.g., using VM0 skills instead of raw API calls)
5. Include error handling and verification steps
**Template**:
```markdown
# {Project Name} Agent
You are an automation agent that performs the same tasks as the local Claude Code workflow.
## Your Mission
{High-level description of what the local workflow accomplishes}
## Available Skills (from local setup)
### Skill 1: {Skill Name}
**Purpose**: {What this skill does}
**How to use**:
{Step-by-step instructions in natural language}
**Commands**:
{Actual commands/scripts to run}
**Verification**:
{How to verify success}
### Skill 2: {Skill Name}
...
## Common Workflows
### Workflow 1: {Workflow Name}
When asked to {task description}, execute:
1. {Step 1}
2. {Step 2}
...
### Workflow 2: {Workflow Name}
...
## Environment Variables
{List all env vars needed}
## Error Handling
{How to handle errors}
```
### Step 6: Create Dockerfile with Dependencies
Generate `Dockerfile` at project root with all tools/dependencies:
**Choose base image based on skill's language**:
- Python skills → `python:3.11-slim`
- Node.js skills → `node:20-slim`
- Shell scripts → `ubuntu:22.04`
- Multi-language → `ubuntu:22.04` with multiple runtimes
```dockerfile
FROM {base-image}
WORKDIR /workspace
# Install system dependencies
RUN apt-get update && apt-get install -y \
bash curl jq git \
{additional-tools} \
&& rm -rf /var/lib/apt/lists/*
# Install language-specific dependencies
COPY requirements.txt* ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy scripts and helper files (if any)
COPY scripts/ ./scripts/ 2>/dev/null || true
COPY SKILL.md ./
# Create any necessary directories
RUN mkdir -p ~/reports
CMD ["/bin/bash"]
```
**Also create `.dockerignore`**:
```
.git
.gitignore
*.md
README.md
.env*
vm0.yaml
__pycache__
*.pyc
.pytest_cache
*.log
.DS_Store
reports/
```
## Complete Real Example: world-news-summary
This is a real migration case showing exactly how to convert a local Claude Code skill to VM0.
### Original Local Skill
**Location**: `~/.claude/skills/world-news-summary/SKILL.md`
**What it does**: Generates daily world news summaries with bilingual content and publishes to Notion automatically.
**Key features**:
- Searches web for latest news (AI/Agent products, international affairs, business)
- Fetches full article content
- Generates bilingual summaries
- Publishes structured reports to Notion database
**Required environment variables**:
- `CLAUDE_CODE_OAUTH_TOKEN`
- `NOTION_TOKEN` / `NOTION_TOKEN`
- `DATABASE_ID`
### Generated VM0 Configuration
**Project structure**:
```
~/Desktop/world-news-summary/
├── vm0.yaml # VM0 configuration
├── AGENTS.md # Agent instructions (converted from SKILL.md)
├── Dockerfile # Container definition
├── .dockerignore # Docker build exclusions
├── .env # Local environment variables (for testing)
└── README.md #Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.