协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
skill-creator【开发与工程】Create, update, import, or validate Emperor Skills (SKILL.md folders with optional scripts, references, and assets). Use when the user wants a new Skill, wants to improve an existing one, or wants to install a Skill from a folder, a zip, or a GitHub link.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Guidance for creating effective Skills and managing them with the skill_manage tool.
A Skill is a self-contained folder that gives the agent specialized knowledge, a workflow, or tools for one kind of task. Think of it as an onboarding guide: it turns a general-purpose agent into one equipped with procedural knowledge no model has on its own.
Skills provide:
| Scope | Folder | Notes |
|---|---|---|
| Personal | ~/.emperor/skills/<name>/ | Available in every session |
| Project | <project>/.emperor/skills/<name>/ | Build sessions of that project only; overrides a personal Skill with the same name |
| Built-in / Plugin | shipped with Emperor or a Plugin | Read-only |
Create, update, delete, and import Skills only with skill_manage. These folders are outside the writable workspace, so file and shell tools cannot write them; skill_manage asks the user for approval unless the session runs with full access. To change a built-in or Plugin Skill, create a personal Skill with the same name; it takes precedence.
skill-name/
├── SKILL.md (required: YAML frontmatter + Markdown instructions)
├── scripts/ (optional: executable code)
├── references/ (optional: documents loaded into context when needed)
└── assets/ (optional: files used in the output, e.g. templates)
name and description. They are the only fields the agent sees before the Skill is loaded, so the description must say what the Skill does and when to use it.Rules Emperor enforces:
name: lowercase letters, digits, ., _, -; starts with a letter or digit; at most 64 characters. The frontmatter name is the Skill's name; keep the folder name identical.description: required; keep it under 1024 characters.references/api.md). Missing referenced files are reported as warnings.node_modules, .venv, venv, .git, and __pycache__ are ignored and are not copied on import.{{skill_dir}} for absolute paths to bundled files; Emperor expands it when the Skill is loaded.scripts/rotate_pdf.py). Test every script you add by running it.grep or glob patterns find the relevant part.Do not add README, CHANGELOG, installation guides, or other auxiliary documentation. A Skill contains only what an agent needs to do the job.
The context window is shared with the system prompt, the conversation, and every other Skill's description. Assume the agent is already capable; add only what it would not know. Prefer short examples over long explanations.
When a Skill covers several variants (frameworks, providers, domains), keep the selection logic in SKILL.md and move each variant's details into its own reference file, linked directly from SKILL.md. Keep references one level deep, and add a table of contents to reference files longer than about 100 lines.
Ask the user for examples of requests that should trigger the Skill and what a good result looks like. Ask a few questions at a time. Skip this step only when the usage is already clear.
For each example, work out what you would otherwise rewrite or rediscover every time: a script, a reference document, or an asset. That list becomes the Skill's resources.
Name it with a short, verb-led, hyphen-case name (for example "Plan Mode" → plan-mode). Then create it with one call, passing the full SKILL.md and any resource files:
{
"action": "create",
"scope": "user",
"content": "---\nname: pdf-rotate\ndescription: Rotate, split, and merge PDF files. Use when the user asks to change page order or orientation of a PDF.\n---\n\n# PDF Rotate\n\nRun `scripts/rotate.py <file> <degrees>` ...\n",
"files": {
"scripts/rotate.py": "import sys\n..."
}
}
Use "scope": "project" in a Build session when the Skill belongs to that project only.
Writing guidelines:
metadata only when needed, for example metadata: { emperor: { requires: { bins: [git] } } } to declare required tools.{ "action": "validate", "name": "pdf-rotate" }
Fix every reported error. Warnings (for example a missing referenced file) mean something is probably wrong; check them too. validate also accepts content to check SKILL.md text before writing it.
Use the Skill on real tasks, note where the agent struggled, and update it:
{
"action": "update",
"name": "pdf-rotate",
"content": "<full new SKILL.md>",
"files": { "scripts/rotate.py": "..." }
}
update replaces SKILL.md and writes the given files; files you do not pass are kept. Use { "action": "delete", "name": "..." } to remove a Skill.
skill_manage with action: "import" installs Skills from:
{ "kind": "folder", "path": "/abs/path" }{ "kind": "zip", "path": "/abs/path/skill.zip" }{ "kind": "url", "url": "https://github.com/<owner>/<repo>/tree/<branch>/<folder>" } or a direct .zip link{ "kind": "content", "content": "---\nname: ..." }Every folder containing a SKILL.md is imported under its frontmatter name. An existing Skill with the same name is kept unless "overwrite": true is passed. Review imported scripts before running them.
{ "action": "list" } shows the Skills available in the current session with their source, and any invalid Skills with the reason they were rejected.