← Back to blog

Write a Skill

Create a custom skill — Markdown file, YAML frontmatter, available to all your agents.

tutorial·CrabTalk Team·

A skill is a Markdown file with YAML frontmatter. Create one, drop it in the skills directory, and your agents can use it immediately.

1. Create the skill directory

mkdir -p ~/.crabtalk/skills/code-review

2. Write SKILL.md

Create ~/.crabtalk/skills/code-review/SKILL.md:

---
name: code-review
description: Review code for bugs, security issues, and style problems
allowed-tools: read_file search_files
---

You are a code reviewer. When asked to review code:

1. Read the files carefully
2. Check for bugs, security vulnerabilities, and style issues
3. Suggest specific improvements with code examples
4. Be concise — flag problems, don't rewrite the codebase

3. Test it

crabtalk attach
> /code-review
> Review the authentication module

The /code-review slash command loads the skill into the current session. The agent follows the skill's instructions for the rest of the conversation.

Frontmatter fields

FieldRequiredDescription
nameYesSkill identifier, used in /name commands
descriptionYesOne-line summary — affects BM25 search ranking
allowed-toolsNoSpace-separated tool names the skill pre-approves
licenseNoLicense reference
compatibilityNoRequirements (e.g., "Requires git")
metadataNoArbitrary key-value pairs

Writing good descriptions

The skill registry uses BM25 search over names and descriptions. A good description helps agents find skills automatically — not just through slash commands. Be specific: "Review code for bugs, security issues, and style problems" ranks better than "Code review skill."

Publishing to the hub

Skills are auto-discovered — not declared in manifests. Put your SKILL.md inside a skills/<name>/ directory in your package's source repository. When someone installs your package, CrabTalk finds the skill automatically.

my-repo/
  skills/
    code-review/
      SKILL.md

Create a hub manifest that points to your repo and open a pull request at github.com/crabtalk/hub. See the manifest spec for the full schema.

What's next

  • Skills — how skill discovery and scoping work
  • Hub — publish and share packages