Guidelines for creating and maintaining agent skills in the forjd organisation.
A skill is a folder containing a SKILL.md file with YAML frontmatter and Markdown instructions. Skills give agents procedural knowledge and context they can load on demand.
All skills live in the skills/ directory at the repo root:
skills/
├── my-skill/
│ ├── SKILL.md # Required: metadata + instructions
│ ├── scripts/ # Optional: executable code
│ ├── references/ # Optional: additional documentation
│ └── assets/ # Optional: templates, resources
└── another-skill/
└── SKILL.md
Every skill must have a SKILL.md with YAML frontmatter:
---
name: my-skill
description: >
What this skill does and when to use it. Be specific about triggers.
---
# My Skill
Instructions go here...| Field | Constraints |
|---|---|
name |
Max 64 chars. Lowercase letters, numbers, hyphens only. Must match the directory name. |
description |
Max 1024 chars. Describes what the skill does and when to use it. |
| Field | Purpose |
|---|---|
license |
Licence name or reference to a bundled licence file. |
compatibility |
Environment requirements (tools, network access, etc.). |
metadata |
Arbitrary key-value pairs (author, version, etc.). |
allowed-tools |
Space-delimited list of pre-approved tools. (Experimental) |
Optional fields are client-specific: some agents load them, some ignore them. Put essential prerequisites, safety constraints, and runtime requirements in the skill body as well as in frontmatter.
- Lowercase alphanumeric and hyphens only
- No leading, trailing, or consecutive hyphens
- Must match the parent directory name
- Use imperative phrasing: "Use this skill when..." not "This skill does..."
- Focus on user intent: describe what the user is trying to achieve
- Be specific about triggers: list contexts where the skill applies, including non-obvious ones
- Include keywords that help agents identify relevant tasks
# Bad
description: Helps with deployments.
# Good
description: >
Deploy services to our staging and production environments using
our internal CLI. Use when the user wants to deploy, rollback,
or check deployment status, even if they just say "ship it" or
"push to prod."Skills use a three-tier loading strategy to manage context efficiently:
- Discovery (~100 tokens): Only
nameanddescriptionare reliably loaded at startup - Activation (< 5000 tokens recommended): Full
SKILL.mdbody loads when the skill matches a task - Resources (as needed): Referenced files load only when required
Keep SKILL.md under 500 lines. Move detailed reference material to separate files.
Focus on project-specific conventions, domain procedures, non-obvious edge cases, and specific tools/APIs. Don't explain general concepts the agent already understands.
<!-- Too verbose -->
## Extract PDF text
PDF (Portable Document Format) files are a common file format...
<!-- Better -->
## Extract PDF text
Use pdfplumber for text extraction. For scanned documents, fall back to
pdf2image with pytesseract.Pick a recommended approach and mention alternatives briefly:
<!-- Too many options -->
You can use pypdf, pdfplumber, PyMuPDF, or pdf2image...
<!-- Better -->
Use pdfplumber for text extraction. For scanned PDFs requiring OCR,
use pdf2image with pytesseract instead.Teach the agent how to approach a class of problems, not what to produce for a specific instance.
- Give freedom when multiple approaches are valid
- Be prescriptive when operations are fragile or order matters
Provide concrete templates rather than prose descriptions of formats:
## Report structure
```markdown
# [Analysis Title]
## Executive summary
[One-paragraph overview]
## Key findings
- Finding 1 with supporting data
## Recommendations
1. Specific actionable recommendation
```## Deployment workflow
- [ ] Step 1: Run pre-flight checks
- [ ] Step 2: Create backup
- [ ] Step 3: Deploy to staging
- [ ] Step 4: Run smoke tests
- [ ] Step 5: Promote to productionInstruct the agent to validate its own work before moving on:
1. Make your changes
2. Run validation: `python scripts/validate.py output/`
3. If validation fails, fix issues and re-run
4. Only proceed when validation passesFor batch or destructive operations, have the agent create an intermediate plan, validate it, then execute.
If you notice the agent reinventing the same logic across runs, write a tested script and bundle it in scripts/.
- No interactive prompts — agents cannot respond to TTY input; accept all input via flags, env vars, or stdin
- Include
--help— this is how the agent learns the interface - Write helpful error messages — say what went wrong, what was expected, and what to try
- Use structured output — prefer JSON/CSV over free-form text; send data to stdout, diagnostics to stderr
- Be idempotent — agents may retry; "create if not exists" is safer than "create and fail on duplicate"
- Support
--dry-runfor destructive operations
Use inline dependency declarations so scripts need no separate install step:
# /// script
# dependencies = [
# "beautifulsoup4>=4.12,<5",
# ]
# ///
from bs4 import BeautifulSoup
# ...Run with uv run scripts/extract.py.
Use relative paths from the skill directory root:
## Available scripts
- **`scripts/validate.sh`** — Validates configuration files
## Workflow
1. Run validation:
```bash
bash scripts/validate.sh "$INPUT_FILE"
```- Use relative paths from the skill root
- Keep references one level deep from
SKILL.md - Avoid deeply nested reference chains
Before merging a new skill:
-
namefollows naming rules and matches directory name -
descriptionis specific, imperative, and under 1024 chars -
SKILL.mdbody is under 500 lines - Instructions focus on what the agent wouldn't know without the skill
- Scripts are non-interactive and include
--help - Tested against realistic prompts (does it trigger when it should? does it not trigger when it shouldn't?)
- Reference files are focused and loaded on demand, not all at once