Review skill format

From pjt222/agent-almanac · View interactive version

Review skill format is an AI agent skill from the GitHub repository pjt222/agent-almanac. Review a SKILL.md file for compliance with the agentskills.io standard. Checks YAML frontmatter fields, required sections, line count limits, procedure step format, and registry synchronization. Use when a new skill needs format validation before merge, an existing skill has been modified and requir

How to use this skill

Skill file

Review Skill Format

Validate a SKILL.md file against the agentskills.io open standard. This skill checks YAML frontmatter completeness, required section presence, procedure step format (Expected/On failure blocks), line count limits, and registry synchronization. Use this before merging any new or modified skill.

When to Use

Inputs

Procedure

Step 1: Verify File Exists and Read Content

Confirm the SKILL.md file exists at the expected path and read its full content.

# Verify file exists
test -f skills/<skill-name>/SKILL.md && echo "EXISTS" || echo "MISSING"

# Count lines
wc -l < skills/<skill-name>/SKILL.md

Got: File exists and content is readable. Line count is displayed.

If fail: If the file does not exist, check the path for typos. Verify the skill directory exists with ls skills/<skill-name>/. If the directory is missing, the skill has not been created yet — use create-skill first.

Step 2: Check YAML Frontmatter Fields

Parse the YAML frontmatter block (between --- delimiters) and verify all required and recommended fields are present.

Required fields:

Recommended metadata fields:

# Check required frontmatter fields exist
head -30 skills/<skill-name>/SKILL.md | grep -q '^name:' && echo "name: OK" || echo "name: MISSING"
head -30 skills/<skill-name>/SKILL.md | grep -q '^description:' && echo "description: OK" || echo "description: MISSING"
head -30 skills/<skill-name>/SKILL.md | grep -q '^license:' && echo "license: OK" || echo "license: MISSING"
head -30 skills/<skill-name>/SKILL.md | grep -q '^allowed-tools:' && echo "allowed-tools: OK" || echo "allowed-tools: MISSING"

Got: All four required fields present. All six metadata fields present. name matches directory name. description is under 1024 characters.

If fail: Report each missing field as BLOCKING. If name does not match directory name, report as BLOCKING with the expected value. If description exceeds 1024 characters, report as SUGGEST with current length.

Step 3: Locale-Specific Validation (Translations Only)

If the frontmatter contains a locale field, the file is a translated SKILL.md. Perform these additional checks. If no locale field is present, skip this step.

  1. Translation frontmatter fields — Verify these five fields are present:
  1. Prose language scan — Sample 3-5 body paragraphs (outside code blocks, frontmatter, and headings). Verify the prose is written in the target locale, not English. Ignore: code blocks, inline code, tool names, field names, file paths, and English terms that have no standard translation in the target language.
  1. Code block identity check — Compare code blocks in the translated file against the English source at skills/<skill-name>/SKILL.md. Code blocks must be identical (code is never translated). Flag any code block whose content differs from the English source.
# Check translation frontmatter fields
for field in "locale:" "source_locale:" "source_commit:" "translator:" "translation_date:"; do
  grep -q "^${field}\|^  ${field}" i18n/<locale>/skills/<skill-name>/SKILL.md \
    && echo "$field OK" || echo "$field MISSING"
done

Got: All five translation fields present. Body paragraphs are in the target locale. Code blocks match the English source exactly.

If fail: Report missing translation fields as BLOCKING. If body paragraphs are in English despite a non-English locale, report as BLOCKING — the file has untranslated prose. If code blocks differ from the English source, report as BLOCKING — code must not be translated or modified.

Step 4: Check Required Sections

Verify all six required sections are present in the skill body (after frontmatter).

Required sections:

  1. ## When to Use
  2. ## Inputs
  3. ## Procedure (with ### Step N: sub-sections)
  4. ## Validation (may also appear as ## Validation Checklist)
  5. ## Pitfalls
  6. ## Related Skills
# Check each required section
for section in "## When to Use" "## Inputs" "## Procedure" "## Common Pitfalls" "## Related Skills"; do
  grep -q "$section" skills/<skill-name>/SKILL.md && echo "$section: OK" || echo "$section: MISSING"
done

# Validation section may use either heading
grep -qE "## Validation( Checklist)?" skills/<skill-name>/SKILL.md && echo "Validation: OK" || echo "Validation: MISSING"

Got: All six sections present. Procedure section contains at least one ### Step sub-heading.

If fail: Report each missing section as BLOCKING. A skill without all six sections is non-compliant with the agentskills.io standard. Provide the section template from the create-skill meta-skill.

Step 5: Check Procedure Step Format

Verify each procedure step follows the required pattern: numbered step title, context, code block(s), and Got:/If fail: blocks.

For each ### Step N: sub-section, check:

  1. The step has a descriptive title (not just "Step N")
  2. At least one code block or concrete instruction exists
  3. An **Got:** block is present
  4. An **If fail:** block is present

Got: Every procedure step has both Got: and If fail: blocks. Steps contain concrete code or instructions, not vague descriptions.

If fail: Report each step missing Expected/On failure as BLOCKING. If steps contain only vague instructions ("configure the system appropriately"), report as SUGGEST with a note to add concrete commands.

Step 6: Verify Line Count

Check that the SKILL.md is within the 500-line limit.

lines=$(wc -l < skills/<skill-name>/SKILL.md)
[ "$lines" -le 500 ] && echo "OK ($lines lines)" || echo "OVER LIMIT ($lines lines > 500)"

Got: Line count is 500 or fewer.

If fail: If over 500 lines, report as BLOCKING. Recommend using the refactor-skill-structure skill to extract code blocks >15 lines to references/EXAMPLES.md. Typical reduction: 20-40% by extracting extended examples.

Step 7: Check Registry Synchronization

Verify the skill is listed in skills/_registry.yml under the correct domain with matching metadata.

Check:

  1. Skill id exists under the correct domain section
  2. path matches <skill-name>/SKILL.md
  3. complexity matches frontmatter
  4. description is present (may be abbreviated)
  5. total_skills count at the top of the registry matches actual skill count
# Check if skill is in registry
grep -q "id: <skill-name>" skills/_registry.yml && echo "Registry: FOUND" || echo "Registry: NOT FOUND"

# Check path
grep -A1 "id: <skill-name>" skills/_registry.yml | grep -q "path: <skill-name>/SKILL.md" && echo "Path: OK" || echo "Path: MISMATCH"

Got: Skill is listed in the registry under the correct domain with matching path and metadata. Total count is accurate.

If fail: If not found in registry, report as BLOCKING. Provide the registry entry template:

- id: skill-name
  path: skill-name/SKILL.md
  complexity: intermediate
  language: multi
  description: One-line description

Validation

Pitfalls

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.