home / skills / plurigrid / asi / skill-specification

skill-specification skill

/skills/skill-specification

This skill standardizes cross-platform agent capabilities to ensure evolutionarily robust performance across Claude, Codex, Cursor, Amp, and future agents.

npx playbooks add skill plurigrid/asi --skill skill-specification

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.1 KB
---
name: skill-specification
description: Agent Skills formal specification for cross-platform compatibility. Ensures skills are evolutionarily robust across Claude, Codex, Cursor, Amp, and future agents.
metadata:
  short-description: SKILL.md format specification
  spec-url: https://agentskills.io/specification
  validator: skills-ref validate
---

# Skill Specification

Formal specification for evolutionarily robust agent skills.

## Why This Matters

Skills that follow the spec work across:
- **Claude Code** (Anthropic)
- **Codex CLI** (OpenAI)
- **Cursor** (Anysphere)
- **Amp** (Sourcegraph)
- **Letta** (memGPT)
- Future agents

Non-compliant skills break silently or fail validation.

## SKILL.md Schema

```yaml
---
name: skill-name              # REQUIRED: lowercase, hyphens, 1-64 chars
description: What and when    # REQUIRED: max 1024 chars, no < or >
license: Apache-2.0           # optional
compatibility: Requires git   # optional, max 500 chars
metadata:                     # optional: custom key-value pairs
  trit: 0
  author: bmorphism
  version: "1.0"
allowed-tools: Bash Read      # optional, experimental
---

# Body content (Markdown)
```

## Field Constraints

| Field | Required | Rules |
|-------|----------|-------|
| `name` | ✓ | `[a-z0-9-]+`, no `--`, no leading/trailing `-`, max 64 |
| `description` | ✓ | 1-1024 chars, no `<` or `>`, includes WHEN to use |
| `license` | ✗ | Short name or file reference |
| `compatibility` | ✗ | Environment requirements, max 500 |
| `metadata` | ✗ | Arbitrary k:v for custom fields |
| `allowed-tools` | ✗ | Space-delimited tool names |

## Evolutionary Robustness Patterns

### 1. Progressive Disclosure

```
Level 1: name + description (~100 tokens) - loaded at startup
Level 2: SKILL.md body (<5000 tokens) - loaded on activation
Level 3: scripts/, references/, assets/ - loaded on demand
```

Keep SKILL.md under 500 lines. Move details to `references/`.

### 2. Cross-Platform Compatibility

```yaml
# BAD - platform-specific
allowed-tools: claude_desktop_mcp

# GOOD - generic capability
compatibility: Requires MCP server access
```

### 3. Self-Validation Hook

Include validation in your skill:

```bash
# scripts/validate.sh
skills-ref validate "$(dirname "$0")/.."
```

### 4. Semantic Versioning in Metadata

```yaml
metadata:
  version: "2.1.0"
  breaking-changes: "v2.0 changed API"
```

### 5. Triadic Classification (GF(3) Extension)

For plurigrid/asi skills:

```yaml
metadata:
  trit: -1   # MINUS: verification, constraint
  trit: 0    # ERGODIC: balance, mediation
  trit: +1   # PLUS: generation, exploration
```

Conservation: `Σ trits ≡ 0 (mod 3)` across compositions.

## Directory Structure

```
skill-name/
├── SKILL.md           # Required
├── scripts/           # Executable code
│   └── main.py
├── references/        # Additional docs
│   └── REFERENCE.md
└── assets/            # Static resources
    └── template.json
```

## Validation Commands

```bash
# Official validator
skills-ref validate ./my-skill

# Codex-rs validator
python3 codex-rs/core/src/skills/assets/samples/skill-creator/scripts/quick_validate.py ./my-skill

# Batch validate
for d in skills/*/; do skills-ref validate "$d"; done
```

## Common Failures

| Error | Fix |
|-------|-----|
| No YAML frontmatter | Add `---` delimiters |
| Unexpected keys | Move to `metadata:` |
| Angle brackets in description | Remove `<` and `>` |
| Name not hyphen-case | Lowercase, hyphens only |
| Description too long | Max 1024 chars |
| YAML colon in value | Quote the string |

## Evolution Strategy

1. **Start minimal** - name + description + one paragraph
2. **Add scripts/** when automation helps
3. **Add references/** when body exceeds 300 lines
4. **Add metadata** for custom classification
5. **Validate on every commit** via CI

## References

- [agentskills.io/specification](https://agentskills.io/specification)
- [github.com/agentskills/agentskills](https://github.com/agentskills/agentskills)
- [OpenAI Codex Skills](https://developers.openai.com/codex/skills/)
- [Claude Code Skills](https://docs.claude.com/en/docs/claude-code/skills)

Overview

This skill defines a formal specification for creating evolutionarily robust agent skills that work across multiple agent platforms. It prescribes manifest fields, directory layout, validation hooks, and patterns that prevent silent failures across Claude, Codex, Cursor, Amp, and future agents. The goal is predictable compatibility and smooth evolution as agents change.

How this skill works

The skill provides a canonical manifest schema and concrete constraints for required and optional fields, plus a recommended directory structure for code, references, and assets. It enforces progressive disclosure (small manifests at startup, larger bodies on activation), cross-platform compatibility rules, and self-validation hooks to catch common errors early. Validation commands and common failure modes are included so CI can enforce the spec.

When to use it

  • When authoring a reusable agent skill intended for multiple runtimes and vendors
  • When you need a minimal startup footprint with richer docs loaded on demand
  • When establishing CI checks to prevent compatibility regressions
  • When classifying skills with structured metadata and semantic versioning

Best practices

  • Keep the manifest short and include WHEN to use in the description field
  • Use generic capability wording for compatibility instead of platform-specific tool names
  • Include a validation script runnable from CI to catch schema and formatting errors
  • Follow progressive disclosure: provide lightweight metadata at load and move long docs to references
  • Use semantic versioning and a metadata block for custom classification

Example use cases

  • Create a cross-agent CLI skill that runs on Claude, Codex, and Cursor without platform-specific fields
  • Author skills with minimal startup manifests and lazily-loaded reference documents for large bodies
  • Add CI validation to block commits with malformed manifests or forbidden characters in descriptions
  • Classify a family of skills using trit metadata for automated composition and compatibility checks

FAQ

What fields are required in the manifest?

Provide a machine-safe name and a concise description that includes when to use the skill; other fields like license, compatibility, and metadata are optional but recommended.

How do I handle platform-specific features?

Prefer generic capability descriptions and put platform-specific instructions in reference docs or asset scripts loaded on demand to preserve cross-platform compatibility.