home / skills / danielmiessler / personal_ai_infrastructure / createskill

This skill helps validate and canonicalize skills by ensuring TitleCase structure and YAML accuracy across skill files.

npx playbooks add skill danielmiessler/personal_ai_infrastructure --skill createskill

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

Files (5)
SKILL.md
7.8 KB
# ValidateSkill Workflow

**Purpose:** Check if an existing skill follows the canonical structure with proper TitleCase naming.

---

## Step 1: Read the Authoritative Source

**REQUIRED FIRST:** Read the canonical structure:

```
~/.claude/skills/CORE/SkillSystem.md
```

---

## Step 2: Read the Target Skill

```bash
~/.claude/skills/[SkillName]/SKILL.md
```

---

## Step 3: Check TitleCase Naming

### Skill Directory
```bash
ls ~/.claude/skills/ | grep -i [skillname]
```

Verify TitleCase:
- ✓ `Blogging`, `Daemon`, `CreateSkill`
- ✗ `createskill`, `create-skill`, `CREATE_SKILL`

### Workflow Files
```bash
ls ~/.claude/skills/[SkillName]/Workflows/
```

Verify TitleCase:
- ✓ `Create.md`, `UpdateDaemonInfo.md`, `SyncRepo.md`
- ✗ `create.md`, `update-daemon-info.md`, `SYNC_REPO.md`

### Tool Files
```bash
ls ~/.claude/skills/[SkillName]/Tools/
```

Verify TitleCase:
- ✓ `ManageServer.ts`, `ManageServer.help.md`
- ✗ `manage-server.ts`, `MANAGE_SERVER.ts`

---

## Step 4: Check YAML Frontmatter

Verify the YAML has:

### Single-Line Description with USE WHEN
```yaml
---
name: SkillName
description: [What it does]. USE WHEN [intent triggers using OR]. [Additional capabilities].
---
```

**Check for violations:**
- Multi-line description using `|` (WRONG)
- Missing `USE WHEN` keyword (WRONG)
- Separate `triggers:` array in YAML (OLD FORMAT - WRONG)
- Separate `workflows:` array in YAML (OLD FORMAT - WRONG)
- `name:` not in TitleCase (WRONG)

---

## Step 5: Check Markdown Body

Verify the body has:

### Workflow Routing Section
```markdown
## Workflow Routing

**When executing a workflow, output this notification:**

```
Running the **WorkflowName** workflow from the **SkillName** skill...
```

| Workflow | Trigger | File |
|----------|---------|------|
| **WorkflowOne** | "trigger phrase" | `Workflows/WorkflowOne.md` |
```

**Check for violations:**
- Missing `## Workflow Routing` section
- Workflow names not in TitleCase
- File paths not matching actual file names

### Examples Section
```markdown
## Examples

**Example 1: [Use case]**
```
User: "[Request]"
→ [Action]
→ [Result]
```
```

**Check:** Examples section required (WRONG if missing)

---

## Step 6: Check Workflow Files

```bash
ls ~/.claude/skills/[SkillName]/Workflows/
```

Verify:
- Every file uses TitleCase naming
- Every file has a corresponding entry in `## Workflow Routing` section
- Every routing entry points to an existing file
- Routing table names match file names exactly

---

## Step 7: Check Structure

```bash
ls -la ~/.claude/skills/[SkillName]/
```

Verify:
- `tools/` directory exists (even if empty)
- No `backups/` directory inside skill
- Reference docs at skill root (not in Workflows/)

---

## Step 7a: Check CLI-First Integration (for skills with CLI tools)

**If the skill has CLI tools in `tools/`:**

### CLI Tool Configuration Flags

Check each tool for flag-based configuration:
```bash
bun ~/.claude/skills/[SkillName]/Tools/[ToolName].ts --help
```

Verify the tool exposes behavioral configuration via flags:
- Mode flags (--fast, --thorough, --dry-run) where applicable
- Output flags (--format, --quiet, --verbose)
- Resource flags (--model, etc.) if applicable
- Post-processing flags if applicable

### Workflow Intent-to-Flag Mapping

For workflows that call CLI tools, check for intent-to-flag mapping tables:

```bash
grep -l "Intent-to-Flag" ~/.claude/skills/[SkillName]/Workflows/*.md
```

**Required pattern in workflows with CLI tools:**
```markdown
## Intent-to-Flag Mapping

| User Says | Flag | When to Use |
|-----------|------|-------------|
| "fast" | `--model haiku` | Speed priority |
| (default) | `--model sonnet` | Balanced |
```

**Reference:** `~/.claude/skills/CORE/CliFirstArchitecture.md`

---

## Step 8: Report Results

**COMPLIANT** if all checks pass:

### Naming (TitleCase)
- [ ] Skill directory uses TitleCase
- [ ] All workflow files use TitleCase
- [ ] All reference docs use TitleCase
- [ ] All tool files use TitleCase
- [ ] Routing table names match file names

### YAML Frontmatter
- [ ] `name:` uses TitleCase
- [ ] `description:` is single-line with `USE WHEN`
- [ ] No separate `triggers:` or `workflows:` arrays
- [ ] Description under 1024 characters

### Markdown Body
- [ ] `## Workflow Routing` section present
- [ ] `## Examples` section with 2-3 patterns
- [ ] All workflows have routing entries

### Structure
- [ ] `tools/` directory exists
- [ ] No `backups/` inside skill

### CLI-First Integration (for skills with CLI tools)
- [ ] CLI tools expose configuration via flags (not hardcoded)
- [ ] Workflows that call CLI tools have intent-to-flag mapping tables
- [ ] Flag mappings cover mode, output, and resource selection where applicable

**NON-COMPLIANT** if any check fails. Recommend using CanonicalizeSkill workflow.

Overview

This skill validates that a skill follows the canonical structure and naming conventions so it can integrate smoothly with agentic workflows. It enforces TitleCase naming, a single-line frontmatter description with a USE WHEN clause, required routing and examples sections, and overall filesystem structure. The outcome is a clear pass/fail report and actionable remediation guidance.

How this skill works

The validator reads the authoritative canonical spec and then inspects the target skill directory and files. It checks directory and file naming, frontmatter formatting, required markdown sections, workflow routing consistency, tooling flags, and CLI-first intent-to-flag mappings where applicable. Finally, it produces a compliance report with recommended fixes or a pass confirmation.

When to use it

  • When introducing a new skill to the shared skills collection
  • When updating a skill to ensure naming and routing remain canonical
  • Before merging a skill into a production agent to avoid runtime mismatches
  • When converting older skills from legacy frontmatter formats
  • When adding CLI tools to ensure intent-to-flag mappings exist

Best practices

  • Use TitleCase for skill directories, workflow files, and tool files consistently
  • Keep the frontmatter description single-line and include a clear USE WHEN phrase
  • Maintain a ## Workflow Routing table that mirrors actual workflow filenames
  • Include a ## Examples section with 2–3 concise patterns showing user→action→result
  • Place reference docs at the skill root and keep a tools/ directory (even if empty)
  • For CLI tools, expose behavior via flags and include an intent-to-flag mapping table

Example use cases

  • Validate a newly created skill before publishing to the shared skill index
  • Audit an existing skill after a refactor to catch naming or routing regressions
  • Check CLI-based skills to ensure flags cover mode, output, and resource choices
  • Run a pre-merge check to ensure frontmatter is canonical and under length limits
  • Generate a remediation checklist when a skill fails one or more validations

FAQ

What triggers a non-compliant report?

Any mismatch in TitleCase naming, a multi-line or missing USE WHEN frontmatter, absent routing or examples sections, missing tools/ directory, or incorrect CLI intent-to-flag mappings will mark the skill non-compliant.

Does the validator auto-fix issues?

It provides precise remediation steps but does not modify files automatically; use the Canonicalize workflow or manual edits to apply fixes.