Template and conventions for creating new skills — SKILL.md structure, CLI patterns, test harness, and gotchas.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Template and conventions for creating new skills — SKILL.md structure, CLI patterns, test harness, and gotchas.
last-updated
"2026-06-02T00:00:00.000Z"
Creating a New Skill
This skill documents the standard framework for creating skills in the Pi agent system. Use it as a checklist and template when adding new capabilities.
How to install/run (which <cmd>, pipx install -e), standard library note
Prerequisites
Dependencies, auth requirements, VPN needs
Commands
Table: command → purpose; then subsections with examples
Common tasks
"How do I X?" patterns (optional, for complex skills)
How it works
API endpoints, auth models, robustness notes
Limits
What's out of scope, rate limits, known issues
Etiquette / Licence
If applicable (robots.txt, TDM opt-out, etc.)
Writing Guidelines
Trigger clarity: Make it obvious when this skill should fire (specific keywords, domains, use cases)
Procedural, not declarative: Tell the agent how to do things, not just what exists
Include verification commands: which <cmd>, curl -I <endpoint>, etc.
Document auth models: Session-bound vs anonymous, OAuth flows, VPN requirements
Note rate limits and quotas: So agents can handle errors gracefully
2. README.md — User Documentation (Concise)
# <skill-name>
One-line pitch — what domain it covers, which APIs/sources it merges.
## Requirements-`<cmd>` CLI — standard library only (`pipx install -e .`)
- Internet access to `api.example.com`, `www.example.dk`- Any auth/VPN requirements (document here)
## Quick start```bash
<cmd> foo --option value # brief comment
<cmd> bar -k keyword --limit 5 # another example
<cmd> baz # third example
Add --raw to any command for unformatted JSON.
Commands
Command
Purpose
foo
Does X
bar
Does Y with Z
baz
Lists all Q
Notes
API endpoint details if relevant (e.g., https://api.example.com/v1/...)
What's out of scope
Known limitations or gotchas
Auth requirements if any (session-bound endpoints, OAuth flows, etc.)
Development
# Format code
uv run ruff format .
# Lint code
uv run ruff check .
# Run tests
bun run tests/test.ts
**Keep README concise** — detailed API reference, auth models, and gotchas belong in SKILL.md.
---
## 3. CLI Implementation
### Package Structure
#!/usr/bin/env bunimport { $ } from"bun";
import { readFileSync } from"fs";
import { join, dirname } from"path";
constSKILL_DIR = join(dirname(import.meta.path), "..");
constSKILL_FILE = join(SKILL_DIR, "SKILL.md");
constSKILL_NAME = "your-skill-name";
// Test prompts (natural user questions, NOT CLI documentation)constTEST_PROMPTS: string[] = [
// English prompts with strong triggers (locations, site names, currency)"I need X in Copenhagen",
"Find Y under 10,000 kr",
// Danish prompts with strong triggers"Jeg leder efter X i København",
"Find Y under 10.000 kr",
];
// Pre-flight checks, runPrompt, evaluateResults, runTestIteration, printResults, main
Test Prompt Guidelines
Do
Don't
"I need a rental apartment in Frederiksberg with a bathtub"
"Can I find rentals?" (too generic)
"Looking for a house in Odense, budget 3 million kr"
"Show me houses for sale" (no location)
"Find listings on boligportal.dk mentioning 'badekar'"
"Search with keywords" (no site context)
Rule: Every prompt must have at least one strong trigger: