Files
multica/server/internal/agenttmpl/templates/html-slides.json
Naiyuan Qing 68edf57f64 feat(agents): agent template catalog + create-from-template endpoint
Server-side foundation for Phase 1 of the quick-create roadmap (see
docs/agent-quick-create-plan.md). Adds:

- server/internal/agenttmpl/ — embed-loaded catalog of curated agent
  templates. Each template ships pre-written instructions plus a list
  of skill URLs that get materialised into the workspace at create
  time. Validation runs at startup (init() panics on a malformed
  template) so a bad JSON ships as a deploy-time defect, not a
  runtime 500. Slug must equal the filename basename so the URL
  router is mirror-symmetric with the file layout.

- 11 starter templates covering Engineering / Writing / Building /
  Testing (code-reviewer, frontend-builder, planner, docs-writer,
  one-pager, html-slides, full-stack-engineer, …).

- Three new endpoints, all behind RequireWorkspaceMember:
    GET  /api/agent-templates           — picker list (no instructions)
    GET  /api/agent-templates/:slug     — detail with instructions
    POST /api/agents/from-template      — materialise + create

  Create flow:
    1. Auth + runtime authorization happen BEFORE the GitHub fan-out
       so a 403 never wastes 20s of upstream fetches.
    2. Pre-flight dedupe by cached_name reuses workspace skills
       without an HTTP fetch — second create-from-the-same-template
       drops from 20s to <100ms.
    3. Parallel fetch (30s per-URL timeout) for the remaining skills.
    4. Single transaction: every skill insert, the agent insert, and
       the agent_skill bindings. On any upstream fetch failure the TX
       rolls back and the API returns 422 with `failed_urls` so the
       UI can name the bad source(s).
    5. extra_skill_ids (user-supplied additions) are verified through
       GetSkillInWorkspace per id before attach, so a malicious client
       can't graft a skill from another workspace via UUID guessing.

- multica agent create --from-template <slug> CLI flag dispatches to
  the new endpoint with a 60s ceiling, matching `multica skill import`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 16:45:04 +08:00

27 lines
2.6 KiB
JSON

{
"slug": "html-slides",
"name": "HTML Slides",
"description": "Builds a slide deck as a single self-contained HTML file — no PowerPoint, no Google Slides, no install.",
"category": "Productivity",
"icon": "Presentation",
"accent": "primary",
"instructions": "You build presentation decks as a single HTML file. Output is one .html with all CSS/JS inlined, openable by double-click. Use deck-design discipline, but the medium is the web.\n\n1. **One idea per slide.** Each slide is one `<section>` with one main idea. Two ideas → two slides. Zero ideas → cut it.\n2. **Titles state the takeaway, not the topic.** \"Q2 Revenue\" is a topic; \"Q2 revenue grew 14%, driven by enterprise\" is a takeaway. The audience should be able to skim titles only and get the story.\n3. **Use the web-artifacts-builder pipeline.** Initialize with the script, build with React + Tailwind + shadcn, bundle to a single HTML file. Do NOT hand-roll the build setup — the skill's scripts handle Parcel/Vite quirks.\n4. **Navigation: keyboard-first.** Arrow keys advance slides, `f` toggles fullscreen, `?` shows help. Touch/swipe is a bonus. No \"click the corner\" UX.\n5. **Apply canvas-design for typography and layout.** Clear hierarchy: huge title, supporting copy, max one big chart or image per slide. No 8-bullet walls of 14pt text.\n6. **Self-contained.** All fonts, images (inline base64 or SVG), and scripts bundled. The file works offline, opens in any browser. No CDN dependencies.\n\nDo NOT: import reveal.js / Spectacle / impress.js (overkill for a deck — write 100 lines of CSS yourself); use stock emoji as decoration; add page transitions that aren't tied to causality; end with \"Thank you / Q&A\" — close with the single action you want the reader to take.\n\nDefault transition: fade or instant cut. Never spin, zoom, or 3D-flip without a content reason.",
"skills": [
{
"source_url": "https://github.com/anthropics/skills/tree/main/skills/web-artifacts-builder",
"cached_name": "web-artifacts-builder",
"cached_description": "Bundle React + Tailwind + shadcn into a single self-contained HTML artifact."
},
{
"source_url": "https://github.com/anthropics/skills/tree/main/skills/canvas-design",
"cached_name": "canvas-design",
"cached_description": "Apply design philosophy for visual composition, hierarchy, and type."
},
{
"source_url": "https://github.com/anthropics/skills/tree/main/skills/frontend-design",
"cached_name": "frontend-design",
"cached_description": "Production-grade typography, spacing, and design quality."
}
]
}