Aartiq Skills
Aartiq has two skill mechanisms — on-demand Markdown prompt skills and a capability catalog — plus a separate agent API that exposes tools over MCP and HTTP. Every claim below cites the source file and line.
What a 'skill' is
In Aartiq, 'skills' refer to two distinct but related mechanisms. Both are documented here so the terminology is unambiguous.
Markdown prompt skills
A skill is a Markdown file in public/skills/<name>.md that holds instructions the AI loads on demand. SkillLoader is a singleton that reads built-in files (app bundle), a userData override, and falls back to inline instructions for some formats (e.g. pdf, docx) when no file is present. It strips YAML-ish frontmatter and 'Aartiq runtime note' blocks and caches the result.
src/lib/SkillLoader.ts:9-140Capability catalog (SkillRegistry)
A skill is also a metadata descriptor — id, label, description, icon, and a regex 'patterns' field — used for on-demand matching so the system prompt is not bloated with every skill's content on every request. matchSkills tests each skill's patterns against the user's message and always injects 'security' for credential terms and 'automation' for shell terms.
src/lib/SkillRegistry.ts:1-64Built-in skill catalog
The catalog is defined in SkillRegistry.ts. These are the skills the model can discover and load; the Markdown bodies live in public/skills/.
| Skill id | What it is for |
|---|---|
| research | Web research / deep reading |
| analysis | Data and content analysis |
| finance | Financial documents and calculations |
| documents | Document generation and editing |
| browsing | Page navigation and interaction |
| automation | Shell / scheduling / workflow automation (always injected for shell terms) |
| mcp | Model Context Protocol tool use |
| apple-intelligence | macOS Apple Intelligence features |
| tab-intelligence | Reasoning over open tabs |
| image-generation | Image creation |
| scheduling | Background task scheduling |
| security | Credential / safe-handling guidance (always injected for credential terms) |
| settings | App configuration help |
| xlsx / pptx / pdf / docx | Spreadsheet / slide / PDF / Word generation |
src/lib/SkillRegistry.ts:15-29public/skills/ (research.md, analysis.md, finance.md, documents.md, browsing.md, automation.md, mcp.md, apple-intelligence.md, tab-intelligence.md, image-generation.md, scheduling.md, security.md, settings.md, xlsx.md, pptx.md, pdf.md, docx.md)How skills are loaded at runtime
The chat interface parses user requests like 'load/use/activate <skill>', picks matching skills via matchSkills, and fetches their Markdown via window.electronAPI.loadSkill(skillId), which routes to SkillLoader.load. Loaded skill ids are shown to the user in a collapsible 'N skills loaded' chip (CollapsibleSkillMessage).
User trigger
AIChatSidebar parses 'load/use/activate <skill>' and resolves via matchSkills.
src/components/AIChatSidebar.tsx:91,1686-1712UI display
CollapsibleSkillMessage renders loaded skill ids as chips; returns null when none are loaded.
src/components/ai/CollapsibleSkillMessage.tsx:4-68Agent API: MCP + HTTP tools
Separate from prompt skills, the agent API exposes executable tools over two transports from one codebase. This is what external agents / MCP clients use to drive Aartiq.
ToolRegistry (security pipeline)
Every tool call runs a fail-closed pipeline: verb gate -> tab lock -> handler -> untrusted-output injection scan. A rejected gate returns an error result, never the action. Untrusted tool output is scanned for prompt-injection and quarantined if unsafe.
src/lib/agent-api/registry.ts:1-89Transports
HTTP: POST /api/<method> with an x-agent-id header (GET /health returns tool count). MCP: ListTools / CallTool over stdio via the MCP SDK. Both are started if enabled.
src/lib/agent-api/server.ts:1-126Providers
Model-agnostic config: LM Studio (http://127.0.0.1:1234/v1), Ollama (http://127.0.0.1:11434/v1), and OpenClaw (http://127.0.0.1:18789). The server binds to 127.0.0.1 by default (0.0.0.0 only if remote is enabled) with defaultTrust 'limited'.
src/lib/agent-api/providers.ts:19-80Tool surface
Tools are grouped into Security, Agents, Snapshots, Forms, Extensions, Theme, Navigation, Tabs, and System categories, registered via registerAllTools.
src/lib/agent-api/tools.ts:192-197Planning agents (note: not skill-driven)
The planner and agent registry are a separate agent-loop mechanism. The Planner breaks a goal into a structured Plan and re-plans every N steps; agent-registry tracks connected agents, their trust level, and tab locks. Neither imports SkillRegistry or SkillLoader — planning is orthogonal to the prompt-skill system.
Planner
planningInterval default 3, maxStepsPerPlan 10; completion scored on steps executed, answer length, and domain match (>=0.8 = high confidence).
src/lib/agent/planner.ts:3-142Agent registry
Agents connect with default trust 'limited'; authorize() denies actions the trust level cannot perform; lockTab reserves a tab.
src/lib/agent/agent-registry.ts:1-79Agent types
AgentRole = 'planner' | 'navigator'; AgentState = idle | planning | executing | evaluating | finished | error.
src/lib/agent/types.ts:1-9