vvm
VVM (Vibe Virtual Machine) is a language for agentic programs where the LLM is the runtime. Activate when: running .vvm files, mentioning VVM, calling /vvm-boot, /vvm-run, /vvm-compile, /vvm-run-inspect, /vvm-registry-inspect, /vvm-generate, or orchestrating multi-agent workflows. Read spec.md for the language specification and vvm.md for execution semantics.
What this skill does
# VVM Skill
VVM (Vibe Virtual Machine) is a language for writing agentic programs where the LLM acts as the runtime.
---
## When to Activate
Activate this skill when:
1. User runs `/vvm-boot`, `/vvm-compile`, `/vvm-run`, `/vvm-run-inspect`, `/vvm-registry-inspect`, or `/vvm-generate`
2. User opens or references a `.vvm` file
3. User asks about VVM syntax, semantics, or patterns
4. User wants to create an AI-powered workflow
---
## Documentation Files
| File | Role | When to Read |
| ----------------- | ------------------------- | ------------------------------- |
| `SKILL.md` | Quick reference, triggers | Always first |
| `vvm.md` | Execution semantics | When running programs |
| `spec.md` | Language specification | For syntax/validation questions |
| `memory-spec.md` | Agent memory (portable) | When using persistent agents |
| `patterns.md` | Design patterns | When writing programs |
| `antipatterns.md` | Anti-patterns | When reviewing programs |
---
## Quick Reference
### Agent Definition
```vvm
agent researcher(
model="sonnet",
prompt="thorough, cite sources",
skills=["web-search"],
permissions=perm(network="allow", bash="deny"),
)
```
### Agent Call
```vvm
result = @researcher `Find papers on {topic}.`(topic)
result = @researcher `Summarize.`(topic, retry=3, timeout="30s")
```
### Agent Memory
```vvm
agent assistant(model="sonnet", prompt="Helpful.", memory={ scope: "project", key: "user:alice" })
reply = @assistant `Continue.`(request) # default: memory_mode="continue"
dry = @assistant `Read-only run.`(request, memory_mode="dry_run")
fresh = @assistant `Stateless run.`(request, memory_mode="fresh")
```
### Semantic Predicate
```vvm
ready = ?`production ready`(code)
if ?`needs more work`(draft):
draft = @writer `Improve.`(draft)
```
### Pattern Matching
```vvm
match result:
case ?`high quality`:
publish(result)
case error(kind="timeout"):
result = @backup `Retry.`(request)
case error(_):
log_error(result)
case _:
pass
```
### Choice
```vvm
choose analysis by ?`best approach` as choice:
option "quick":
plan = @planner `Minimal plan.`()
option "thorough":
plan = @planner `Full plan.`()
```
### Control Flow
```vvm
# If/elif/else
if condition:
do_something()
elif other:
do_other()
else:
do_default()
# While loop
while not ?`done`(result):
result = @worker `Improve.`(result)
# For loop
for item in items:
process(item)
```
### Context Passing
```vvm
# Implicit input (it)
with input data:
result = @agent `Process.`() # uses it == data
# Explicit input
result = @agent `Process.`(data)
```
### Functions
```vvm
def analyze(topic):
research = @researcher `Find info on {topic}.`(topic)
return @analyst `Analyze.`(research)
result = analyze("AI safety")
```
### Error Handling
```vvm
# Error values (match)
match result:
case error(_):
handle_error(result)
# Raised errors (try/except)
try:
if ?`invalid`(input):
raise "Invalid input"
except as err:
log(err)
finally:
cleanup()
```
### Constraints
```vvm
draft = @writer `Write report.`(data)
constrain draft(attempts=3):
require ?`has citations`
require ?`no hallucinations`
```
### Imports/Exports
```vvm
# Skill imports
import "web-search" from "github:anthropic/skills"
# Module value imports (agents are local)
from "./lib/research.vvm" import report
# Callable module import
from "./lib/research.vvm" import * as research
result = research(topic="AI", depth="deep")
report = result.report
# Exports (values only)
export result
export summary
```
### Standard Library
```vvm
# Parallel map
results = pmap(items, process)
# Sequential map/filter/reduce
mapped = map(items, transform)
filtered = filter(items, predicate)
def add(a, b):
return a + b
total = reduce(items, add, init=0)
# Iterative refinement
final = refine(initial, max=5, done=is_ready, step=improve)
# Named fan-in
ctx = pack(research, analysis, topic=topic)
# Range
for i in range(10):
process(i)
```
---
## Examples
| # | Name | Concepts |
| --- | ---------------------- | ----------------------- |
| 01 | hello-world | Minimal program |
| 02 | simple-agent-call | Agent with input |
| 03 | semantic-predicate | `?` predicates |
| 04 | match-statement | Pattern matching |
| 05 | if-elif-else | Conditionals |
| 06 | while-loop | While loops |
| 07 | for-loop | For loops |
| 08 | with-input | Context passing |
| 09 | agent-options | retry, timeout, backoff |
| 10 | code-council | .with() derived agents |
| 11 | parallel-pmap | Parallel execution |
| 12 | functions | def and return |
| 13 | skill-imports | Skill imports |
| 14 | module-imports | Module imports |
| 15 | error-values | Error value matching |
| 16 | try-except-finally | Raised errors |
| 17 | choose-statement | AI-selected branching |
| 18 | constrain-require | Quality constraints |
| 19 | refine-loop | Iterative improvement |
| 20 | collection-helpers | map, filter, reduce |
| 21 | devils-advocate | Adversarial debate |
| 22 | full-research-pipeline | Complex workflow |
| 23 | ralph-wiggum-loop | Continuous improvement |
| 24 | agent-memory-basic | Memory binding + digest/ledger |
| 25 | agent-memory-modes | memory_mode: continue/dry_run/fresh |
| 26 | agent-memory-multi-tenant | Per-key isolation |
| 27 | agent-memory-parallel-safe | pmap-safe persistence |
| 28 | ref-composition | Ref composition patterns |
| 29 | ref-loop-accumulation | Accumulating refs in loops |
| 30 | materializer-pattern | Materializing refs |
| 31 | run-inspector | Inspecting run state |
| 32 | ouroboros | Self-modifying workflow |
| 33 | wisdom-of-crowds | Ensemble voting |
| 34 | hydra | Multi-headed agents |
| 35 | forge | Agent factory |
| 36 | inputs | Input declarations |
| 37 | debate | Module composition |
---
## Commands
### /vvm-boot
Initialize VVM for new or returning users. Detects existing files and provides onboarding.
### /vvm-compile <file.vvm>
Validate a VVM program without executing. Reports errors and warnings with line numbers.
### /vvm-run <file.vvm>
Execute a VVM program. You become the VVM runtime and execute statements sequentially, spawning subagents for agent calls.
### /vvm-run-inspect <run-id>
Inspect run state from filesystem, SQLite, or Postgres backends without re-running the workflow.
### /vvm-registry-inspect <@handle/slug|https://...>
Inspect a remote module contract and cache metadata without executing the workflow.
### /vvm-generate <description>
Generate a VVM program from a natural language description. Analyzes intent, maps to VVM constructs, applies best practices, and produces well-structured code. Asks clarifying questions if the request is ambiguous.
---
## Key Principles
1. **Minimal syntax** - Familiar indentation-based blocks
2. **Explicit AI boundary** - Agent calls are syntactically distinct (`@agent`)
3. **Eager execution** - No lazy evaluation, sequential by default
4. **Semantic control flow** - Branch on meaning, not just booleans
5. **Two error channels** - Values (match) vs raised (try/except)
6. **Explicit parallelism** - Only `pmap` runs concurrently
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.