PTENES
MODULE 3.4

πŸ› οΈ How to Create: Building a SKILL.md from Scratch

From an empty folder to a complete SKILL.md: frontmatter (name + trigger description), imperative body with When to Use and Steps, and when to create scripts/ references/ assets/. Includes a ready-to-copy template.

6
Topics
45
Minutes
Inter.
Level
Practical
Type
1

🧭 The path from zero to SKILL.md

Creating a skill is a journey with six stops: capture intent β†’ frontmatter β†’ body β†’ folders β†’ package β†’ iterate. In this module, you go from an empty folder to a ready file. Iteration (testing and optimizing the description) is the focus of Track 4 β€” here, the focus is assembly.

1intent 2frontmatter 3body 4folders 5package 6iterate From Zero to SKILL.md

Start tiny

A valid SKILL.md has only two parts: frontmatter with name + description, and a Markdown body. Folders are optionalβ€”create them only when the content calls for it. Don’t set up scripts/ on day one.

2

🏷️ Step 1 β€” frontmatter: kebab-case name

O name is the identifier. One rule, non-negotiable: lowercase kebab-case, matching the folder name. No spaces, uppercase letters, or underscores.

βœ— Broken names

  • βœ— PDF Extractor
  • βœ— pdf_extractor
  • βœ— PdfExtractor
  • βœ— minha-skill-v2-final

βœ“ Correct names

  • βœ“ pdf-extractor
  • βœ“ frontend-design
  • βœ“ skill-creator
  • βœ“ supabase

πŸ’‘ Tip

The folder name MUST match the name. If the folder is pdf-extractor/, the frontmatter is name: pdf-extractor. A mismatch breaks loading.

3

🎣 Step 2 β€” description: the trigger

A description is the only text always loaded and what makes the skill trigger. Follow the formula: [WHAT it does] + [WHEN to use it] + [concrete TRIGGERS]. Be pushy β€” Claude under-triggers by default.

the formula in practice (example of a new skill):

description: Extract structured data from PDF
  invoices and receipts into JSON. Use this skill
  whenever the user uploads a PDF invoice/receipt,
  asks to "parse", "extract fields", or "read"
  a financial document, or mentions OCR on a
  scanned bill.
A

WHAT it does

"Extract structured data from PDF invoices..." β€” starts with a verb and states the result.

B

WHEN to use

"Use this skill whenever the user uploads a PDF invoice..." β€” the trigger condition.

C

Concrete triggers

"parse", "extract fields", "read", "OCR" β€” keywords users actually type.

~100 words is the limit

The metadata (name + description) is Level 1 of progressive disclosure and is ALWAYS in context. Keep it around 100 words: assertive enough to trigger, concise enough not to weigh down every conversation.

4

πŸ“ Step 3 β€” the body: imperative, When to Use, Steps

The body is Markdown in imperative ("Read the file," "Run the script"), explaining the why instead of shouting MUSTs in uppercase. A structure that works: title, one line describing what the skill does, When to Use, Steps numbered and with output examples.

body skeleton:

# PDF Invoice Extractor

Extracts fields from PDF invoices into clean JSON.

## When to Use
Use when the user provides a PDF invoice and asks
to extract fields, parse, or read it.

## Steps
1. Run `python scripts/extract.py <file.pdf>`.
2. Validate the JSON against the schema below.
3. Return the JSON; flag any missing field.

## Output Format
{ "vendor": str, "total": number, "date": str }

βœ— Bad body

  • βœ—"YOU MUST ALWAYS..." shouted in caps
  • βœ—Long paragraphs without steps
  • βœ—No guidance on when to use it

βœ“ Good body

  • βœ“Clear imperative + why
  • βœ“Numbered, actionable steps
  • βœ“When to Use + explicit Output Format
5

πŸ“ Step 4 β€” when to create each folder

Folders are optional and should come from need, not aesthetics. Create only when the trigger below appears:

βš™οΈ

scripts/ β€” deterministic code

Create when a task has the same input β†’ same output (convert a file, validate a schema). More reliable than instructions and runs without loading the code into context.

πŸ“š

references/ β€” docs on demand

Create when the body would grow beyond 500 lines with details that matter only in specific cases. The agent reads only the relevant file.

🎨

assets/ β€” output files

Create when the skill generates something from a template (HTML, source code, icon, boilerplate). These are files used no output, not read as instructions.

the final tree for the example skill:

pdf-extractor/
β”œβ”€β”€ SKILL.md            # frontmatter + corpo
β”œβ”€β”€ scripts/
β”‚   └── extract.py      # roda sem ir pro contexto
β”œβ”€β”€ references/
β”‚   └── field-map.md    # lido sΓ³ em casos raros
└── assets/
    └── report.html     # template de saΓ­da

πŸ’‘ Tip

Don’t create empty folders "for the future." Every file should have a corresponding pointer in the body of SKILL.md explaining when to read or run it.

6

πŸ“„ Step 5 β€” complete template to copy

Bring it all together. This is a complete SKILL.md, ready to paste into a file, change the names, and get started. It covers frontmatter, When to Use, Steps, Output Format, and pointers to the folders.

SKILL.md β€” complete template:

---
name: pdf-extractor
description: Extract structured data from PDF
  invoices and receipts into JSON. Use this skill
  whenever the user uploads a PDF invoice/receipt,
  asks to "parse", "extract fields", or "read" a
  financial document, or mentions OCR on a bill.
metadata:
  author: seu-usuario
  version: "0.1.0"
---

# PDF Invoice Extractor

Extracts fields from PDF invoices into clean,
validated JSON. Built for accounts-payable flows.

## When to Use
Use when the user provides a PDF invoice or
receipt and asks to extract, parse, or read its
fields. Do NOT use for plain-text data or images
without a document layout.

## Steps
1. Run `python scripts/extract.py <file.pdf>` to
   pull raw fields. The script handles OCR.
2. Validate the result against the schema in
   `references/field-map.md` β€” read it only if a
   field is missing or ambiguous.
3. If the user wants a report, fill the template
   `assets/report.html` with the JSON.
4. Return the JSON and flag any field you could
   not extract. Never invent values.

## Output Format
```json
{ "vendor": "string", "total": 0.00,
  "date": "YYYY-MM-DD", "line_items": [] }
```

## Notes
Explain to the user which fields were uncertain so
they can verify β€” accuracy matters more here than
speed.

Readyβ€”now test

Save as pdf-extractor/SKILL.md, create the referenced folders and you have an installable skill. Step 6 β€” test, evaluate, and optimize the description in a loop β€” is exactly the topic of Track 4. Section 3.5, next, shows how to make the multi-file structure truly sharp.

βœ… Module Summary

βœ“
Start tiny β€” frontmatter + body only; folders come from need.
βœ“
name in kebab-case β€” tiny, no spaces, same as the folder name.
βœ“
description = trigger β€” WHAT + WHEN + TRIGGERS, ~100 words, pushy.
βœ“
imperative body β€” When to Use, numbered Steps, Output Format, the why.
βœ“
folders on demand β€” scripts/ (deterministic), references/ (docs), assets/ (output).
βœ“
complete template β€” copy, swap the names, and install.

Next:

Module 3.5 β€” πŸš€ Advanced Tips: real progressive disclosure, domain-based routing, scripts that run without context, and how to keep SKILL.md under 500 lines.