Codex

validate-metadata

Validate AIWG extension definitions against the metadata schema and report errors with field names, line numbers, and remediation hints

104 stars

Best use case

validate-metadata is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

It is a strong fit for teams already working in Codex.

Validate AIWG extension definitions against the metadata schema and report errors with field names, line numbers, and remediation hints

Teams using validate-metadata should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/validate-metadata/SKILL.md --create-dirs "https://raw.githubusercontent.com/jmagly/aiwg/main/.agents/skills/validate-metadata/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/validate-metadata/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How validate-metadata Compares

Feature / Agentvalidate-metadataStandard Approach
Platform SupportCodexLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate AIWG extension definitions against the metadata schema and report errors with field names, line numbers, and remediation hints

Which AI agents support this skill?

This skill is designed for Codex.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Validate Metadata

You validate all AIWG extension definitions (agents, skills, commands, behaviors) against the metadata schema. You report errors with field names, line numbers, and remediation hints — and return a clean pass/fail summary.

## Triggers

Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):

- "are my extensions valid?" → run full metadata validation
- "check my agent definitions" → validate agent metadata specifically
- "is this skill definition correct?" → validate single extension file
- "prep for release" → validate metadata as part of pre-release checks

## Trigger Patterns Reference

| Pattern | Example | Action |
|---------|---------|--------|
| Validate request | "validate metadata" | Run `aiwg validate-metadata` |
| Check request | "check metadata" | Run `aiwg validate-metadata` |
| Validate extensions | "validate extensions" | Run `aiwg validate-metadata` |
| Quality check | "metadata quality" | Run `aiwg validate-metadata` |
| Single file | "validate this agent file" | Run `aiwg validate-metadata <path>` |
| Type-scoped | "validate just the skills" | Run `aiwg validate-metadata --type skills` |
| Fix mode | "validate and report errors clearly" | Run `aiwg validate-metadata --verbose` |

## Behavior

When triggered:

1. **Extract intent**:
   - Is validation scoped to a specific extension type (agents, skills, commands, behaviors)?
   - Is a specific file path mentioned?
   - Is verbose output needed?

2. **Run the appropriate command**:

   ```bash
   # Default: validate all extensions
   aiwg validate-metadata

   # Verbose output with line numbers and hints
   aiwg validate-metadata --verbose

   # Scope to a specific type
   aiwg validate-metadata --type agents
   aiwg validate-metadata --type skills
   aiwg validate-metadata --type commands
   aiwg validate-metadata --type behaviors

   # Validate a single file
   aiwg validate-metadata agentic/code/addons/aiwg-utils/skills/my-skill/SKILL.md

   # Machine-readable JSON output (for CI)
   aiwg validate-metadata --json
   ```

3. **Report the result** — list all errors with field, location, and fix hint; summarize pass/fail count.

## What Gets Validated

| Check | Description |
|-------|-------------|
| Required fields | `id`, `name`, `description`, `platforms` present |
| ID format | Lowercase, hyphen-separated, no spaces |
| Version format | CalVer (`YYYY.M.PATCH`) for versioned extensions |
| Trigger phrases | At least one trigger phrase defined per skill |
| Tool declarations | Tools listed in `allowedTools` are valid AIWG tools |
| Platform list | All platforms are valid (`claude-code`, `hermes`, `openclaw`, etc.) |
| Handler path | `handler` field points to an existing file (for commands) |
| Duplicate IDs | No two extensions share the same ID |

## Error Format

Errors are reported in this format:

```
ERROR  skills/my-skill/SKILL.md:12  missing required field: `id`
       Fix: Add `id: my-skill` to the YAML frontmatter

WARN   agents/my-agent/AGENT.md:3   version format invalid: `1.0.0`
       Fix: Use CalVer format: `2026.4.0`

PASS   commands/my-command/COMMAND.md
```

## Examples

### Example 1: Full validation before release

**User**: "Run metadata validation before I tag the release"

**Extraction**: Full validation, no scope restriction

**Action**:
```bash
aiwg validate-metadata --verbose
```

**Response**: "Validated 47 extension definitions. 45 passed. 2 errors found:
- `skills/soul-blend/SKILL.md` line 4: platforms list is empty — add at least one platform
- `agents/test-engineer/AGENT.md` line 9: duplicate ID 'test-engineer' conflicts with `agents/testing/test-engineer/AGENT.md`"

### Example 2: Scoped validation for skills only

**User**: "Check only the skills metadata"

**Extraction**: Type-scoped to skills

**Action**:
```bash
aiwg validate-metadata --type skills
```

**Response**: "Validated 38 skill definitions. All passed."

### Example 3: Single file validation

**User**: "Is this agent definition valid?" (with path provided)

**Extraction**: Single file path

**Action**:
```bash
aiwg validate-metadata agentic/code/addons/aiwg-utils/skills/new-skill/SKILL.md
```

**Response**: "1 error: missing required field `id` in frontmatter (line 3). Add `id: new-skill` to fix."

### Example 4: CI pipeline usage

**Action**:
```bash
aiwg validate-metadata --json
```

**Output**:
```json
{
  "total": 47,
  "passed": 45,
  "failed": 2,
  "errors": [
    { "file": "skills/soul-blend/SKILL.md", "line": 4, "field": "platforms", "message": "platforms list is empty" }
  ]
}
```

## References

- @$AIWG_ROOT/src/cli/handlers/utilities.ts — Command handler
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference
- @$AIWG_ROOT/src/extensions/types.ts — Extension type definitions and schema

Related Skills

Metadata Tagging

104
from jmagly/aiwg

opustags and ffmpeg patterns for applying metadata to audio and video files

validate-component

104
from jmagly/aiwg

Validate a single AIWG component (skill, agent, or command) for completeness and correctness

Codex

validate-addon

104
from jmagly/aiwg

Validate an entire AIWG addon package for completeness and release readiness

Codex

soul-validate

104
from jmagly/aiwg

Validate a SOUL.md file against community best practices and quality criteria

Codex

setup-validate

104
from jmagly/aiwg

Validate a `setup.aiwg.io/v1` SetupManifest file against the schema and run cons

Codex

reproducibility-validate

104
from jmagly/aiwg

Run a workflow multiple times and compare outputs to produce a similarity score and pass/fail verdict

Codex

provenance-validate

104
from jmagly/aiwg

Validate provenance records and chains for completeness and consistency

Codex

prose-validate

104
from jmagly/aiwg

Validate an OpenProse program file against Prose contract grammar without executing it — checks frontmatter, contract structure, service references, and strategy syntax

Codex

mention-validate

104
from jmagly/aiwg

Validate all @-mentions resolve to existing files

Codex

devkit-validate

104
from jmagly/aiwg

Validate addon, framework, or extension structure and manifest

Codex

contract-validate

104
from jmagly/aiwg

Validate that a chain of AIWG skills has all requires: inputs satisfied by upstream ensures: outputs before execution. Catches missing dependencies at wiring time rather than at runtime.

Codex

artifact-metadata

104
from jmagly/aiwg

Manage artifact metadata, versioning, ownership, and review history across the SDLC lifecycle

Codex