skills/new-skill/SKILL.md
Best practices for creating a SKILL.md file. Covers file structure, frontmatter, writing style, and where to place skills in a repository. Use when the user wants to create a new skill, update an existing skill, write a SKILL.md, or asks how skills work.
npx skillsauth add remorses/kimaki new-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A skill is a markdown file that teaches an AI agent a specific workflow, tool, or pattern. Skills are loaded into context when the agent recognizes a task that matches the skill's description.
Place the skill in a top-level skills/ folder at the repository root:
skills/<skill-name>/SKILL.md
For example: skills/critique/SKILL.md, skills/errore/SKILL.md.
Do not put skills inside package folders like cli/skills/, website/skills/, or packages/foo/skills/ unless the repository intentionally syncs or mirrors them there for internal tooling. The canonical repository layout for a skill you are creating is always the root-level skills/ directory.
The folder name should match the skill name in kebab-case. Each skill gets its own folder so it can include companion files if needed (scripts, templates, references).
For personal skills that follow you across all repos and are not meant for distribution in a GitHub repository, place them in:
~/.config/opencode/skills/<skill-name>/SKILL.md
Personal skills are only available on your machine. Repository skills are shared with everyone who clones the repo.
Some projects (like kimaki) sync skills from external GitHub repositories into a local skills folder. If a skill was synced from another repo, never edit the synced copy. The synced folder is overwritten on every sync and your changes will be lost.
Instead, find the source repository where the skill originates and edit the SKILL.md there. The sync process will pick up the changes on the next run. If you are unsure which repo a skill comes from, check for a sync script (e.g. scripts/sync-skills.ts) or a source-repo field in the skill's frontmatter.
When you publish skills in a GitHub repository, other users can install them with the skills CLI:
npx skills add owner/repo
This downloads the skills from the repo and symlinks them into the user's agent directories. Add this to your repo's README so users know how to install:
## Install skill for AI agents
\`\`\`bash
npx -y skills add owner/repo
\`\`\`
This installs [skills](https://skills.sh) for AI coding agents like
Claude Code, Cursor, Windsurf, and others. Skills teach agents the
workflows, patterns, and tools specific to this project.
Every SKILL.md starts with YAML frontmatter containing three required fields:
---
name: skill-name
repo: https://github.com/remorses/critique # replace with the canonical skill repo
description: >
One to three sentences explaining what this skill does and when to use it.
Start with a noun or verb phrase. Include trigger conditions so the agent
knows when to load this skill automatically.
---
Good description example:
name: critique
repo: https://github.com/remorses/critique
description: >
Git diff viewer. Renders diffs as web pages, images, and PDFs
with syntax highlighting. Use this skill when working with critique
for showing diffs, generating diff URLs, or selective hunk staging.
Bad description example:
description: A helpful tool for developers.
After the frontmatter, write the skill as a normal markdown document. Follow this general structure:
# Skill Title
One paragraph explaining what this skill is and why it exists.
## Key section
Core rules, commands, or patterns. Use code blocks for commands
and examples. Use numbered lists for sequential steps.
## Another section
More detail, edge cases, gotchas, tips.
There is no rigid template. Structure the content in whatever way communicates the workflow most clearly. Some skills are short (20 lines for a simple CLI tool), others are long (600+ lines for a complex pattern like errore).
Write for an AI agent, not a human. The reader is a language model that will follow these instructions while helping a user. This changes how you write:
tool --help first" not "You might want to consider running the help command."<!-- Skill instructions for agents using ... -->.A good skill captures hard-won knowledge that is not obvious from reading docs or source code alone. Focus on:
A bad skill is just a copy of the tool's README or man page. If the agent could figure it out from --help, it does not need a skill for it.
The best skills are thin. Keep as much user-facing documentation as possible in the repository docs, README, or CLI help output. The SKILL.md should point agents at those canonical docs so content stays fresh, then add only the agent-specific instructions that do not belong in human-facing docs.
Good agent-only instructions include rules a human reader does not need, but an agent must follow to avoid mistakes:
--help outputDo not copy the whole README into the skill. Put general explanations, examples, API docs, and user-facing guides in the repo docs instead. The skill should be the small bridge between the agent and the canonical source of truth.
There are two variants:
1. CLI tools → run <tool> --help
Put as much documentation as possible into the CLI itself — command descriptions, option help text, examples. The skill then says:
Every time you use mytool, you MUST run:
\`\`\`bash
mytool --help # NEVER pipe to head/tail, read the full output
\`\`\`
Exception: some CLIs have a dedicated <tool> skill subcommand when --help is not rich enough (e.g. playwriter skill). Prefer --help by default and only use a custom subcommand when the CLI ships one.
2. Libraries and projects → curl the raw README
For libraries, frameworks, and pattern skills, keep the canonical docs in README.md and have the skill curl the raw file from the main branch so the agent always reads the latest version:
Every time you work with myproject, you MUST fetch the latest README:
\`\`\`bash
curl -s https://raw.githubusercontent.com/owner/repo/main/README.md # NEVER pipe to head/tail
\`\`\`
In monorepos/workspaces, always put the README at the repository root — not inside individual package folders. Package-level READMEs don't get read by anyone. One root README is the single source of truth for the whole project. The skill should curl the root README path (.../main/README.md), not a package subdirectory.
Never truncate docs output. The agent must read --help and curl'd README output in full. Never pipe through head, tail, sed -n, awk, | less, or any command that strips or limits lines. Critical rules are spread throughout the doc, not just at the top. Agents truncate frequently and miss important context — forbid it explicitly in the skill body.
Simple CLI tool skill (critique):
---
name: critique
repo: https://github.com/remorses/critique
description: Git diff viewer. Renders diffs as web pages, images, and PDFs
with syntax highlighting. Use this skill when working with critique for
showing diffs, generating diff URLs, or selective hunk staging.
---
# critique
Git diff viewer that creates shareable web pages, images, and PDFs.
Always run `critique --help` first. The help output has all commands,
options, and examples.
## Show a diff
\`\`\`bash
critique --web "Describe pending changes"
\`\`\`
Pattern/convention skill (errore — 647 lines):
---
name: errore
repo: https://github.com/remorses/errore
description: >
errore is Go-style error handling for TypeScript: return errors instead
of throwing them. ALWAYS read this skill when a repo uses the errore
"errors as values" convention.
---
# errore
Go-style error handling for TypeScript. Functions return errors instead
of throwing them.
## Rules
1. Always `import * as errore from 'errore'` — namespace import
2. Never throw for expected failures — return errors as values
3. Use `createTaggedError` for domain errors
...
Notice both follow the same pattern: minimal frontmatter, clear title, actionable content with code examples. The simple tool skill is short and focused on commands. The pattern skill is long and focused on rules and conventions.
Before saving a new skill:
--help command) instead of duplicating docs inline?development
Opinionated TypeScript npm package template for ESM packages. Enforces src→dist builds with tsc, strict TypeScript defaults, explicit exports, and publish-safe package metadata. Use this when creating or updating any npm package in this repo.
documentation
Best practices for creating a SKILL.md file. Covers file structure, frontmatter, writing style, and where to place skills in a repository. Use when the user wants to create a new skill, update an existing skill, write a SKILL.md, or asks how skills work.
tools
Centralized state management pattern using Zustand vanilla stores. One immutable state atom, functional transitions via setState(), and a single subscribe() for all reactive side effects. Based on Rich Hickey's "Simple Made Easy" principles: prefer values over mutable state, derive instead of cache, centralize transitions, and push side effects to the edges. Resource co-location in the same store is also valid when lifecycle management is safer that way. Also covers state encapsulation: keeping state local to its owner (closures, plugins, factory functions) so it doesn't leak across the app, reducing the blast radius of mutations. Also covers event sourcing: keeping a bounded event buffer and deriving state with pure functions instead of mutable flags, making event handlers easy to test and reason about. Use this skill when building any stateful TypeScript application (servers, extensions, CLIs, relays) to keep state simple, testable, and easy to reason about. ALWAYS read this skill when a project uses zustand/vanilla for state management outside of React.
tools
zele is a multi-account email and calendar CLI for Gmail, IMAP/SMTP (Fastmail, Outlook, any provider), and Google Calendar. It reads, searches, sends, replies, forwards, archives, stars, and trashes emails, manages drafts, labels, attachments, and Gmail filters, and creates, updates, and deletes calendar events with RSVP and free/busy support. Output is YAML so commands can be piped through yq and xargs. ALWAYS load this skill when the user asks to check email, read/send messages, reply or forward, archive or trash threads, manage drafts or labels, download attachments, schedule meetings, check their calendar, RSVP to events, or when they run any `zele` command. Load it before writing any code or shell commands that touch zele so you know the correct subcommand structure, the Google vs IMAP feature matrix, the headless login flow, and the agent-specific rules.