AI coding agents can do much more than simply generate code. With skills, you can give an AI agent reusable instructions that teach it how to approach specific tasks.
In this guide, you’ll learn how to use OpenCode Skills to improve your development workflow. We’ll cover how to create skills, add existing skills to a project, use skills such as frontend design and web app testing, and configure skills globally so they’re available across your projects.
What Are OpenCode Skills?
OpenCode Skills are Markdown-based instructions that OpenCode can advertise to an AI agent and load when they are relevant to the task.
A skill can also include supporting resources such as:
- Scripts
- Reference files
- Additional documentation
- Other files stored in the same skill directory
This makes skills useful for creating reusable instructions for common development tasks.
For example, you could create skills for:
- Frontend design
- Web application testing
- Code reviews
- Documentation
- Database development
- API development
- Deployment workflows
Instead of repeatedly explaining your preferred workflow to an AI coding agent, you can store those instructions inside a skill and reuse them whenever necessary.
How OpenCode Skills Are Organized
A skill is organized inside its own directory and contains a SKILL.md file.
The general structure looks like this:
.open-code/
└── skills/
└── my-skill/
└── SKILL.md
Each skill gets its own directory under the skills directory.
For example:
.open-code/
└── skills/
├── frontend-design/
│ └── SKILL.md
│
└── web-app-testing/
└── SKILL.md
The important part is that each skill has its own directory containing a SKILL.md file.
You can also include supporting files alongside the Markdown instructions.
How to Add OpenCode Skills to a Project
Let’s start with project-level skills.
Suppose you have an e-commerce project and want OpenCode to use specialized skills when working on that project.
First, create an OpenCode skills directory inside your project:
.open-code/skills/
Your project might then look like this:
my-ecommerce-project/
├── .open-code/
│ └── skills/
├── src/
├── package.json
└── ...
Inside the skills directory, you can create a separate folder for each skill.
For example:
.open-code/
└── skills/
├── frontend-design/
│ └── SKILL.md
│
└── web-app-testing/
└── SKILL.md
This allows you to keep multiple skills organized within the same project.
Using Skills From Anthropic’s Skills Repository
You don’t necessarily have to create every skill yourself.
You can also use existing skills from the Anthropic Skills repository.
The repository contains several reusable skills that you can add to your OpenCode projects.
For example, you can use the frontend design skill.
The general process is:
- Find the skill you want to use.
- Open its directory.
- Copy the contents of its
SKILL.mdfile. - Create a corresponding skill directory in your OpenCode project.
- Add the
SKILL.mdfile. - Paste the skill instructions into the file.
For example:
.open-code/
└── skills/
└── frontend-design/
└── SKILL.md
The SKILL.md file contains the instructions that OpenCode can use when the skill is relevant.
Keeping the Skill License
If the skill you’re using includes a license file, you should also preserve the license according to the repository’s licensing requirements.
For example:
.open-code/
└── skills/
└── frontend-design/
├── SKILL.md
└── LICENSE.txt
Copy the appropriate license file from the original repository along with the skill when required.
Always check the original repository’s license before redistributing or modifying third-party skills.
Adding Another Skill
You can add as many skills as you need.
For example, let’s add a web app testing skill.
Create another directory:
.open-code/
└── skills/
├── frontend-design/
│ └── SKILL.md
│
└── web-app-testing/
└── SKILL.md
Then add the corresponding SKILL.md file.
You can obtain the skill instructions from an existing skill repository or create your own instructions.
The important thing is that every skill has its own directory and SKILL.md file.
How to Use a Skill in OpenCode
Once you’ve added the skills to your project, you can ask OpenCode to use them when performing a task.
For example, suppose you want to improve the design of your website.
You could give OpenCode an instruction such as:
I want to improve my website design based on the frontend-design skill.
OpenCode can then identify and trigger the relevant skill.
The agent can use the instructions provided by the skill while analyzing your project and planning the changes.
Using Skills to Create a Design Plan
One useful aspect of skills is that they can guide the agent through a structured workflow.
For example, when using a frontend design skill, OpenCode can first explore your existing project to understand what you’re working with.
It can then create a plan for improving the design.
The workflow can look like this:
User request
↓
OpenCode identifies relevant skill
↓
Skill instructions are loaded
↓
Project is analyzed
↓
A design plan is created
↓
User reviews the plan
↓
OpenCode implements the changes
This gives you more control than simply asking the AI to immediately modify your project.
You can review the proposed plan first.
If the plan looks good, you can ask OpenCode to build it.
If something needs to change, you can provide feedback before implementation.
Why Skills Are Useful
Without skills, you may have to repeatedly tell an AI coding agent how you want certain tasks performed.
For example, every time you ask it to improve a website, you might need to explain:
- Your preferred design principles
- How the agent should analyze the existing UI
- What it should consider before making changes
- How it should create a plan
- How it should implement the changes
With a skill, those instructions can be stored once and reused.
This makes skills particularly useful for developers who repeatedly perform similar tasks.
Project-Level vs Global Skills
OpenCode skills can be configured at different levels.
The two important approaches covered here are:
Project-level skills
Project-level skills are stored inside the project.
For example:
project/
└── .open-code/
└── skills/
These skills are useful when the instructions are specific to a particular project.
For example, an e-commerce application might have skills specifically related to:
- Its frontend architecture
- Its testing workflow
- Its design system
- Its deployment process
Global skills
Global skills are stored in your user-level OpenCode configuration directory.
This makes them available when working across different projects.
Global skills are useful for reusable workflows that you want to use everywhere.
How to Configure Global OpenCode Skills
If you want to use the same skills across multiple projects, you can configure them at the global level.
The exact location depends on your operating system.
On macOS, the OpenCode configuration is stored under your user profile.
The structure follows this pattern:
~/.config/opencode/
└── skills/
You can place your reusable skills inside this directory.
For example:
~/.config/opencode/
└── skills/
├── frontend-design/
│ └── SKILL.md
│
└── web-app-testing/
└── SKILL.md
On Windows, the corresponding OpenCode configuration directory is located under your user profile.
The key idea is the same: place your reusable skills inside the global OpenCode skills directory so they can be discovered across projects.
When Should You Use Global Skills?
Global skills are particularly useful when a skill isn’t tied to one specific project.
For example, you might create a global skill for:
code-review/
SKILL.md
Then you can use that workflow across many different repositories.
Other good candidates for global skills include:
- Code review
- Testing
- Documentation
- Security checks
- Debugging
- General frontend development
- API development
Project-specific instructions, on the other hand, are often better kept at the project level.
Example OpenCode Skills Structure
After adding several skills, your project could look like this:
my-project/
├── .open-code/
│ └── skills/
│ ├── frontend-design/
│ │ ├── SKILL.md
│ │ └── LICENSE.txt
│ │
│ └── web-app-testing/
│ └── SKILL.md
│
├── src/
├── package.json
└── ...
And your global configuration could look like:
~/.config/opencode/
└── skills/
├── frontend-design/
│ └── SKILL.md
│
└── code-review/
└── SKILL.md
This gives you a clean way to separate project-specific skills from reusable global skills.
Final Thoughts
OpenCode Skills provide a practical way to give AI coding agents reusable instructions.
Instead of relying entirely on prompts, you can package your preferred workflows into Markdown-based skills and allow OpenCode to use them when they’re relevant.
The basic workflow is simple:
- Create a
skillsdirectory. - Create a separate directory for each skill.
- Add a
SKILL.mdfile. - Add supporting files when necessary.
- Store project-specific skills inside your project.
- Store reusable skills in the global OpenCode configuration.
- Ask OpenCode to perform a task that benefits from the skill.
- Review the generated plan before allowing the agent to implement it.
If you work with AI coding agents regularly, building a collection of reusable skills can make your development workflow more consistent and easier to repeat.
You can also start by using existing skills and gradually create your own as you discover workflows that you perform repeatedly.