Publishing Guide

Publishing Guide

Create well-structured skills and save them to the registry via the web UI or the MCP add_skill tool.

Creating a SKILL.md File

Every skill starts with a SKILL.md file. This is a markdown file with YAML frontmatter that follows the agent-skills specification. The frontmatter provides structured metadata for discovery and compatibility, while the markdown body contains the instructions your agent will execute.

---
name: api-docs-generator
description: >
  Generate comprehensive OpenAPI 3.1 documentation
  from source code, comments, and type definitions.
version: 1.2.0
license: Apache-2.0
compatibility:
  - cursor
  - claude-code
  - jetbrains-ai
metadata:
  category: documentation
  tags:
    - openapi
    - api
    - documentation
  author: acme
  homepage: https://github.com/acme/api-docs-skill
allowed-tools:
  - Read
  - Grep
  - Glob
  - Write
  - Bash
---

# API Documentation Generator

You are a technical writer specializing in API
documentation. When activated, analyze the codebase
and generate OpenAPI 3.1 specifications.

## Workflow

1. Scan for route handlers and controllers
2. Extract request/response types from source
3. Read inline JSDoc / docstring comments
4. Generate an `openapi.yaml` at the project root

## Output Format

Always produce valid OpenAPI 3.1 YAML. Include:
- Operation summaries and descriptions
- Request body schemas with examples
- Response schemas for all status codes
- Authentication requirements

Frontmatter Fields Reference

The following table describes every available frontmatter field, whether it is required, and its constraints.

FieldRequiredConstraints
nameYesLowercase alphanumeric + hyphens. Max 64 characters. Must be unique within the owner namespace.
descriptionYesPlain text, max 1,024 characters. Used for search indexing and discovery.
versionYesSemantic versioning (e.g. 1.0.0). Each publish must increment the version.
licenseNoSPDX license identifier (e.g. MIT, Apache-2.0). Defaults to UNLICENSED.
compatibilityNoArray of IDE identifiers. Known values: cursor, claude-code, jetbrains-ai. Omit to indicate universal compatibility.
metadataNoObject with optional keys: category (string), tags (string array, max 10), author (string), homepage (URL).
allowed-toolsNoArray of tool names the skill may invoke (e.g. Read, Write, Bash). Used for security review and sandboxing.

The full SKILL.md body (frontmatter + markdown) must stay under 5,000 tokens to comply with the activation budget defined in the agent-skills specification.

Adding Supporting Files

Skills can include files beyond the core SKILL.md. These files are organized into conventional directories and stream on-demand during execution, keeping the initial context lightweight.

scripts/

Executable scripts the skill can invoke via the Bash tool. Examples: linters, formatters, migration runners. Must be referenced in the SKILL.md body to be accessible.

references/

Documentation, schema files, or specification excerpts the agent can read for context. Useful for domain-specific knowledge that does not fit in the main body.

assets/

Templates, configuration files, and static resources. For example, a boilerplate .eslintrc or a Dockerfile template the skill can scaffold.

Example directory structure

my-skill/
  SKILL.md
  scripts/
    lint.sh
    format.sh
  references/
    style-guide.md
    api-schema.json
  assets/
    template.dockerfile

Saving via the Web UI

The simplest way to add a skill for the first time:

  1. 1

    Navigate to Add Skill

    Go to your dashboard and click Add Skill in the top-right corner.

  2. 2

    Upload your files

    Drag and drop your SKILL.md and any supporting directories. The UI validates the frontmatter in real time and highlights any issues.

  3. 3

    Save

    Click Save. The skill is saved as private and becomes available immediately to your organization via the MCP tools.

  4. 4

    Share globally (optional)

    To make your skill available to all users, visit the skill detail page and click Share Globally. This action requires confirmation and cannot be undone.

Adding via MCP

For CI/CD pipelines or automated workflows, use the add_skill MCP tool directly from any connected IDE or agent. Skills are saved as private by default.

// The add_skill MCP tool accepts:
add_skill({
  skillMdContent: "---\nname: code-review\ndescription: ...\n---\n\n# Code Review\n...",
  versionLabel: "1.0",
  files: [                  // optional supporting files
    {
      path: "references/style-guide.md",
      content: "<base64-encoded content>"
    }
  ]
})

Response

{
  "skill": { "owner": "acme", "name": "code-review" },
  "version": { "version": "1.0", "versionNumber": 1 },
  "created": true,
  "message": "Saved code-review v1"
}

See the MCP Reference for full parameter documentation and error handling.

Versioning

Skills Hub uses semantic versioning. Every time you publish an update, the version field in your frontmatter must be higher than the previous version.

Latest is always served. When an IDE calls get_skill or get_skill_content, it receives the latest published version. No pinning is required.

Full history retained. Every version is preserved in the registry. View version history on the skill detail page in the dashboard.

Changelog support. Add an optional changelog field in your publish request to describe what changed. This shows up in the skill detail page and version history.

// The get_skill MCP tool returns version info:
get_skill({ owner: "acme", name: "code-review" })

// Response includes current version details:
{
  "name": "code-review",
  "owner": "acme",
  "version": "1.2.0",
  "description": "Review code for bugs and security issues.",
  "files": [...]
}

Visibility

Each skill has a visibility setting that controls who can discover and activate it.

Private

Only members of your organization can discover and activate the skill. Ideal for internal tooling, proprietary workflows, and skills containing sensitive business logic.

Global

Visible to all authenticated registry users. Shows up in the public Explore page and in discover_skills results for all users.

All skills start as private. To share a skill globally, visit the skill detail page and click Share Globally. This makes the skill visible to all users in the public catalog.

Best Practices

Well-crafted skills lead to better agent performance. Follow these guidelines to get the most from your skills.

Write clear, scoped descriptions

The description is what agents use to decide relevance. Be specific about what the skill does, not what it is. “Review TypeScript code for null safety issues and missing error handlers” is better than “Code review skill.”

Keep the body under 5,000 tokens

Move supplementary content into references/ files that stream on-demand. The body should contain the essential instructions the agent needs to start working.

Declare allowed-tools explicitly

Listing the tools your skill requires helps users assess risk before activation. A skill that only needs Read and Grep is safer than one that needs Bash.

Use structured output formats

When your skill produces output, define a clear format (markdown, JSON, YAML) in the instructions. This helps downstream tools parse the results.

Avoid hardcoding paths or secrets

Skills run in different environments. Use relative paths and environment variable references instead of absolute paths or embedded credentials.

Test before sharing globally

Skills start as private by default. Test with your own IDE integration and validate the output quality before using Share Globally to make the skill public.

Next steps

Ready to integrate publishing into your CI/CD pipeline? The MCP Reference has full tool documentation and examples.

Command Palette

Search for a command to run...