A standardized template for building CLI tools that work seamlessly as Nexus/Cursor skills.
Every CLI tool that wraps a data source should follow the same patterns:
init— First-time setup (config, database)sync— ETL from source (idempotent, incremental)db query— Raw SQL access (no feature requests needed)search— Semantic search (optional but powerful)--json— Machine-readable output everywhere
This makes tools predictable for AI agents. An agent that knows one skill CLI can use them all.
Every skill CLI has the same core commands. Agents don't need to learn new patterns.
All commands support --json for structured output. Agents can parse and act on results.
db query <sql> lets agents run arbitrary queries without waiting for new features.
Error messages include:
- What went wrong
- Why it might have happened
- How to fix it
Every skill includes instructions for:
- Humans following a guide
- AI agents executing commands
- Computer-use agents navigating browsers
my-skill/
├── SKILL.md # THE INTERFACE - agents read this
├── cmd/
│ └── my-skill/
│ └── main.go # CLI entry point (cobra)
├── internal/
│ ├── config/
│ │ └── config.go # XDG-compliant configuration
│ ├── db/
│ │ ├── schema.sql # SQLite schema
│ │ └── queries.go # Raw SQL queries (NO ORM!)
│ └── sync/
│ └── sync.go # ETL from source
├── go.mod
├── go.sum
├── Makefile
└── .goreleaser.yaml # Cross-platform releases
# Generate a new skill
./scripts/scaffold.sh my-skill "Short description" "🔧"
# Build and test
cd my-skill
go build ./cmd/my-skill
./my-skill init
./my-skill syncThe SKILL.md file is the interface between the CLI tool and AI agents. It must include:
- Frontmatter — Machine-readable metadata (name, install instructions)
- Quick Start — 3-line getting started
- Commands — Table of all commands
- Output Formats — JSON examples
- Bootstrap — Setup instructions for humans AND AI agents
See SKILL.md.template for the full format.
From AI_POWER_EQUATION.md:
Alignment = Context × Intent
Skills are how agents get context about your world. The better the skill documentation:
- The faster agents can use tools
- The fewer errors they make
- The more autonomous they become
A well-documented skill is an alignment multiplier.
eve— iMessage intelligenceaix— AI session intelligence (coming soon)gog— Google Workspace
MIT