On this page
Claude Skills: Building Agentic Workflows
modular, reusable workflows.
Think of a Skill as a packaged specialist you train once.
Instead of re-explaining your brand guidelines or coding preferences every time you open a chat, you just trigger the Skill.
Introduction
A Skill is simply a folder containing instructions, optional scripts, and resources.
It relies on a concept called Progressive Disclosure, which uses a three-tier loading model to save your context window:
-
Level 1 (Metadata): Claude reads a tiny YAML header (name and description) at the start of the chat. This costs barely any tokens.
-
Level 2 (Instructions): When your prompt matches the Skill’s description, Claude loads the full instruction file into its context.
-
Level 3 (Resources): If your instructions tell Claude to reference a specific template or run a Python script in the folder, it uses its code execution environment to open those files only when needed.
Project
Create a new folder named skill.
Skills are loaded from these locations:
Project-local:
- .opencode/skills/
/SKILL.md - .claude/skills/
/SKILL.md - .agents/skills/
/SKILL.md
Global (home directory):
- ~/.config/opencode/skills/
/SKILL.md - ~/.claude/skills/
/SKILL.md - ~/.agents/skills/
/SKILL.md
Each skill requires its own folder named after the skill, with a SKILL.md file inside it.
For example:
.opencode/skills/git-release/SKILL.mdThe SKILL.md file must start with YAML frontmatter containing at minimum name and description fields, and the name must match the directory name.
Set Up the Folder Structure
To start, create a new folder on your computer.
Name it something clear, using lowercase letters and hyphens. Inside that folder, you need one required file: SKILL.md.
Here is how your folder should look:
weekly-report-formatter/├── SKILL.md├── report-template.md (optional)└── calculate-metrics.py (optional)Write the SKILL.md Frontmatter
Open your SKILL.md file. The very top of this file must be a YAML frontmatter block. This is what Claude scans to know your Skill exists and when to use it.
Your frontmatter must include a name and a description:
---name: weekly-report-formatterdescription: Use this skill when the user asks to format or generate a weekly progress report.---Make the description as clear as possible. Include the specific trigger phrases you might use.
Add Your Core Instructions
Directly below the YAML frontmatter, write out the step-by-step instructions you want Claude to follow. Use standard Markdown.
# Weekly Report Formatter
When this skill is activated, follow these exact steps:
1. Read the raw notes provided by the user.2. Open the `report-template.md` file in this directory to understand the required structure.3. Categorize the user's notes into "Completed", "In Progress", and "Blockers".4. If any metrics are provided, ensure they are formatted as a bulleted list.5. Output the final report using the exact headings from the template.Add Supporting Resources (Optional)
If your workflow requires specific templates, reference materials, or Python scripts, save them in the same folder. Because Skills run in an environment where Claude has filesystem access (via bash), it can easily read a template file or execute a script you provide, just like you instructed it to do in a previous step.
Use Your Skill
Drop your Skill folder into the .claude/skills/ directory of your project.
You can then trigger it directly by typing /weekly-report-formatter in your terminal.
/skillsThe skill has been created at .opencode/skills/supply-chain/SKILL.md.
It will be available as supply-chain in the skill tool, with the description:
Analyze and solve supply chain problems including inventory, logistics, and demand forecasting The skill covers inventory optimization, procurement, demand forecasting, logistics, and risk assessment. Feel free to edit the SKILL.md to refine the instructions or add domain-specific context for your use case.
In OpenCode, “Skills” are actually called Custom Commands. They operate on the same principle—packaging a repeatable prompt or workflow—but the setup is specific to OpenCode’s architecture.