---
name: ard-skill-builder
displayName: ARD Skill Builder
description: Author StealthStack ARD-1 SKILL.md files that drop straight into
  the catalog. Use when creating, scaffolding, or validating a new skill for the
  ARD registry.
tags:
  - meta
  - skill-authoring
  - ard
  - catalog
  - builder
capabilities:
  - ClassifyPrimitive
  - ComposeSkillMd
  - GenerateRepresentativeQueries
  - ExtractContext
  - ValidateFrontmatter
representativeQueries:
  - Create a new ARD skill for sending Slack messages
  - Turn this API into a catalog skill
  - Scaffold a SKILL.md that passes ARD validation
  - Help me author a skill for the StealthStack catalog
  - Generate a skill folder I can drop into ard-1/public/skills
version: 0.1.0
---

# ARD Skill Builder

A meta-skill for authoring **StealthStack ARD-1** `SKILL.md` files that pass validation and drop straight into the catalog at `ard-1/public/skills/<slug>/SKILL.md`. It encodes the authoring contract, the primitive grammar, and the anti-hallucination rules learned from rebuilding the existing catalog.

## When to use this skill
Use whenever you need to create a new catalog skill, convert a tool/API/workflow into a skill, or check that a draft `SKILL.md` will pass ARD validation before posting it.

## Steps
1. **Classify the primitive kind.** Decide which of the 9 kinds the skill is — see `references/PRIMITIVES.md`. (Resource: `mcp_toolkit`, `document`, `extractor`, `fetcher`. Producer: `generator`, `builder`, `authoring`. Plus `methodology`, `reference`.) The kind selects the body skeleton.
2. **Bind the context.** Fill the kind's slots: toolkit / format / source / artifact_type / domain.
3. **Enumerate operations as CRUD.** For resource/producer kinds, list the concrete actions as `{operation, crud (CREATE|READ|UPDATE|DELETE|ACTION), resource}`. These become the `capabilities` and the Operations table. Use real tool names — never invent slugs.
4. **Write the frontmatter** (see `references/SPEC.md` for the full field table):
   - `name`: kebab-case, equals the folder slug. `displayName`: human title.
   - `description`: one sentence, what it does **and** when to use it (≤200 chars).
   - `tags`, `capabilities`: short identifiers.
   - `representativeQueries`: **4–5** real natural-language intents (the ranking surface — see Notes).
   - `version`: semver (start `0.1.0`).
   - `context` + `context_verified`: see step 6.
5. **Write the body**: `# Title` → 1–3 sentence overview → `## Steps` (the primitive's invariant protocol) → `## Operations` (CRUD table, resource/producer kinds) → `## Output` → `## Context` → `## Notes`. Keep it under ~500 lines; push long material to `references/`.
6. **Draft `context` from source only.** Capture domain knowledge an agent could NOT derive from the operations (param quirks, gotchas, vocabulary, what-not-to-do). Extract it from real source material — never invent. Set `context_verified: false`.
7. **Validate.** Run `scripts/validate_skill.py <path-to-SKILL.md>` (checks the frontmatter against `assets/frontmatter.schema.json` + the ARD rules). Fix any errors.
8. **Place it.** Write to `ard-1/public/skills/<slug>/SKILL.md` (prefix the folder with `_` to stage as a draft). Then `npm run build:catalog && npm run validate:catalog`.

## Operations
| Capability | What it does |
|---|---|
| `ClassifyPrimitive` | Map an intent to one of the 9 primitive kinds |
| `ComposeSkillMd` | Produce a spec-conformant SKILL.md from kind + context + operations |
| `GenerateRepresentativeQueries` | Draft 4–5 natural-language intents (the ranking surface) |
| `ExtractContext` | Distill source-grounded domain knowledge (never invented) |
| `ValidateFrontmatter` | Check a SKILL.md against the ARD-1 frontmatter schema |

## Output
A folder `ard-1/public/skills/<slug>/` containing a validated `SKILL.md` (plus optional `references/`, `scripts/`, `assets/`) that produces exactly one ARD catalog entry.

## Context
- The generator sets `identifier`, `type`, `url`, `trustManifest`, `updatedAt`, `host` — never put these in frontmatter.
- `representativeQueries` outside 2–5 items is rejected/dropped; it is the registry's semantic-search surface, so write real questions a user would ask.
- The slug is identity: folder name = `name` = URL = URN. Changing it changes the resource. `_`-prefixed folders are drafts excluded from the published catalog.
- `context` is the trust root — extract from real source, flag `context_verified: false`, and never fabricate it.

## Notes
- **representativeQueries are the highest-leverage field.** Phrase them as real intents ("Find a contact in our CRM", not "crm search"). Vary phrasing; cover the main use cases. Keep 4–5.
- **Faithful-minimal > example-rich.** The dominant failure mode is confidently inventing tool slugs, params, or examples. If you don't know it from source, leave it out.
- **The domain is the trust root** — don't claim capabilities the skill can't deliver.
- See `references/SPEC.md` (full authoring contract) and `references/PRIMITIVES.md` (the 9 kinds + how to render each).
