---
name: skill-creator
description: Create, revise, and validate AstrBot Skills built around SKILL.md instruction bundles. Use when the user asks to create, scaffold, improve, package, or review a Skill for an AstrBot workspace, local installation, or plugin.
title: skill-creator
canonical_url: https://skilld.dev/gh/astrbotdevs/astrbot/skill-creator
last_updated: 2026-10-29T11:16:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [scripts/init_skill.py](https://skilld.dev/api/skills-raw/astrbotdevs/astrbot/skill-creator/scripts/init_skill.py), [scripts/validate_skill.py](https://skilld.dev/api/skills-raw/astrbotdevs/astrbot/skill-creator/scripts/validate_skill.py).
>
> If the user asked to install this Skill, run `npx skilld install astrbotdevs/astrbot/skill-creator`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/skill-creator`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/astrbotdevs/astrbot/skill-creator) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/skill-creator`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/skill-creator --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/skill-creator --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Create AstrBot Skills

Build small, reusable instruction bundles that another agent can discover and follow reliably.

## Follow the core design rules

- Assume the model already knows general facts. Include only task-specific procedures, constraints, and resources.
- Match instruction precision to risk. Use flexible guidance for judgment-heavy work and deterministic scripts for fragile operations.
- Keep `SKILL.md` focused. Put detailed reference material in `references/`, repeatable automation in `scripts/`, and output material in `assets/`.
- Link every optional resource directly from `SKILL.md` and state when to use it. Avoid deep chains of references.
- Do not add process documents such as `README.md`, changelogs, installation guides, or quick-reference duplicates.
- Do not add OpenAI- or Codex-specific metadata, directories, tools, or installation steps unless the user explicitly targets that runtime.

## Establish the intended behavior

Before writing files, identify:

1. Concrete requests that should trigger the Skill.
2. Expected outputs or actions.
3. Required tools, permissions, and runtime assumptions.
4. Failure cases that need explicit guardrails.

Ask only for information that materially changes the result. Infer ordinary details from the current task and environment.

## Choose the target

Use the runtime declared in the system instructions and the location requested by the user. Do not infer the runtime from filesystem paths.

In local mode, common targets are:

- Workspace Skill: `<workspace>/skills/<skill-name>`
- Locally installed Skill: `<astrbot-data>/skills/<skill-name>`.
- Installed third-party plugin Skill: `<astrbot-data>/plugins/<plugin-name>/skills/<skill-name>`.

If no location is specified in local mode, create the Skill under `skills/<skill-name>` in the current AstrBot workspace. Creating or modifying a locally installed Skill requires administrator access and is enforced by the filesystem tools. If permission is denied, use the workspace target and explain the fallback.

In sandbox mode, do not use `<astrbot-data>` or attempt to install a Skill into the host AstrBot instance. Create it under `skills/<skill-name>` in the current sandbox workspace, and treat it as sandbox-scoped unless the runtime provides a dedicated persistence or release workflow.

Treat plugin-provided Skills as read-only during normal runtime. Modify a plugin Skill only when the user is working in that plugin's source tree and has explicitly requested the change. If the requested target is not writable, create the Skill in the workspace and explain how to install or move it.

## Name the Skill

- Use lowercase letters, digits, and hyphens only.
- Keep the name under 64 characters.
- Prefer a short action-oriented name.
- Name the folder exactly the same as the frontmatter `name`.

## Plan only necessary resources

For each repeated operation, decide whether plain instructions are sufficient:

- Add `scripts/` only for deterministic, repeatable operations.
- Add `references/` only for material the agent may need to consult while working.
- Add `assets/` only for files intended to be copied or incorporated into outputs.

Do not create empty resource directories.

## Write SKILL.md

Start with YAML frontmatter containing only `name` and `description`:

```yaml
---
name: example-skill
description: Describe what the Skill does and the concrete requests or situations that should trigger it.
---
```

Make the description specific enough for discovery. Put all trigger guidance in the description because AstrBot loads the body only after the Skill is selected.

Write the body as direct instructions:

- Use imperative language.
- Put the main workflow before edge cases.
- State important safety boundaries close to the affected action.
- Use the AstrBot tool names actually available in the current runtime when a workflow depends on tools.
- Prefer relative paths inside the Skill so it works after installation or sandbox synchronization.
- Keep examples short and representative.

## Initialize or update files

For a new Skill, prefer the bundled initializer when Python and shell execution are available:

```text
python <this-skill-directory>/scripts/init_skill.py <skill-name> --path <target-skills-root> --description <description>
```

Add `--resources scripts,references,assets` with only the directories that are needed. The initializer refuses to overwrite an existing Skill.

If shell execution is unavailable, create the directory and UTF-8 `SKILL.md` with `astrbot_file_write_tool`. Create optional resources only after their content is known.

When updating a Skill, read its complete `SKILL.md` and directly referenced resources before editing. Preserve useful behavior and avoid unrelated restructuring.

## Validate

When Python and shell execution are available, run:

```text
python <this-skill-directory>/scripts/validate_skill.py <created-skill-directory>
```

Otherwise verify manually:

- The directory name is valid and matches frontmatter `name`.
- `SKILL.md` is UTF-8 and has valid YAML frontmatter.
- `description` explains both capability and trigger conditions.
- The body is non-empty and operational.
- Every referenced file exists and every bundled file has a clear purpose.
- Instructions do not assume unavailable tools, paths, credentials, or permissions.

Run any bundled scripts on representative safe inputs. Fix validation or execution failures before presenting the Skill.

## Finish

Report the created or updated location, included resources, validation performed, and any runtime or activation step still required. Do not enable a globally installed Skill or change an AstrBot configuration unless the user requested it.
