.stencila/skills/skill-creation/SKILL.md
Create a new Stencila workspace skill. Use when asked to create, write, or scaffold a SKILL.md file or skill directory.
npx skillsauth add stencila/stencila skill-creationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a new workspace skill directory and SKILL.md file following the Agent Skills Specification. A skill is a directory under .stencila/skills/ containing a SKILL.md file with YAML frontmatter and a Markdown body. Skills are reusable instruction sets for AI agents.
Skills should be self-contained. Do not rely on documentation or other content outside the skill directory. If the skill needs supporting material from elsewhere in the repository or from another source, copy it, summarize it, or excerpt it into files inside the skill's own references/ directory, then link to those local files from SKILL.md.
.stencila/, or use the repository root if none exists<closest-workspace>/.stencila/skills/<name>/SKILL.md file with frontmatter and instructions — include activation keywords in the description so agents can match the skill to user requestskeywords to the frontmatter to improve discoverability and delegation accuracy — include terms reflecting likely user intents, artifacts, and domainsTODO before considering the skill completereferences/ and put that material there rather than referring to files elsewhere in the reposcripts/, references/, or assets/ subdirectories if the skill needs themstencila skills validate <name>, the skill directory path, or the SKILL.md pathWhen working from a nested directory in a repository, create the skill in the closest workspace's .stencila/skills/ directory rather than creating a new .stencila/ tree under the current subdirectory.
Skill names must be lowercase kebab-case:
a-z, 0-9, -)--)^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$By convention, names follow a thing-activity pattern describing the domain and action (e.g., code-review, data-analysis, test-generation).
Common corrections: reviewCode → code-review, data_analysis → data-analysis, Test-Gen → test-gen.
The file has two parts:
--- delimitersname — the skill name (must match directory name)description — what the skill does and when to use it (max 1,024 characters). Include specific keywords that help agents decide whether to activate the skill.license — SPDX identifier or reference to a license filecompatibility — environment requirements (max 500 characters)allowed-tools — space-delimited or comma-delimited list of pre-approved tools (e.g., read_file grep shell or read_file, grep, shell, ask_user).keywords — (Stencila extension) list of keywords or tags for discovery and routing. Use terms that reflect likely user intents, artifacts, and domains. Helps managers and selection systems find and rank this skill. Include both positive signals (what this skill does) and negative signals (what it doesn't do) as keywords.metadata — arbitrary key-value pairs (e.g., author, version)Use this as a starting point:
---
name: <skill-name>
description: <Clear description including keywords that help agents match this skill to user requests. Do not leave placeholders such as TODO. Max 1,024 characters.>
keywords:
- <keyword1>
- <keyword2>
# license: MIT
# allowed-tools: read_file grep shell
# metadata:
# author: <name>
# version: 0.1.0
---
## Steps
1. <First step>
2. <Second step>
3. <Third step>
## Examples
Input: <describe expected input>
Output: <describe expected output>
## Edge Cases
- <Common pitfall and how to handle it>
Each skill gets its own subdirectory. Only SKILL.md is required:
.stencila/skills/
<skill-name>/
SKILL.md # Required — frontmatter + instructions
scripts/ # Optional — executable code
references/ # Optional — additional documentation
assets/ # Optional — static resources
Use scripts/ for executable code, references/ for detailed docs loaded on demand, and assets/ for templates and data files. Reference them from SKILL.md using relative paths.
Do not point SKILL.md at repository documentation, specifications, or other files outside the skill directory. When outside material is necessary, prefer adding a concise summary or excerpt under references/ instead of copying a large document verbatim. Keep individual reference files focused so agents can load only the minimum context needed.
allowed-toolsOnly include tools the skill genuinely needs; prefer the minimal set.
| Tool | Use for | Include when |
| -------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------- |
| read_file | Read existing files | The skill needs to inspect repository or workspace content |
| write_file | Create new files or overwrite whole files | The skill creates files from scratch |
| apply_patch, edit_file | Modify existing files in place | The skill updates existing files; some models prefer one or the other |
| grep | Search file contents | The skill needs to find patterns, symbols, or references |
| glob | Find files by pattern | The skill needs to discover files or directories |
| web_fetch | Fetch and save web content locally | The skill needs to retrieve web pages or external documentation for review or summarization |
| shell | Run commands | The skill needs validation, formatting, tests, or other command-line checks |
| ask_user | Request clarification, confirmation, or approval | The skill may need user feedback before proceeding |
references/ filesreferences/TODOdescription under 1,024 characters and compatibility under 500 charactersSkills must describe generic domain competence with generic inputs and outputs. They should work equally well when invoked by a user in a chat, by an agent acting alone, or by a workflow stage prompt. Workflow-specific concerns — context keys, route labels, workflow_* tool calls — belong in the workflow's stage prompts, not in skills.
Follow these rules:
workflow_get_context, workflow_set_context, workflow_set_route, or workflow_get_output in any skill. These are workflow orchestration tools. If a skill needs input data, declare it in a "Required Inputs" table and let the caller (user, agent prompt, or workflow stage prompt) supply it.RunTestsRed, CheckRemaining) or specific workflow files. Skills should not know which workflow is calling them..stencila/plans/) when an input is missing, frame this as a convenience for standalone use: "attempt to infer from X as a standalone convenience. In workflow use, the stage prompt should provide this explicitly."The workflow's stage prompts are the glue layer. A well-structured stage prompt follows this pattern:
workflow_get_context / workflow_get_output callsworkflow_set_context with the workflow's chosen key namesworkflow_set_route with the workflow's chosen labels, mapped from the skill's domain outputsThis separation means skills stay reusable across workflows, agents can use skills without workflow infrastructure, and the workflow is the single source of truth for its own data contract.
.stencila/ directories exist in the ancestor chain, use the nearest one. Do not create a duplicate .stencila/skills/ tree.TODO, <placeholder>, or empty sections remain in the final SKILL.md.references/ and update SKILL.md to point only to those local copies, summaries, or excerpts.Before finishing, validate the skill:
# By skill name
stencila skills validate <skill-name>
# By directory path
stencila skills validate .stencila/skills/<skill-name>
# By SKILL.md path
stencila skills validate .stencila/skills/<skill-name>/SKILL.md
Validation should pass before you report the skill as complete.
documentation
An agent skill providing instructions for AI agents.
testing
Critically review a Stencila workflow and suggest improvements. Use when asked to review, audit, critique, evaluate, or improve a workflow directory or WORKFLOW.md file. Covers frontmatter validation, DOT pipeline quality, workflow structure, agent selection quality, discovery metadata, ephemeral workflow conventions, workflow composition, and adherence to Stencila workflow patterns.
development
Create a new Stencila workflow. Use when asked to create, write, scaffold, or set up a workflow directory or WORKFLOW.md file. Covers workflow discovery, duplicate-name checks, ephemeral workflows, WORKFLOW.md frontmatter, DOT pipeline authoring, goals, agents, branching, composition, and validation.
development
Critically review an existing or proposed Stencila theme artifact for correctness, token usage, target coverage, cross-target portability, dark-mode handling, maintainability, and approval readiness. Use when asked to review, critique, assess, audit, or validate a theme.css file, theme patch, theme plan, site theme, document theme, plot theme, print or PDF theme, check design tokens, assess DOCX or email behavior, review dark mode support, or validate with stencila themes validate.