Clawpage Skill (Router)
Purpose
This router only decides which sub-skill to invoke.
All execution details (workflow, output, localization, checks, failure handling) are defined in sub-skills and shared contracts.
Sub-skills
- 1. INLINECODE0
- - Path: INLINECODE1
- Purpose: initialize the skill, automatically register a new user, and save configuration to keys.local.json
- 2. INLINECODE2
- - Path: INLINECODE3
- Purpose: create a new page project and publish
- 3. INLINECODE4
- - Path: INLINECODE5
- Purpose: update an existing page project and republish
- 4. INLINECODE6
- - Path: INLINECODE7
- Purpose: create or update the current read-only management page that lists user's pages
- 5. INLINECODE8
- - Path: INLINECODE9
- Purpose: create a reusable template folder
- 6. INLINECODE10
- - Path: INLINECODE11
- Purpose: update an existing template structure/style/interaction/docs
Routing Priority (Conflict Resolution)
Apply this priority order when intent is mixed:
- 1. Initialization intent ("init", "setup", "初始化", "完成注册") -> INLINECODE12
- Management-page intent ("管理页", "后台页", "列出我所有页面", "pages dashboard", "admin/read-only page list") -> INLINECODE13
- Explicit
page-id / pageId / "update existing page" signal -> INLINECODE16 - Existing local project intent (
.pages/<name>, "基于旧页面", "沿用现有页面") -> INLINECODE18 - Template-only intent (create/update template) ->
create template or INLINECODE20 - Otherwise default to creating a new page -> INLINECODE21
Keyword Hints
- - Init: "init", "setup", "初始化", "自动注册", "register"
- Create page: "new/create page", "from template", "发布新页面"
- Update page: "update/rework/revise", "existing page", "page-id"
- Create management page: "管理页", "页面管理", "列出所有页面", "dashboard of my pages", "read-only admin page"
- Create template: "new template", "模板搭建"
- Update template: "improve template", "模板改版"
Global Non-Negotiable Constraints
- - Never remove required HTML placeholders:
__CONTENT_HTML__, __DEFAULT_CSS__, __DEFAULT_JS__. - Do not fabricate
pageId for updates. - Use API default
https://api.clawpage.ai unless user overrides. - For newly created pages, default publish policy is private + 3h TTL (
pagecode required, ttlMs=10800000) unless user explicitly requests otherwise. - Management page must be read-only (no destructive operations).
References
- - API semantics: INLINECODE29
- Shared prompt contracts (output/localization/checks/errors): INLINECODE30
- Publish entrypoint: INLINECODE31
Clawpage 技能(路由器)
目的
该路由器仅决定调用哪个子技能。
所有执行细节(工作流、输出、本地化、检查、失败处理)均在子技能和共享契约中定义。
子技能
- 1. init
- - 路径:skills/init/SKILL.md
- 目的:初始化技能,自动注册新用户,并将配置保存到 keys.local.json
- 2. create page
- - 路径:skills/create-page/SKILL.md
- 目的:创建新的页面项目并发布
- 3. update page
- - 路径:skills/update-page/SKILL.md
- 目的:更新现有页面项目并重新发布
- 4. create management page
- - 路径:skills/create-management-page/SKILL.md
- 目的:创建或更新当前只读管理页面,用于列出用户的页面
- 5. create template
- - 路径:skills/create-template/SKILL.md
- 目的:创建可复用的模板文件夹
- 6. update template
- - 路径:skills/update-template/SKILL.md
- 目的:更新现有模板的结构/样式/交互/文档
路由优先级(冲突解决)
当意图混合时,按此优先级顺序处理:
- 1. 初始化意图(init, setup, 初始化, 完成注册)-> init
- 管理页面意图(管理页, 后台页, 列出我所有页面, pages dashboard, admin/read-only page list)-> create management page
- 明确的 page-id / pageId / 更新现有页面 信号 -> update page
- 现有本地项目意图(.pages/, 基于旧页面, 沿用现有页面)-> update page
- 仅模板意图(创建/更新模板)-> create template 或 update template
- 否则默认创建新页面 -> create page
关键词提示
- - 初始化: init, setup, 初始化, 自动注册, register
- 创建页面: new/create page, from template, 发布新页面
- 更新页面: update/rework/revise, existing page, page-id
- 创建管理页面: 管理页, 页面管理, 列出所有页面, dashboard of my pages, read-only admin page
- 创建模板: new template, 模板搭建
- 更新模板: improve template, 模板改版
全局不可协商约束
- - 切勿删除必需的 HTML 占位符:CONTENTHTML、DEFAULTCSS、DEFAULT_JS。
- 不要为更新操作伪造 pageId。
- 除非用户覆盖,否则使用 API 默认地址 https://api.clawpage.ai。
- 对于新创建的页面,默认发布策略为私有 + 3小时 TTL(需要 pagecode,ttlMs=10800000),除非用户明确要求其他设置。
- 管理页面必须为只读(无破坏性操作)。
参考
- - API 语义:references/api-quickref.md
- 共享提示契约(输出/本地化/检查/错误):references/prompt-contracts.md
- 发布入口点:scripts/clawpages_publish.mjs