How prompt skills work
The lifecycle of a prompt skill is straightforward:- You create a SKILL.md file with a frontmatter header and an instruction body
- Comis discovers it from your skills directory on startup (or via file watching)
- Users invoke it with
/skill:namein chat, or the agent picks it up automatically when relevant - Instructions are injected into the agent’s context for that conversation turn
Creating your first prompt skill
Create the skill file
Create a file called The directory name does not matter — Comis uses the
SKILL.md in a new directory under your skills path:name field inside the
file to identify the skill.Add the frontmatter
Open the file and add a YAML frontmatter block at the top:Only two fields are required:
name— A lowercase identifier using letters, numbers, and hyphens (1-64 characters). This is what users type after/skill:.description— A short explanation of what the skill does (up to 1024 characters). The agent uses this to decide when to apply the skill automatically.
Write the instructions
Below the frontmatter, write your instructions in plain Markdown:You can use any Markdown formatting — headings, lists, bold, code blocks.
The agent receives the entire body as part of its context.
Template variables
Skill bodies support template substitution, so you can create reusable skills that accept different inputs each time they are invoked.Named placeholders
Use curly braces to define named placeholders. They are mapped by position when invoking the skill:Positional placeholders
You can also use numbered positions directly:$1,$2,$3— Individual arguments (1-indexed)$@or$ARGUMENTS— All arguments as a single string${@:2}— All arguments from position 2 onwards
Skill discovery
Comis finds skills by scanning directories on startup and (optionally) watching for file changes.Where Comis looks
- Default path:
./skills(configurable via thediscoveryPathssetting in your config). For named agents, Comis automatically prepends the agent’s workspace skills directory (~/.comis/workspace-{agentId}/skills/) at startup. - Root
.mdfiles in the skills directory (e.g.,skills/my-skill.md) SKILL.mdfiles in subdirectories (searched recursively, e.g.,skills/greeting/SKILL.md)
Source categories
Each discovered skill is tagged with a source category derived from its position in the resolveddiscoveryPaths list:
| Category | When assigned | Typical location |
|---|---|---|
| bundled | First entry in discoveryPaths (highest priority) | The agent’s workspace skills directory, prepended automatically (~/.comis/workspace-{agentId}/skills/, or ~/.comis/workspace/skills/ for the default agent) |
| workspace | Any middle entry (when there are 3+ paths) | Custom discovery paths added in your config |
| local | Last entry (when there are 2+ paths) | The configured ./skills path (resolves to ~/.comis/skills/ by default) |
discoveryPaths at startup, it takes precedence over ~/.comis/skills/ and any other discovery path.
The “shared” pool at
~/.comis/skills/ is not a built-in concept — it exists because the default discoveryPaths is ["./skills"], and ./skills resolves against ~/.comis. Replacing discoveryPaths removes that pool unless you add it back explicitly.File watching
By default, Comis watches your skill directories for changes. When you save a SKILL.md file, the skill reloads automatically within a few hundred milliseconds. You can disable this with thewatchEnabled config setting.
Per-agent skill discovery
When you configure multiple agents, each named agent automatically gets its own skills directory inside its workspace folder. You do not need to set this up manually — Comis creates it at startup. For example, an agent namedresearcher looks for skills in:
~/.comis/workspace-researcher/skills/(agent workspace — private to this agent)~/.comis/skills/(shared — visible to all agents)- Any paths listed in
discoveryPathsin the agent’s config
routing.defaultAgentId) uses ~/.comis/workspace/skills/
as its workspace directory instead of a named one.
Skill scoping
Skill mutations (upload, import, delete) use a scope parameter that controls where the skill is written:"local"(default) — writes to the calling agent’s workspace skills directory"shared"— writes to the shared skills directory (~/.comis/skills/), making the skill visible to all agents
coordinator agent sees skills from ~/.comis/workspace/skills/
(as the default agent) plus ~/.comis/skills/. The researcher agent sees skills from
~/.comis/workspace-researcher/skills/ plus ~/.comis/skills/. Neither agent sees the
other’s workspace skills.
Skills shipped with Comis
Comis comes with seven prompt skills out of the box, in the/skills/
directory at the repo root. They double as working reference manifests —
copy any of them as a starting point for your own skill. Each declares the
external prerequisites it needs via comis.requires, so the loader skips
them gracefully when those bins or env vars are missing.
| Skill | What it does | Requires |
|---|---|---|
chart-visualization | Generate 26 chart types (bar, line, pie, sankey, treemap, mind maps…) via a bundled Node script | bins: [node] |
deep-research | Multi-phase web research methodology — broad exploration, deep dive, source validation | None (uses web_search + web_fetch) |
find-skills | Discover and install skills from the open skills.sh ecosystem | bins: [git] |
image-generation | Image generation via Gemini (structured prompts, optional reference images, aspect-ratio control) | bins: [python3], env: [GEMINI_API_KEY] |
log-troubleshooting | Parse and summarise NDJSON daemon logs from ~/.comis/logs/ | bins: [python3] |
podcast-generation | Two-host conversational podcast audio via VolcEngine TTS | bins: [python3], env: [VOLCENGINE_TTS_APPID, VOLCENGINE_TTS_ACCESS_TOKEN] |
video-generation | Video generation via Gemini Video API | bins: [python3], env: [GEMINI_API_KEY] |
Advanced options
Once you are comfortable with the basics, these options give you more control:-
Tool restrictions: Use
allowedToolsin the frontmatter to limit which tools the agent can use while this skill is active. For example, a research skill might only allowweb_searchandweb_fetch. See Manifest Reference for the full field list. -
Input validation: Use
inputSchemato define a JSON Schema that validates arguments before the skill runs. Invalid input is rejected with a clear error message. See Manifest Reference for details. -
Dynamic context: Enable the
promptSkills.enableDynamicContextconfig option to allow shell commands embedded in skill bodies. This lets skills pull in live data (like git status or system info) at invocation time. -
Auto-injection: Skills can be automatically injected into conversations without explicit invocation. The agent selects relevant skills based on their descriptions. You can control how many are injected per request with the
maxAutoInjectconfig setting (default: 3). -
Model invocation control: Set
disableModelInvocation: truein the frontmatter to hide a skill from the agent’s automatic selection. The skill can still be invoked explicitly with/skill:name.
Related
Manifest Reference
All SKILL.md frontmatter fields explained
Security Scanning
What gets scanned and blocked in skill files
Examples
Complete skill walkthroughs you can follow step by step
