Skip to content

Coding agents ​

CraftTS has a deliberate vocabulary. After you import @craft-ts/core, give the agent three layered entry points — llms.txt, the MCP server, and Agent Skills — so it can use the documented primitives and conventions.

LayerWhat it isWhen the agent uses it
LLM files/llms.txt, /llms-full.txt, and a .md sibling for every docs pageDiscovery on the internet, no install
MCP server@craft-ts/mcp — get_best_practices, search_documentation, find_examples, skillsLive lookup in Cursor, Claude Code, VS Code, Copilot
Agent Skillsskills/ inside @craft-ts/mcp, plus an Agent Plugin manifestMulti-step workflows (architecture tests, routes, spec → primitives, migration)
Live page MCPLocal @craft-ts/function-registry-mcp tool page — fill, click, and inspect the development tab already openDev only, on the running app. Not shipped in @craft-ts/mcp. See Live page MCP

Do not scrape the HTML docs. Start from llms.txt or the MCP tools.

1. LLM files ​

These follow the llms.txt spec and are generated from this VitePress site at build time.

Paste this into an AGENTS.md (or CLAUDE.md) at the root of the app that imports Craft:

md
# CraftTS

This application uses `@craft-ts/core`.

- Docs index: https://craft-ts.github.io/craft/llms.txt
- MCP: `npx -y @craft-ts/mcp@beta` (`get_best_practices`, `search_documentation`)
- Skills: `node_modules/@craft-ts/mcp/skills`

yield* every Craft reader. Keep authored code within Craft's primitives and
service model. craftRoutes files need componentDeps and
a per-file DI check. The architecture/ suite is the graph contract: scaffold
at bootstrap, run it during a feature. Do not add an architecture rule for
the feature.

The same snippet is returned by the MCP tool get_best_practices (field agentsMd) and lives in the package as content/agents.md.

2. MCP server ​

bash
npm install -D @craft-ts/mcp@beta

Add a project .mcp.json (Cursor, Claude Code, and VS Code all understand it):

json
{
  "mcpServers": {
    "craft-ts": {
      "command": "npx",
      "args": ["-y", "@craft-ts/mcp@beta"]
    }
  }
}

Claude Code, from the app directory:

shell
claude mcp add craft-ts -- npx -y @craft-ts/mcp@beta

Tools ​

ToolUse it to
get_best_practicesLoad the coding-agent guide and the AGENTS.md snippet
search_documentationFind a Guide / Learn / Reference page by API or task
get_documentation_pageRead one page as markdown (/guide/state/local-state)
find_examplesFind Learn + demo examples
list_skills / get_skillLoad a workflow skill and its references/*.md
get_llms_txtGet the public llms.txt URLs and the bundled path index

The server is read-only. It searches documentation bundled at publish time, so it works offline. It is not the runtime registry MCP used to mutate a live demo tab, and it does not expose the page tool. Driving the open development tab is Live page MCP (dev only, function-registry MCP).

3. Agent Skills ​

Skills follow the Agent Skills layout (SKILL.md + optional references/). The package is also an Agent Plugin (plugin.json + mcp.json + skills/).

SkillTrigger
craft-tsAny authored Craft code
craft-ts-architecture-testsScaffold or run architecture/, or freeze a graph smell
translate-spec-to-craft-tsSpec / CRUD / filters / forms → primitives
craft-ts-routescraftRoutes, componentDeps, TS2589
craft-ts-service-migrationlegacy services → craftService
migrate-to-craft-tscraft-migrate then manual diagnostics

The architecture suite is the app's graph contract (unique HTTP, unique identities, armed route DI proofs, folder lanes). Scaffold it at app start or at the end of craft-migrate. During a feature, run the suite that already exists. Do not add an architecture rule for the feature. Add a new it() only when a bad pattern is spotted, so it cannot recur. If architecture/ is missing mid-feature, offer the scaffold; do not impose it.

Point the agent at node_modules/@craft-ts/mcp/skills, or let it call get_skill. Cursor can also install a skill from that folder.

Verify the agent can see Craft ​

Ask it to add a state counter, a paged query, or a craftRoutes file. It should yield* readers, compose insertions with craftPipe, and put a DI check in the routes file. If the app already has architecture/, it should run that suite rather than invent a new rule. If it emits legacy runtime APIs or a plain routes array, the MCP server or AGENTS.md snippet is not in context.

See also ​