Extending
The skills a module ships to the assistant, the builder tools the chat uses, the owner-only routes, role metadata and the frontend hooks other modules can use.
Ship skills with your module
The assistant loads the skills that antelopeJs.skills declares in every loaded module, in the dependencies of those modules, and in the project's own dependencies, devDependencies included.
The skill file
Each skill is a folder under a declared skills directory, with a SKILL.md inside:
---
name: my-module
description: Explains when and how to use my-module. Use when the user mentions invoices, billing pages, or the InvoiceService.
icon: i-lucide-receipt
category: billing
tags: [invoices, billing, pages]
---
# my-module
When to use it, its key APIs and pages, and its gotchas. Link to the docs for the rest.
The catalog reads five frontmatter fields:
| Field | Required | Value |
|---|---|---|
name | Yes | The skill's name. The agent sees it as <module>:<name>. |
description | Yes | What makes the agent pick the skill. Name the cases that should trigger it. |
icon | No | The icon of the skill's card. |
category | No | The category of the skill's card. |
tags | No | An inline list, such as [invoices, billing]. |
The catalog skips a SKILL.md that has no frontmatter, no name or no description.
Under Claude Code, three skill features that act before the owner is asked are switched off, since each could hand the agent the project's .env values:
- Inline shell commands,
!followed by a command in backticks, do not run: the agent reads[shell command execution disabled by policy]in their place. hooksin the frontmatter do not run.- An
@reference to.envor a.env.*file, or to a link to one, is refused. The templates.env.example,.env.sampleand.env.templatestay readable.
Write what the skill needs into the file, or have the agent run a command as a tool call, which asks the owner first.
The declaration
antelopeJs.skills in package.json lists the skills directories, relative to the package. The package must also publish them in files:
{
"files": ["dist", "skills"],
"antelopeJs": {
"skills": ["./skills"]
}
}
When the skills load
The module collects the declared directories when the backend starts and passes them to the sidecar. A new or changed skill appears after a backend restart, in the agent.
Before the modules' directories, the assistant loads the DMS workflow skills of @antelopejs/agent-skills, such as dms-pages, dms-builder-mcp and dms-mockup, under the plugin name antelopejs. When two directories ship a skill with the same name, the agent loads the first one only. A module's own copy of a workflow skill therefore loses to the workflow skill.
The same declaration lets the antelopejs plugin from AntelopeJS/agent-skills sync your skills into a project's .claude/skills/ for Claude Code, or .agents/skills/ for Codex, outside the dashboard.
The chat uses the builder tools of the DMS
The chat reaches the builder through the dms MCP server of @antelopejs/dms, as mcp__dms__builder_catalog, mcp__dms__builder_add_block, mcp__dms__builder_create_page and the other builder_* tools. Where the chat's tools come from lists both servers. New chats start in Safe mode, unless the Safe mode setting is off, which makes Code mode the default.
The agent picks one skill for each generation mode:
| Skill | Shipped by | When the agent uses it |
|---|---|---|
dms-builder-mcp | @antelopejs/agent-skills | Safe mode. The agent changes pages only through the builder_* tools. |
dms-assistant-code-mode | This package | Code mode. The agent edits a page's code while the user watches the page. |
The workflow skills of @antelopejs/agent-skills also cover pages over an existing database (dms-external-database), pages that show data (dms-page-design) and mockups (dms-mockup, dms-mockup-build). This package ships dms-assistant beside dms-assistant-code-mode, for the module's own setup.
Owner-only routes
Every route below requires an owner. A route that relays to the sidecar answers 503 { message } while the sidecar is down. The usage routes answer empty figures instead, and the banner routes answer 204.
| Route | Purpose |
|---|---|
GET /ai/status, POST /ai/sidecar/restart | The live status (offline when the sidecar does not answer), and a restart |
GET /ai/status/banner | The banner of the Settings page: offline, a failed turn or requests waiting (204 when all is well) |
GET /ai/sidecar-info | Whether the sidecar runs, has given up or is disabled. Each call starts the sidecar again if it stopped. |
GET /ai/metrics/usage, usage/summary | The token figures of Settings |
GET /ai/activity, /ai/activity/:id, /ai/activity/export.csv | The audit log, one call, and the CSV export. from and to set the period. |
GET /ai/changes, /ai/changes/:id, /ai/changes/:id/undo-preview, /ai/changes/:id/undo-confirm | Change sets, a diff, what Undo restores, and the Undo dialog |
POST /ai/changes/:id/undo, /ai/changes/:id/redo | Undo ({ includeLater? }) and Redo |
GET /ai/settings, PUT /ai/settings | The settings form. PUT takes the one field an instant save sends. The Safe mode switch is the form field safeMode, stored as generationMode (safe or vibe). |
GET /ai/codex/account/banner, POST /ai/codex/callback, POST /ai/codex/logout | The ChatGPT account banner of Settings, the pasted return address of a remote sign-in, and the sign-out |
GET /ai/channel/events, POST /ai/channel/:connectionId/messages | The chat's event stream and the client's messages |
The sidecar calls /ai/logs and /ai/pages-registry with its own token in the x-dms-assistant-token header. They refuse any other caller. GET /ai/health needs no sign-in.
Roles
The Assistant pages are built from DMS blocks. A custom component is used only where no block draws the screen. Every page, block and child carries $dms_assistant.* metadata, so the role editor lists them with translated names.
Frontend
The chat panel, DmsAssistantChatPanel, is registered as a docked side panel of the dashboard with registerSidePanel, and renders once for the whole app. The command palette's assistant mode answers with DmsAssistantPaletteAnswer, registered with registerCommandPaletteAssistant.
Start a conversation from your module
Another module's layer can open the assistant on a new conversation without depending on dms-assistant. The plugin provides its actions under a global key. Inject them with a null default:
import { inject } from "vue";
interface AssistantActions {
readonly isAvailable: boolean;
startConversation(prompt: string, options?: { mode?: "plan" | "normal" }): void;
}
const assistant = inject<AssistantActions | null>(Symbol.for("dms-assistant:assistant-actions"), null);
nullmeans thatdms-assistantis not installed, or that the project does not run in development. Offer nothing.isAvailableis reactive. It isfalseuntil the assistant runs in this tab, and staysfalsefor a guest or with the sidecar disabled. Show a button only while it istrue.startConversation(prompt)opens the panel on a new conversation withpromptin the composer. It sends nothing. The person reads the prompt and presses Send.{ mode: "plan" }sets the conversation to plan mode first. The agent then ends its turn with a plan, which the person approves with Run with Ask first.