Skip to content

feat: agent skill for zero-install publishing - #9

Open
FNDEVVE wants to merge 2 commits into
plannotator:mainfrom
FNDEVVE:agent-skill
Open

feat: agent skill for zero-install publishing#9
FNDEVVE wants to merge 2 commits into
plannotator:mainfrom
FNDEVVE:agent-skill

Conversation

@FNDEVVE

@FNDEVVE FNDEVVE commented Sep 4, 2026

Copy link
Copy Markdown

Closes #2.

What

Agents get a third consumption path beside npm i -g @plannotator/tot and the raw API doc: a drop-in agent skill (skills/tot/) that works with zero install.

  • skills/tot/SKILL.md — model-invoked skill (Agent Skills format: name + trigger-carrying description). Core model (raw serving, living vs frozen URLs, open pages, 1.5 MB limit), a CLI-or-curl route (command -v tot), and the markdown publish flow ending on the checkpoint gate: poll the read endpoint until version is non-null, then report living + frozen URLs.
  • skills/tot/references/html-assets.md — the workspace-first flow for HTML with local refs: scan rules (which attributes count, what to skip), assets-before-document ordering, asset URL shape, update flow.
  • skills/tot/references/api.md — full endpoint reference with exact response shapes, including two details site/agents.md omits: POST /v1/workspaces nests under .workspace, and POST /v1/workspaces/{ws}/documents returns the bare document (asymmetric with POST /v1/documents).
  • README — new "For AI agents" section: copy skills/tot into .claude/skills/, .cursor/skills/, ~/.agents/skills/, …; skill prefers tot when installed and falls back to curl otherwise.
  • docs/REPO_LAYOUT.md — records the new directory.

Why

Issue #2 ("Agent skills and instructions vs npm led install"): agents were forced down the npm install, or handed a raw API page. The skill resolves the either/or: npm CLI when present, plain curl otherwise — identical capability, zero install.

Verification

  • Every curl flow in the skill was run live against https://api.tot.page, end to end: markdown publish → 201; checkpoint poll → version non-null; living URL serves text/markdown; charset=utf-8; PUT raw-body update → new version + file_url, living URL moved; workspace-first HTML publish (workspace create → SVG asset PUT → document POST) → asset served image/svg+xml at tot.page/{slug}/{assetPath}, page served as text/html; DELETE204, living link 404. All test pages deleted afterwards.
  • Repo gates: pnpm lint / typecheck / format:check / test (41 passed) / build / verify:contract all green.

Skill prose is deliberately tight (state-of-the-art practice for agent-facing docs): leading words (living, frozen, checkpoint gate, open page), checkable completion criteria per step, progressive disclosure of branch-only material into references/, positive phrasing over prohibitions, and no restating of what the environment already answers.

Resolves plannotator#2.

Agents no longer need the npm-led install: a drop-in agent skill
(skills/tot) teaches the full publish/update/remove lifecycle via curl
against https://api.tot.page, and prefers the tot CLI when it is on
PATH (asset scanning, checkpoint polling, ~/.tot registry).

- SKILL.md: model-invoked skill, core model + CLI-or-curl route +
  markdown publish flow with the checkpoint gate
- references/html-assets.md: workspace-first asset flow and scan rules
- references/api.md: full endpoint reference, exact response shapes
- README 'For AI agents' section; REPO_LAYOUT records skills/

All curl flows verified live end-to-end against api.tot.page
(publish, checkpoint poll, living+frozen URLs, update, asset serve,
delete), test pages removed afterwards.
Match the effective-html install pattern instead of manual cp into a
skills directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create agent skills

1 participant