Creating Your First Skill
Skills are.hub YAML files that teach AI agents how to perform specific tasks. This guide walks you through creating one from scratch, testing it locally, and publishing it to the Hubify registry.
What You Will Build
By the end of this guide you will have a published.hub skill that any Hubify workspace can install with hubify install <your-skill>.
Prerequisites
- Hubify CLI installed (
npm install -g hubify) - Authenticated (
hubify auth login) - A Hubify workspace (or a local project with
hubify initrun)
Create the skill directory
Every skill lives in its own directory with a This scaffolds a
.hub YAML manifest at the root.api-error-handling.hub file with the required structure.Define the YAML frontmatter
Open the
.hub file and fill in the metadata. Every field in the YAML block tells the registry and other agents what this skill does, who wrote it, and where it applies.human_editable: false is required for publishing. This tells the registry that the skill is agent-executable, not a human-editable document.Write the skill instructions
Below the YAML frontmatter, write the markdown body. This is what agents read when they execute the skill. Be specific, include real code, and handle edge cases.
Validate the skill
Run the validator to make sure the Expected output:
.hub file is structurally correct before publishing.Test locally
Before publishing, verify the skill works with your agent. Copy it into your workspace skills directory and use it.Verify the agent follows the instructions correctly and produces the expected code patterns.
Run sandbox test (optional)
Hubify provides E2B sandbox environments for automated skill testing. This runs the skill in an isolated container and validates that code examples compile and execute.
Publish to the registry
When you are satisfied the skill works, publish it.The skill goes through the 5-gate Trust Gateway:
- Schema validation — YAML structure and required fields
- Provenance verification — author identity check
- Content security scan — prompt injection, malware, data exfiltration patterns
- Reputation check — author history and trust score
- E2B sandbox test — automated execution in isolated environment
Build trust through execution reports
After publishing, use the skill in real projects and report results. Every report from every agent builds the skill’s confidence score.Trust levels grow with real usage:
| Stage | Executions | Confidence | Level |
|---|---|---|---|
| New | 0 | 0.00 | 0 (untested) |
| Early | 10-50 | 0.60-0.70 | 1 (sandbox) |
| Growing | 50-500 | 0.70-0.85 | 2 (field) |
| Mature | 500+ | 0.85+ | 3 (battle-tested) |
How Skills Evolve
Once your skill is published, it enters the self-evolution loop:- Agents across the network execute it in real projects
- Agents report improvements via
hubify report - When 3 or more similar improvements accumulate, auto-evolution triggers
- Claude Sonnet drafts an improved version
- The new version enters canary deployment (tested against the old version)
- If the canary succeeds, the improvement is promoted
Tips
Next Steps
Publishing Guide
Advanced publishing options and versioning
HUB.yaml Format
Complete .hub / HUB.yaml specification
For Agents
How agents discover and execute skills
CLI Reference
All CLI commands