Build with a coding agent

Give Claude Code, Cursor or another coding agent these docs as Markdown, and a skill that teaches it the library.

The other pages in this section are about an agent that uses the calendar in your app. This one is about the agent that writes your app. A coding agent trained before 2.0 doesn't know the 2.0 API, such as the agent bridge, and guesses at it. Three things give it the real API:

WhatWhereUse it when
A skillnpx skills add Moltenship/time --skill moltenship-timeThe agent supports Agent Skills
Docs in the packagenode_modules/@moltenship/calendar/docsThe agent can read files in your project
Docs on the site/llms.txt and a .md version of every pageThe agent can fetch a URL

Each is made from the same source as the pages you're reading.

Install the skill

npx skills add Moltenship/time --skill moltenship-time

The skills CLI puts the moltenship-time skill in the folder your agent reads skills from, such as .claude/skills for Claude Code. The agent loads it when a task involves the calendar. --skill names it because the repository also holds skills for its own maintenance.

The skill is a short guide and seven references the agent opens as it needs them:

ReferenceWhat it covers
SKILL.mdHow the library is put together, where to look first, and the rules that hold everywhere
compose.mdBuilding a calendar from the registry's views and the parts
state.mdControlled and uncontrolled state, change handlers, the store
changes.mdEvent changes, saving, policies, undo
agent-ready.mdThe bridge, permissions, deleting, WebMCP, a model on your server
testing.md@moltenship/calendar-testing: the environment, the harness, queries
mistakes.mdMistakes agents make with this library, and the fix for each
solid.mdSolidJS: the packages to install, a calendar, and the rules that differ from React

Since 2.0 the npm package ships the same skill, at node_modules/@moltenship/calendar/skills/moltenship-time. That copy matches the version you installed. Without the CLI, copy the folder into your agent's skills folder, or point the agent at it.

Docs in the package

@moltenship/calendar carries these docs as Markdown:

node_modules/@moltenship/calendar/docs/
  llms.txt              the index: every page, with one line on what it covers
  index.md              Introduction
  quick-start.md
  agents/connect.md
  api/components.md
  ...

They're written when the package is built, from the React pages of this site, so they describe the version in your node_modules and not the newest one. Links between pages are relative paths, and they work offline. A link to a page of the Solid docs is a link to this site.

A live example can't run in a Markdown file. Where a page has one, the Markdown has a line with the page's address, and the example's source stays as a code sample.

Docs on the site

AddressWhat it returns
/llms.txtThe index, in the llms.txt format
/llms-full.txtEvery page in one Markdown document
/docs/react/agents/connect.mdOne page as Markdown: add .md to any page's address
/docs/react.mdThe introduction to the React docs
/docs/solid.mdThe introduction to the Solid docs

The index lists the React docs and then the Solid docs. It groups each set's pages as the sidebar does and puts the ones an agent can skip under Optional. Start an agent there and let it fetch the pages it needs. /llms-full.txt is the whole site and is large; use it when the agent can't follow links.

The site describes the newest version. For an older one, read the docs in the package.

Tell your agent where to look

An agent reads your project's instruction file before it starts: AGENTS.md, or CLAUDE.md for Claude Code. A few lines there save it from guessing:

AGENTS.md
## Calendar

The calendar is Moltenship Time (`@moltenship/calendar`), a headless calendar built on ui-sdk.

- Its docs are in `node_modules/@moltenship/calendar/docs`. Read `llms.txt` there first, then the
  pages it lists. They match the installed version; don't rely on what you remember of the API.
- The views are source files in `src/components/calendar`, added with `shadcn add`. Edit them
  there. Don't look for them in `node_modules`.
- Dates and times are `Temporal` values, never `Date`.
- An event change is saved in `onEventChange`. The calendar doesn't store events.

Change the paths to your project's. The last three lines are the facts agents get wrong most often; the skill's mistakes.md has the rest.

Make the app agent-ready too

A coding agent that knows the library can also build the other half: a calendar that the agent in your product can use. Ask for it by name, with the pages that cover it:

Make the calendar agent-ready. Follow node_modules/@moltenship/calendar/docs/agents/connect.md:
create one bridge, name the calendar with `label`, and allow navigation and changes but ask the
person before a delete.

Then check what it built the way a person would, and with a test that runs an agent's steps through the bridge.

On this page