Agent Skill Creation Protocol
<critical_constraints>
-
The Configuration Rule: NEVER hardcode magic strings (URLs, creds, IDs). ALWAYS extract to config/.json or config/.yaml .
-
The Anti-Flake Rule: NEVER use sleep() . ALWAYS use Semantic State Polling (wait for element/condition).
-
The Linting Rule: Design for the 1000-Token Limit. Use telegraphic style (bullet points, no fluff). Run ask skill lint immediately.
-
The Persona Rule: ALWAYS define the agent's identity in config/identity.json (even if simple).
-
The Structure Rule: MUST generate the full tree:
-
SKILL.md : The Brain.
-
scripts/ : The Hands (Logic).
-
config/ : The Memory (Data).
-
tests/ : The Proof (Verification). </critical_constraints>
- Taxonomy & Scaffolding
-
Analyze Request:
-
Category: coding (Dev), planning (Arch), tooling (Infra).
-
Name: ask-<topic> (kebab-case).
-
Create Tree: skills/<category>/ask-<topic>/ ├── SKILL.md # Protocol ├── skill.yaml # Metadata ├── config/ # Data Separation │ ├── identity.json # Persona │ └── settings.yaml # Toggles/Selectors ├── scripts/ # Logic Encapsulation │ └── helper.js # Complex math/parsing ├── assets/ # Knowledge │ └── examples.md └── tests/ # QA └── case1.md
- Protocol Design (SKILL.md)
-
Frontmatter: Define inputs and permissions explicitly.
-
Critical Constraints: Define 3-5 "NEVER/ALWAYS" rules specific to the domain.
-
Process:
-
Initialization: Load config. Calculate derived state.
-
Detection: How to identify the environment context.
-
Execution: Step-by-step logic.
-
Heuristics: "If X happens, do Y" (Self-Healing).
- Content Generation
-
skill.yaml :
-
Name, Version, Description.
-
Tags: [domain, capability, tool] .
-
Agents: [antigravity, codex] .
-
config/identity.json :
-
Define the "Expert Persona" (e.g., "Senior DBA", "Security Auditor").
-
scripts/*.js :
-
Offload complex logic (Regex, Math, API transforms) here. Keep SKILL.md for high-level flow.
- Verify
-
Lint: ask skill lint ask-<topic> . Fix lengths.
-
Register: skills/manifest.json .
SKILL.md Skeleton
name: ask-example description: [Task] specialist. version: 1.0.0 inputs: target: {required: true}
Protocol
<critical_constraints>
- Safety: NEVER [dangerous action].
- Config: Load
config/settings.yaml. </critical_constraints>
<process>
1. Detect
- Scan env. Load Identity.
2. Execute
- Action -> Verify. </process>
<heuristics>
- Error: If [Error], try [Fix].
Config Skeleton (identity.json)
{ "role": "Expert", "capabilities": ["audit"], "strict_mode": true }
<reasoning_engine>
-
Logic? -> scripts/ .
-
Data? -> config/ .
-
Rule? -> <critical_constraints> .
-
Flow? -> SKILL.md .
Optimization:
-
"Telegraphic": "Locate widget. Click Next."
-
No Politeness: "MUST", "DO". </reasoning_engine>