---
title: "Templates Module"
module_id: "templates"
version: "1.0.0"
category: "system"
autonomy: "config-required"
generated: true
generated_at: "2026-05-04"
---

# Templates

> Template gallery, export current site as reusable template, and import templates from file

Ships with **1 agent skill**.

## Quick Facts

| Property | Value |
|----------|-------|
| **Module ID** | `templates` |
| **Version** | 1.0.0 |
| **Category** | system |
| **Autonomy** | config-required |
| **Core** | No |
| **Capabilities** | `data:read`, `data:write` |
| **MCP-exposed skills** | 1 |
| **Owns tables** | — |

## Skills

These skills are seeded into `agent_skills` when the module is enabled and exposed via MCP.
External operators (FlowPilot, OpenClaw, Claude Desktop, custom MCP clients) can call them directly.

| Skill | Scope | Description |
|-------|-------|-------------|
| `list_templates` | internal | List the starter-template catalog (static JSON in /templates) plus which template (if any) is currently installed on this site. Use when: a user asks "what templates are available?", "what site am … |

## Module API Contract

**Actions:** `export`, `import`, `install`

**Input fields:** `action`, `templateId`, `meta`

**Output fields:** `success`, `error`, `templateId`

## File Map

| Purpose | Path |
|---------|------|
| Module definition | `src/lib/modules/templates-module.ts` |

## Contributing

To enhance this module, see [Contributing Guide](../contributing/contributing.md).

Key rules:
- Follow `ModuleDefinition<I, O>` contract pattern
- All schema changes require idempotent migrations
- Skills must be self-describing ([Law 2](../concepts/openclaw-law.md))
- Blocks are interfaces, not pipelines ([Law 3](../concepts/openclaw-law.md))
- New skills must pass the [Agent Contract Integrity](../architecture/agent-contract-integrity.md) checklist (`bun run lint:skills`)

---

*This file is auto-generated by `scripts/generate-module-docs.ts`. Do not edit manually — re-run the script after changing the module definition.*