Skip to content

skillit is a CLI to generate an opinionated skill from Starlight documentation.

When you run skillit to create a skill, it does the following:

  1. Creates a directory for your skills and, inside it, a subdirectory for the new skill.
  2. Copies all .md and .mdx files from your Starlight site into a rules directory inside skills/your-skill, converting .mdx files to .md and removing or replacing Starlight components in the process.
  3. Creates a SKILL.md file with the skill metadata and a list of all copied files.

When you run it to update an existing skill, it re-copies the files and refreshes the list of copied files in SKILL.md.

At the end of the process, you should have something like this:

  • Directoryskills
    • Directoryyour-skill
      • SKILL.md
      • Directoryrules
        • getting-started.md
        • how-to-guide.md

The SKILL.md file, on the other hand, should contain something like this:

---
name: your-skill
description: This is the skill description.
---
## How to use
Read individual rule files for detailed explanations and code examples.
- [Getting Started](rules/getting-started.md)
- [How to guide](rules/how-to-guide.md)

You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.

skillit is also designed to be used in monorepos, for example, where you have a package alongside its documentation and want to add a skill right there. That said, this is not a requirement.

  1. Run the following command:

    Terminal window
    npx skillit@latest
  2. Then just follow the prompts.