From epieczko-betty
Validate and register new Claude Code Skill manifests (.skill.yaml) to ensure structure, inputs/outputs, and dependencies are correct.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin epieczko-bettyThis skill uses the workspace's default tool permissions.
**skill.define** is the compiler and registrar for Betty Framework skills. It ensures each `skill.yaml` conforms to schema and governance rules before registration.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
skill.define is the compiler and registrar for Betty Framework skills. It ensures each skill.yaml conforms to schema and governance rules before registration.
Acts as the quality gate for all skills in the Betty ecosystem:
registry.update for registrationpython skills/skill.define/skill_define.py <path_to_skill.yaml>
| Argument | Type | Required | Description |
|---|---|---|---|
| manifest_path | string | Yes | Path to the skill manifest file (skill.yaml) |
A valid skill manifest must include:
| Field | Type | Description | Example |
|---|---|---|---|
name | string | Unique skill identifier | api.validate |
version | string | Semantic version | 0.1.0 |
description | string | What the skill does | Validates API specifications |
inputs | array | Input parameters | ["spec_path", "guideline_set"] |
outputs | array | Output artifacts | ["validation_report"] |
dependencies | array | Required skills/deps | ["context.schema"] |
status | string | Skill status | active or draft |
registry.update to add skill to registry{
"ok": true,
"status": "registered",
"errors": [],
"path": "skills/workflow.validate/skill.yaml",
"details": {
"valid": true,
"missing": [],
"path": "skills/workflow.validate/skill.yaml",
"manifest": {
"name": "workflow.validate",
"version": "0.1.0",
"description": "Validates workflow YAML definitions",
"inputs": ["workflow.yaml"],
"outputs": ["validation_result.json"],
"dependencies": ["context.schema"],
"status": "active"
},
"status": "registered",
"registry_updated": true
}
}
{
"ok": false,
"status": "failed",
"errors": [
"Missing required fields: version, outputs"
],
"path": "skills/my-skill/skill.yaml",
"details": {
"valid": false,
"missing": ["version", "outputs"],
"path": "skills/my-skill/skill.yaml"
}
}
{
"ok": false,
"status": "failed",
"errors": [
"Failed to parse YAML: mapping values are not allowed here"
],
"path": "skills/broken/skill.yaml",
"details": {
"valid": false,
"error": "Failed to parse YAML: mapping values are not allowed here",
"path": "skills/broken/skill.yaml"
}
}
Skill Manifest (skills/api.validate/skill.yaml):
name: api.validate
version: 0.1.0
description: "Validate OpenAPI and AsyncAPI specifications against enterprise guidelines"
inputs:
- name: spec_path
type: string
required: true
description: "Path to the API specification file"
- name: guideline_set
type: string
required: false
default: zalando
description: "Which API guidelines to validate against"
outputs:
- name: validation_report
type: object
description: "Detailed validation results"
- name: valid
type: boolean
description: "Whether the spec is valid"
dependencies:
- context.schema
status: active
tags: [api, validation, openapi]
Validation Command:
$ python skills/skill.define/skill_define.py skills/api.validate/skill.yaml
{
"ok": true,
"status": "registered",
"errors": [],
"path": "skills/api.validate/skill.yaml",
"details": {
"valid": true,
"status": "registered",
"registry_updated": true
}
}
Incomplete Manifest (skills/incomplete/skill.yaml):
name: incomplete.skill
description: "This skill is missing required fields"
inputs: []
Validation Result:
$ python skills/skill.define/skill_define.py skills/incomplete/skill.yaml
{
"ok": false,
"status": "failed",
"errors": [
"Missing required fields: version, outputs, dependencies, status"
],
"path": "skills/incomplete/skill.yaml",
"details": {
"valid": false,
"missing": ["version", "outputs", "dependencies", "status"],
"path": "skills/incomplete/skill.yaml"
}
}
The skill.create skill automatically generates a valid manifest and runs skill.define to validate it:
python skills/skill.create/skill_create.py \
my.skill \
"Does something useful" \
--inputs input1,input2 \
--outputs output1
# Internally runs skill.define on the generated manifest
Skills can be validated as part of a workflow:
# workflows/create_and_register.yaml
steps:
- skill: skill.create
args: ["workflow.validate", "Validates workflow definitions"]
- skill: skill.define
args: ["skills/workflow.validate/skill.yaml"]
required: true
- skill: registry.update
args: ["skills/workflow.validate/skill.yaml"]
Automatically validate skill manifests when they're edited:
# Create a hook to validate on save
python skills/hook.define/hook_define.py \
--event on_file_save \
--pattern "skills/*/skill.yaml" \
--command "python skills/skill.define/skill_define.py {file_path}" \
--blocking true
| Error | Cause | Solution |
|---|---|---|
| "Manifest file not found" | File path is incorrect | Check the path and ensure file exists |
| "Failed to parse YAML" | Invalid YAML syntax | Fix YAML syntax errors (indentation, quotes, etc.) |
| "Missing required fields: X" | Manifest missing required field(s) | Add the missing field(s) to the manifest |
| "registry.update skill not found" | Registry updater not available | Ensure registry.update skill exists in skills/ directory |
skill.define validates manifests but delegates registration to registry.update:
/registry/skills.json with the validated skillThis separation of concerns follows Betty's single-responsibility principle.
skills/my.skill/skill.yaml)/registry/skills.json via delegation to registry.updateregistry.update skill/registry/skills.json updated via registry.updateLogs validation steps using Betty's logging infrastructure:
INFO: Validating manifest: skills/api.validate/skill.yaml
INFO: โ
Manifest validation passed
INFO: ๐ Delegating registry update to registry.update skill...
INFO: Registry update succeeded
skill.create generate manifests to ensure correct structuredependencies exist in the registrydraft for development, active for production-ready skillsActive โ This skill is production-ready and core to Betty's skill infrastructure.