We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Writing Skills

Again, a skill is just a directory with a Markdown file that has YAML frontmatter at the top. Here's an example from the OpenCode maintainers:

---
name: pull-request
description: Finalize approved changes into a pull request by adding, committing, rebasing, squashing, and drafting a new pull request
---

## Checklist

1. Run the CI steps locally to ensure everything passes. If it doesn't, inform the developer.
2. Stage and commit the approved changes.
   1. If there are any sloppy "wip," "fixup," or "draft" commits, squash them into the previous most logical commit.
3. Rebase onto `main`.
4. Create a draft pull request:
   1. Check if an open PR already exists.
   2. If no open PR exists yet, open a new one.
   3. If a PR already exists, update the existing branch and PR.
   4. If the branch history was rewritten locally, push with `--force-with-lease` when updating the PR.
   5. Use this format for the title: `[ticket number] - [short description of the change]`
   6. Include a more detailed description in the body, preferring single sentence bullet points.
      1. If the work is related to a GH issue, link it in this format: `related to #1234`
      2. If the work fully resolves a GH issue, link it in this format: `resolves #1234`

## Rules

- NEVER push direct to `main`
- Sign off all PR bodies with "pr drafted by ai slop cannon"

Where Skills Live

  • Project-specific skills: .agents/skills/<name>/SKILL.md
  • Global (personal) skills: ~/.agents/skills/<name>/SKILL.md

The directory name determines the skill's ID; its frontmatter name is just a display label, so keep them the same unless you enjoy creating confusion for yourself.

We'll use .agents/skills because multiple coding agents understand it. OpenCode's native location is .opencode/skills, and it also discovers .claude/skills for compatibility reasons.

Invoking Skills

A skill at .agents/skills/pull-request/SKILL.md becomes @pull-request. Invoking it loads the skill's Markdown content into the conversation. You can also use /skills to open a searchable list of skills if you can't remember the exact name.

Assignment

Tell OpenCode to run and submit the CLI tests from the project root.