Skill System
User-defined slash commands stored as .skill files — create reusable agent workflows, auto-inject context by file pattern, and share them across your team.
Overview
Skills are custom slash commands you define once and reuse across every session. They live as .skill files in .misar/skills/ and are loaded automatically when the extension activates.
.misar/
└── skills/
├── review-migration.skill
├── add-component.skill
└── deploy-staging.skill
Skill File Format
Each .skill file has a YAML frontmatter block followed by a Markdown body. The body becomes the agent's instruction when the skill is invoked.
---
name: review-migration
description: Review a database migration file for safety and reversibility
trigger: /review-migration
permission_mode: default
priority: 10
path_patterns:
- "supabase/migrations/**/*.sql"
- "db/migrate/**/*.rb"
bash_patterns:
- "supabase db push*"
- "rails db:migrate*"
---
Review the provided database migration for:
1. **Safety** — will this migration succeed on a non-empty table?
2. **Reversibility** — is there a corresponding down migration?
3. **Index coverage** — are foreign keys and frequently-queried columns indexed?
4. **Data loss risk** — does any column drop or type change risk losing data?
Summarise findings and suggest fixes before the migration is applied.
Frontmatter Fields
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| name | string | Yes | Unique identifier for the skill |
| description | string | Yes | Shown in the / command picker |
| trigger | string | Yes | Slash command that invokes the skill (e.g. /my-skill) |
| permission_mode | string | No | Override permission level: default, strict, or unrestricted |
| priority | number | No | Injection order when multiple skills match (lower = first) |
| path_patterns | string[] | No | Glob patterns — skill auto-injects when agent reads a matching file |
| bash_patterns | string[] | No | Shell glob patterns — skill auto-injects when agent runs a matching command |
Invoking a Skill
Type the trigger in the chat input to invoke a skill directly:
/review-migration supabase/migrations/20260310_add_users.sql
The skill body is prepended to the agent's instruction as additional context, then your message text follows.
Skills with path_patterns or bash_patterns inject themselves automatically — no slash command needed.
When the agent reads a file matching path_patterns, or executes a command matching bash_patterns, the skill body is silently added to the agent's context for that turn.
Each skill is injected once per session regardless of how many matching files are read.
Injection Budget
To keep context lean, the runtime enforces per-turn limits on auto-injected skills:
| Limit | Value | |-------|-------| | Max skills per hook event | 3 | | Max total skill content | 18 KB | | Injections per skill per session | 1 |
Skills are prioritised by the priority field (lower number = higher priority) when the budget would be exceeded.
Explicit slash-command invocations are not subject to the auto-injection budget — they always load regardless of how many skills have already been injected.
Creating Skills with /skill-creator
The built-in wizard generates a .skill file interactively:
Type /skill-creator in the chat panel.
Answer the agent's questions: skill name, description, trigger command, and what the skill should do.
Optionally specify file patterns or command patterns for auto-injection.
The agent writes .misar/skills/<name>.skill and the new command is immediately available.
Plugin Skills
Skills bundled with plugins live alongside the plugin code and are loaded from a separate path:
.misar/plugins/<plugin-name>/skills/*.skill
Plugin skills behave identically to user skills and share the same injection budget. They cannot override a user skill with the same trigger value — user skills always take precedence.
Examples
Code Review Checklist
Auto-inject a team review checklist whenever the agent reads a pull request diff or opens a file flagged for review.
Component Generator
A /add-component skill that prompts the agent to scaffold a new UI component following your project's conventions.
Security Audit
Auto-inject OWASP reminders whenever the agent edits authentication, session, or input-handling files.
Deployment Runbook
A /deploy skill that walks through pre-flight checks, build steps, and smoke tests before any deployment command.
Commit .misar/skills/ to your repository so the whole team shares the same custom commands automatically.