agent.define
# agent.define Skill
What this skill does
# agent.define Skill
Validates and registers agent manifests for the Betty Framework.
## Purpose
The `agent.define` skill is the Layer 2 (Reasoning Layer) equivalent of `skill.define`. It validates agent manifests (`agent.yaml`) for schema compliance, verifies skill references, and updates the central Agent Registry.
## Capabilities
- Validate agent manifest structure and required fields
- Verify agent name and version formats
- Validate reasoning mode enum values
- Check that all referenced skills exist in skill registry
- Ensure capabilities and skills lists are non-empty
- Validate status lifecycle values
- Register valid agents in `/registry/agents.json`
- Update existing agent entries with new versions
## Usage
### Command Line
```bash
python skills/agent.define/agent_define.py <path_to_agent.yaml>
```
### Arguments
| Argument | Type | Required | Description |
|----------|------|----------|-------------|
| `manifest_path` | string | Yes | Path to the agent.yaml file to validate |
### Exit Codes
- `0`: Validation succeeded and agent was registered
- `1`: Validation failed or registration error
## Validation Rules
### Required Fields
All agent manifests must include:
| Field | Type | Validation |
|-------|------|------------|
| `name` | string | Must match `^[a-z][a-z0-9._-]*$` |
| `version` | string | Must follow semantic versioning |
| `description` | string | Non-empty string (1-200 chars recommended) |
| `capabilities` | array[string] | Must contain at least one item |
| `skills_available` | array[string] | Must contain at least one item, all skills must exist in registry |
| `reasoning_mode` | enum | Must be `iterative` or `oneshot` |
### Optional Fields
| Field | Type | Default | Validation |
|-------|------|---------|------------|
| `status` | enum | `draft` | Must be `draft`, `active`, `deprecated`, or `archived` |
| `context_requirements` | object | `{}` | Any valid object |
| `workflow_pattern` | string | `null` | Any string |
| `example_task` | string | `null` | Any string |
| `error_handling` | object | `{}` | Any valid object |
| `output` | object | `{}` | Any valid object |
| `tags` | array[string] | `[]` | Array of strings |
| `dependencies` | array[string] | `[]` | Array of strings |
### Name Format
Agent names must:
- Start with a lowercase letter
- Contain only lowercase letters, numbers, dots, hyphens, underscores
- Follow pattern: `<domain>.<action>`
**Valid**: `api.designer`, `compliance.checker`, `data-migrator`
**Invalid**: `ApiDesigner`, `1agent`, `agent_name`
### Version Format
Versions must follow semantic versioning: `MAJOR.MINOR.PATCH[-prerelease]`
**Valid**: `0.1.0`, `1.0.0`, `2.3.1-beta`, `1.0.0-rc.1`
**Invalid**: `1.0`, `v1.0.0`, `1.0.0.0`
### Reasoning Mode
Must be one of:
- `iterative`: Agent can retry with feedback and refine based on errors
- `oneshot`: Agent executes once without retry
### Skills Validation
All skills in `skills_available` must exist in the skill registry (`/registry/skills.json`).
## Response Format
### Success Response
```json
{
"ok": true,
"status": "success",
"errors": [],
"path": "agents/api.designer/agent.yaml",
"details": {
"valid": true,
"errors": [],
"path": "agents/api.designer/agent.yaml",
"manifest": {
"name": "api.designer",
"version": "0.1.0",
"description": "Design RESTful APIs...",
"capabilities": [...],
"skills_available": [...],
"reasoning_mode": "iterative"
},
"status": "registered",
"registry_updated": true
}
}
```
### Failure Response
```json
{
"ok": false,
"status": "failed",
"errors": [
"Missing required fields: capabilities, skills_available",
"Invalid reasoning_mode: 'hybrid'. Must be one of: iterative, oneshot"
],
"path": "agents/bad.agent/agent.yaml",
"details": {
"valid": false,
"errors": [
"Missing required fields: capabilities, skills_available",
"Invalid reasoning_mode: 'hybrid'. Must be one of: iterative, oneshot"
],
"path": "agents/bad.agent/agent.yaml"
}
}
```
## Examples
### Example 1: Validate Iterative Agent
**Agent Manifest** (`agents/api.designer/agent.yaml`):
```yaml
name: api.designer
version: 0.1.0
description: "Design RESTful APIs following enterprise guidelines"
capabilities:
- Design RESTful APIs from requirements
- Apply Zalando guidelines automatically
- Generate OpenAPI 3.1 specs
- Iteratively refine based on validation feedback
skills_available:
- api.define
- api.validate
- api.generate-models
reasoning_mode: iterative
status: draft
tags:
- api
- design
- openapi
```
**Command**:
```bash
python skills/agent.define/agent_define.py agents/api.designer/agent.yaml
```
**Output**:
```json
{
"ok": true,
"status": "success",
"errors": [],
"path": "agents/api.designer/agent.yaml",
"details": {
"valid": true,
"status": "registered",
"registry_updated": true
}
}
```
### Example 2: Validation Errors
**Agent Manifest** (`agents/bad.agent/agent.yaml`):
```yaml
name: BadAgent # Invalid: must be lowercase
version: 1.0 # Invalid: must be semver
description: "Test agent"
capabilities: [] # Invalid: must have at least one
skills_available:
- nonexistent.skill # Invalid: skill doesn't exist
reasoning_mode: hybrid # Invalid: must be iterative or oneshot
```
**Command**:
```bash
python skills/agent.define/agent_define.py agents/bad.agent/agent.yaml
```
**Output**:
```json
{
"ok": false,
"status": "failed",
"errors": [
"Invalid name: Invalid agent name: 'BadAgent'. Must start with lowercase letter...",
"Invalid version: Invalid version: '1.0'. Must follow semantic versioning...",
"Invalid reasoning_mode: Invalid reasoning_mode: 'hybrid'. Must be one of: iterative, oneshot",
"capabilities must contain at least one item",
"Skills not found in registry: nonexistent.skill"
],
"path": "agents/bad.agent/agent.yaml"
}
```
### Example 3: Oneshot Agent
**Agent Manifest** (`agents/api.analyzer/agent.yaml`):
```yaml
name: api.analyzer
version: 0.1.0
description: "Analyze API specifications for compatibility"
capabilities:
- Detect breaking changes between API versions
- Generate compatibility reports
- Suggest migration paths
skills_available:
- api.compatibility
reasoning_mode: oneshot
output:
success:
- Compatibility report
- Breaking changes list
failure:
- Error analysis
status: active
tags:
- api
- analysis
- compatibility
```
**Command**:
```bash
python skills/agent.define/agent_define.py agents/api.analyzer/agent.yaml
```
**Result**: Agent validated and registered successfully.
## Integration
### With Registry
The skill automatically updates `/registry/agents.json`:
```json
{
"registry_version": "1.0.0",
"generated_at": "2025-10-23T10:30:00Z",
"agents": [
{
"name": "api.designer",
"version": "0.1.0",
"description": "Design RESTful APIs following enterprise guidelines",
"reasoning_mode": "iterative",
"skills_available": ["api.define", "api.validate", "api.generate-models"],
"capabilities": ["Design RESTful APIs from requirements", ...],
"status": "draft",
"tags": ["api", "design", "openapi"],
"dependencies": []
}
]
}
```
### With Other Skills
- **Depends on**: `skill.define` (for skill registry validation)
- **Used by**: Future `command.define` skill (to register commands that invoke agents)
- **Complements**: `workflow.compose` (agents orchestrate skills; workflows execute fixed sequences)
## Common Errors
### Missing Skills in Registry
**Error**:
```
Skills not found in registry: api.nonexistent, data.missing
```
**Solution**: Ensure all skills in `skills_available` are registered in `/registry/skills.json`. Check skill names for typos.
### Invalid Reasoning Mode
**Error**:
```
Invalid reasoning_mode: 'hybrid'. Must be one of: iterative, oneshot
```
**Solution**: Use `iterative` for agents that retRelated 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.