Skip to main content

Usage

Description

The init command creates a new skill by generating a SKILL.md file with proper frontmatter and structure. It provides a starting template that follows the Agent Skills specification.

Arguments

string
Optional skill name. Determines the skill directory and default skill name.
  • With name: Creates <name>/SKILL.md
  • Without name: Creates SKILL.md in current directory (uses current directory name as skill name)
Examples:
  • skills init my-skill → Creates my-skill/SKILL.md
  • skills init → Creates SKILL.md (in current directory)

Generated Template

The command generates a SKILL.md file with this structure:

Template Components

The frontmatter contains metadata:
Required fields:
  • name: Unique identifier (lowercase, hyphens allowed)
  • description: Brief explanation of the skill’s purpose
Main heading using the skill name:
General instructions for the agent:
Describes scenarios where the skill should be invoked:
Step-by-step guide for the agent:

Examples

Output Example

Next Steps

After creating a skill:
1

Edit SKILL.md

Open the generated file and customize:
  • Update name in frontmatter
  • Write a clear description
  • Add detailed instructions
  • Document when the skill should be used
2

Test Locally

Install the skill locally to test:
3

Publish (Optional)

Share your skill:Option 1: GitHub
Option 2: Direct URL

Skill Naming Best Practices

Use Kebab Case

Name skills with lowercase and hyphens:web-scraperpr-reviewcommit-messageWebScraperpr_reviewcommit message

Be Descriptive

Choose names that clearly indicate purpose:frontend-design-guidelinestypescript-best-practicesapi-documentationskill1helperutils

Keep It Concise

Prefer shorter names when possible:pr-reviewweb-designcommit-msg⚠️ pull-request-review-and-approval ⚠️ comprehensive-web-design-guidelines

Avoid Conflicts

Check existing skills to avoid name collisions:

Advanced Frontmatter

You can extend the generated frontmatter with additional fields:
See the Skills Specification for all available fields.

File Already Exists

If SKILL.md already exists at the target path:
The command will not overwrite existing files. To reinitialize:

Repository Structure

When creating skills for a repository, follow these patterns:
For repositories with one skill: