Skills
Skill is the smallest reusable unit that teaches an Agent a new capability. A skill package (Skill Package) exists as a directory artifact and works in two ways (or both): instruction-based (a
SKILL.mdguiding the Agent to use existing tools in new ways) and MCP-based (bundling an MCP server script that provides the Agent with brand-new tools). This page explains both forms, the manifest, directory structure, and building rules. ← Back to Assets · 中文原版
1. Two Skill Forms
| Form | Mechanism | When to use |
|---|---|---|
| Instruction-based | SKILL.md carries instructions injected into the Agent’s context, guiding it to do new things with existing tools | Most skills (how to do work with it, not new tools) |
| MCP-based | A bundled MCP server (script) provides tools the Agent didn’t have | When new tools are needed — external API access, browser automation, hardware control |
Decision: start with instruction-based; switch to MCP-based only when you must provide tools that don’t exist in the system yet (external API / browser automation / hardware).
2. Directory Structure (Artifact Directory)
~/.markus/builder-artifacts/skills/{skill-name}/ ← {name} must be a valid slug
├── skill.json # main config (manifest; write with file_write)
├── SKILL.md # instruction doc (REQUIRED, entry point)
├── README.md # human-readable doc (optional)
├── images/
│ └── icon.png # skill icon (optional)
└── ... # any other files: scripts / MCP servers / config / templates
Only ~/.markus/builder-artifacts/skills/ is recognized. After installation the entire directory (all files) is deployed to ~/.markus/skills/{skill-name}/. On activation, SKILL.md is loaded into context; a manifest declaring mcpServers starts/stops the servers and registers their tools.
3. Two-Step Workflow
Manifest first, then the instruction doc. Never inline file content into JSON.
file_writeskill.json(manifest, see §4).file_writeSKILL.md(instruction doc with YAML frontmatter, see §5), then README / images / other files.
4. Manifest (skill.json)
{
"type": "skill",
"name": "skill-name-kebab-case",
"displayName": "Skill Name",
"version": "1.0.0",
"description": "When and why an agent should use this skill",
"author": "",
"icon": "images/icon.png",
"category": "custom", // user-defined skills are usually "custom"
"tags": ["tag1", "tag2"],
"skill": {
"skillFile": "SKILL.md",
"requiredPermissions": ["shell", "file", "network", "browser"],
"mcpServers": { // MCP-based only
"my-api": { "command": "node", "args": ["${SKILL_DIR}/server.mjs"] }
},
"alwaysOn": false
}
}
Key skill Fields
| Field | Description |
|---|---|
skillFile | Always "SKILL.md" — the entry instruction doc |
requiredPermissions | Permission array: shell / file / network / browser (optional) |
mcpServers | MCP server name → config {command, args?, env?}. Use ${SKILL_DIR} in args/env to reference the skill directory |
alwaysOn | If true, appears as a base skill in every Agent’s discoverable directory. Does not auto-inject full instructions — the Agent still activates it via discover_tools (progressive disclosure). Default false |
namerules are the same as before: English kebab-case slug. Thenameinskill.jsonand in theSKILL.mdfrontmatter must match exactly, otherwise write/save is rejected.
5. The SKILL.md Instruction Document
SKILL.md must have YAML frontmatter (name + description, matching the manifest) plus a detailed Markdown body:
- Overview: what the skill does.
- Step-by-step instructions: reference real tools (
shell_execute/file_read/file_write/grep_search/web_fetch/web_search/ …) or MCP tool names (if MCP-based). - Error handling: what to do when a command fails or a page fails to load.
- Typical input/output examples.
Skills must be self-contained — an Agent reading the instructions should know exactly what to do. Provide concrete CLI commands, file paths, and URL patterns. Consider composability (composing with other skills).
6. MCP-Based Skill Essentials
A bundled MCP server communicates via JSON-RPC 2.0 over stdio (stdin/stdout) and must implement initialize, tools/list, tools/call:
${SKILL_DIR}resolves to the skill’s actual directory at load time — use it in args/env to reference bundled scripts.commandcan be any executable (node/python3/npx/ …).- Tools exposed by an MCP server are automatically prefixed with the server name (e.g.
my-api__tool_name) — write these prefixed names in SKILL.md. - Community-published MCP servers can also be used:
"command": "npx", "args": ["-y", "some-mcp-server@latest"]. - When writing an MCP server script, prefer Node built-in modules only (zero npm dependencies, best portability), or reference
npx-published packages.
7. Loading & Progressive Disclosure (discover_tools)
Skill capabilities don’t sit in resident context — progressive disclosure:
- On cold start, an Agent only sees a skill’s L0 directory entry (name + short description).
- The full SKILL.md and deferred tool schemas enter context only after activation via
discover_tools({ name: ["<skill>"] }). - Injecting the full SKILL.md into the system prompt at spawn time is not allowed.
- Skill license/impact: low-impact skills can be installed directly; high-impact / undeclared-impact skill installs require human HITL approval.
8. Bidirectional Skill Ecosystem Compatibility (SKILL.md Adapter)
Markus ships a skill ecosystem adapter (markus skill import/export):
| Ecosystem format | ID | Detection signature |
|---|---|---|
| Claude Code / skills.sh | claude | Directory contains SKILL.md (with YAML frontmatter) — the dominant form among 80,000+ skills on skills.sh |
| SkillHub / ClawHub | skillhub | SKILL.md or skills/ subdirectory, clawhub.json |
| OpenClaw | openclaw | config.json5 / AGENTS.md / agents/ |
| OpenClaw SOUL | soul | Directory contains SOUL.md (soul package — personality + instructions) |
| AgentScope | agentscope | @tool-decorated .py + README.md (approximate adaptation) |
| Generic MCP server | mcp-server | mcp.json / .mcp.json (containing mcpServers) |
markus skill list # list installed skills
markus skill import ~/Downloads/clawhub-skill.zip # import an external skill (auto-normalized)
markus skill export my-skill --format claude # export to an external ecosystem
markus skill formats # view supported formats
Agents can also import a local skill package in-conversation via discover_tools({ mode: "import", path: … }) — registered and activated immediately. Import only copies files + normalizes metadata; it does not execute remote code — evaluate the trust boundary yourself before running external skill scripts.
9. Visual Assets
A skill icon is an abstract representation of a capability (like an app icon / tool symbol), not a portrait — a skill is a tool, not a team member.
| Property | Value |
|---|---|
| Location | images/icon.png, in the images/ subdirectory |
| Style | flat vector / geometric / minimal (not photographic, not a portrait) |
| Resolution | 512×512 |
| Size | ≤30KB |
| Subject | Abstract concept matching the skill’s function (git→branch, browser→window/globe, API→plug) |
Example prompt:
Clean icon design for a git changelog tool, stylized git branch merging into a document, flat vector style, teal and white palette, square format, modern minimal. Don’t use stock photos / abstract color blobs / terminal screenshots.
10. Build Rules Quick Reference
namemust be a valid English kebab-case slug; thenameinskill.jsonmust exactly match theSKILL.mdfrontmatter.SKILL.mdmust have YAML frontmatter (name+description) and real instructions/examples — empty content is as good as nothing.- Don’t invent skill IDs; don’t write skill directories to
~/.markus/shared/or the working directory. - Skill icons are abstract badges (≤30KB PNG), not portraits.
11. Next Steps
- How to use skills to connect external systems (MCP / IM platforms) → Connectors.
- Search / download / install skills from the Hub → Markus Hub.