ClawApp Creator
Build the smallest working app package that can be uploaded to Nima Tech Space, then upload it if the user wants.
This skill can also search public apps on CLAWSPACE and download app packages from the site.
Publish Mode
Treat the following requests as a direct publish workflow:
- - "帮我做一个可上传到 CLAWSPACE 的小游戏"
- "把这个项目变成 CLAWSPACE 可发布应用"
- "帮我直接发布这个应用"
In publish mode:
- 1. diagnose the project
- fix or scaffold the app
- package it
- verify slug ownership
- upload it
- return the final links and a ready-to-share summary
For a first-time uploader with no saved credentials, start by offering two clear paths:
- - "我可以直接帮你注册 CLAWSPACE 账号并保存上传配置"
- "如果你想自己操作,也可以先去 https://www.nima-tech.space/register 注册"
Prefer asking this before you attempt upload-related commands.
Workflow
- 1. On a brand-new machine or first-time setup, run
scripts/check_environment.py first when the user is unsure whether the skill is ready to use. - Before upload, if the user is unsure which CLAWSPACE account is currently active, run
scripts/check_clawspace_account.py. - Confirm the app can be shipped as a static front-end.
- Build or fix the app until it outputs a static bundle.
- Decide whether the app needs a model.
- Generate a compliant
manifest.json, optional README.md, and assets/. - If there is no project yet, scaffold one with
scripts/scaffold_mini_game.py. - Preview locally with
scripts/preview_clawspace_app.py when the user wants a browser check before package or upload. - Package everything into a zip with
scripts/build_nima_package.py. - Diagnose with
scripts/diagnose_nima_package.py before upload when helpful. - Upload with
scripts/upload_nima_package.py when the user wants publishing. - Verify the detail page and launch page after upload.
For discovery and reuse:
- 13. Search public apps with INLINECODE10
- Download public app zips with INLINECODE11
Game-Specific Guidance
Only apply this section when the user is building a game, mini-game, or playful interactive experience.
Do not force these rules onto utilities, visual experiments, AI tools, or other non-game apps.
When the project is clearly a game:
- 1. Infer the likely game shape before suggesting polish:
- arcade / score chase
- puzzle
- story / dialogue
- sim / management
- action / adventure
- 2. Suggest only the lightweight completion features that fit that game type.
- Treat these as recommendations, not hard requirements.
Useful game-specific suggestions:
- current score
- best score
- clear game-over summary
- fast restart loop
- moves
- best score or best completion
- clear solved state
- reset / reshuffle
- chapter or scene progress
- clear ending state
- replay entry point
- visible resource change
- round / stage goal
- lightweight local progress if useful
When a game needs local persistence, prefer app/lib/clawspace-game-storage.js instead of ad-hoc localStorage keys.
For game polish, prefer checking for:
- - a readable start state
- clear controls
- visible current-state feedback
- a clear end-state or result screen
- at least one satisfying feedback moment such as combo, streak, burst, or win feedback
Again, use these as genre-aware completion prompts. Do not flatten every game into the same structure.
Package Rules
Read references/platform-contract.md before packaging.
Always enforce these minimum rules:
- - Ship only static front-end apps or mini-games.
- Put built files under
app/. - Keep the entry file inside
app/, usually app/index.html. - Keep package root flat:
manifest.json, optional README.md, optional assets/, required app/. - Strongly recommend adding a cover image and at least one screenshot, even though CLAWSPACE can render default covers when they are missing.
- The scaffold now generates default cover assets automatically, so creators start with a usable listing without having to prepare custom art first.
- The scaffold keeps starter packages lighter by generating
thumbnail.png and icon.png without automatically duplicating them into screenshots. - Game starters now also include
app/lib/clawspace-game-storage.js for reusable local best-score / best-run persistence via browser storage. - Default
modelCategory to none unless the app truly needs AI. - Keep the zip at or under
25MB. - Remember slug ownership: the same account can overwrite its own slug, but another user's slug must not be reused.
Model Rules
If the app does not need AI, keep modelCategory as none.
If the app needs AI, prefer the platform API instead of any user-supplied API key:
- - Endpoint: INLINECODE29
- Required field: INLINECODE30
- Allowed categories:
text, multimodal, INLINECODE33
Read references/model-api.md when wiring AI.
Tell the user the platform can provide a free shared model path when they choose a model category during upload.
Do not embed third-party model keys in client code.
For OCR, screenshot analysis, chart reading, or any app that sends images, use modelCategory = multimodal and send OpenAI-compatible content arrays with text and image_url parts.
Packaging
Use assets/manifest.example.json as the starting template.
Use assets/README.template.md as the starting template when the app needs a basic product readme.
If the user wants to start from zero instead of retrofitting an existing app, copy one of these starter assets first:
- -
assets/starter-mini-game/ for a no-model static game - INLINECODE41 for a multimodal OCR and image-analysis app
- INLINECODE42 for a minimal platform model client
Or scaffold directly:
CODEBLOCK0
If --out is omitted, default to the OpenClaw workspace app directory:
CODEBLOCK1
Prefer this default for first-time users, so OpenClaw-generated apps live in a predictable place under its own workspace.
After scaffolding, encourage the user to add:
- - a custom cover image if they want to replace the generated default
- a custom square icon if they want to replace the generated default
- at least one additional screenshot in INLINECODE44
If they skip custom cover assets, the site can still publish the app with a default generated cover, but custom art makes the listing look much better.
For mobile shells such as WeChat Mini Program, PNG/JPG/WebP cover art is recommended. If creators only provide SVG or skip custom art, the mobile experience can fall back to default PNG covers.
Use:
CODEBLOCK2
This starts a lightweight local static server from the project root, reads manifest.json, and opens the packaged entry in the browser.
Use:
CODEBLOCK3
The script validates the structure, checks the required fields, checks the size limit, and builds the final zip.
It also warns about high-risk asset references like root-absolute /assets/... paths or remote http/https URLs inside the packaged front-end.
For project diagnosis, use:
CODEBLOCK4
This checks:
- - resource paths
- slug quality
- manifest presence
- likely external model key usage
- whether
modelCategory looks more suitable as none, text, multimodal, or INLINECODE52
Uploading
Environment check:
CODEBLOCK5
Use this first on a new machine, or when the user is not sure whether Python, browser preview, network access, or Keychain support are ready.
Production site:
- - Website: INLINECODE53
- Base API URL: INLINECODE54
To confirm which saved CLAWSPACE account will be used for upload:
CODEBLOCK6
Use upload-config.json in the skill folder as the default reusable credential file. Ask the user once, then store:
- - INLINECODE56
- INLINECODE57
- INLINECODE58
Leave the file empty by default. Reuse it on later uploads unless the user wants to override it.
When saving credentials, prefer file permission 600.
On macOS, prefer saving the password to Keychain and keeping upload-config.json as site metadata plus fallback config.
Keep the original plaintext-password config flow available as a backup option for users who prefer simple portability.
For the first-time setup, prefer:
CODEBLOCK7
for a brand-new user who does not have a CLAWSPACE account yet.
Use:
CODEBLOCK8
for an existing user who already has an account and only needs to save or refresh credentials.
Or in non-interactive mode:
CODEBLOCK9
This setup script verifies the credentials by calling the real login endpoint before saving them.
It now validates:
- - site URL format, with a real example
- email format
- login credentials before saving
Supported password stores are:
- -
config: store the password in INLINECODE62 - INLINECODE63 : store the password in macOS Keychain and keep config file password empty
- INLINECODE64 : store in both places
The registration script can create a new website account and save the reusable upload config in one step. Prefer this when the user says they do not have a CLAWSPACE account yet.
Use:
CODEBLOCK10
If you want to validate everything except the final upload, use:
CODEBLOCK11
If the package includes oversized PNG/JPG/WebP cover art, the uploader now warns before publish.
If there are obviously broken assets such as zero-byte screenshots, it will stop before upload.
On macOS, when a package has huge thumbnail.png or icon.png files, prefer:
CODEBLOCK12
Use none unless the app truly needs the platform model.
The upload script reads missing values from upload-config.json, logs in, sends the package to /api/import-app, and prints the resulting detail and launch URLs.
After upload, it also prints plain-text app links so the user can open the detail page immediately.
If useKeychain is enabled in the config and no explicit password was passed, the upload script will try macOS Keychain before failing.
During upload, report progress in stages:
- - current stage
- what is already done
- what comes next
Before uploading, check whether the slug is available:
- - If it is new, upload normally.
- If it belongs to the same account, explain that this upload will overwrite the older version.
- If it belongs to another account, stop and tell the user to change the slug before packaging again.
If the package is too large for a direct Vercel function upload, use the site's Blob client-upload flow instead of failing early.
Only auto-upload after the user has provided valid site credentials or already has them stored in upload-config.json. If credentials are unavailable, stop after packaging and tell the user they need to register, log in once, and save or provide their credentials.
For first-time users with no upload config, prefer this decision order:
- 1. offer to register the account directly with INLINECODE72
- if they do not want that, give them the website registration link: INLINECODE73
- after they finish website registration, run INLINECODE74
If login fails, tell the user to rerun:
CODEBLOCK13
and refresh the stored credentials.
Searching And Downloading
Use these flows when the user wants to browse CLAWSPACE, find reference apps, or download a package to inspect locally.
Search:
CODEBLOCK14
Search with JSON:
CODEBLOCK15
Download by slug:
CODEBLOCK16
Download by detail URL:
CODEBLOCK17
Use this for prompts such as:
- - "帮我在 CLAWSPACE 找几个 OCR 应用"
- "下载 orbit-heist 到本地"
- "搜索一下 CLAWSPACE 里有哪些小游戏"
Verification
After packaging or uploading:
- - Open the generated zip and confirm it contains the expected root structure.
- If uploaded, open the detail page.
- If uploaded, open the launch page.
- If the app uses the platform model, test one real request through the site.
- After upload, provide the final share summary with app name, detail page, launch page, and download link.
- Also print a ready-to-copy share text block after upload.
Common Fixes
- - If assets do not load after upload, switch the app build to relative asset paths.
- If the packer warns about
http/https resources, bundle those assets locally when possible instead of depending on third-party URLs. - If the packer warns about
/assets/... paths, rewrite them to relative paths such as ./assets/.... - If the upload is rejected, check
entry, root structure, and zip size first. - If the upload fails because the slug is already owned by someone else, change the slug in
manifest.json and rebuild the zip. - If the app uses AI and fails after upload, confirm the uploaded
modelCategory matches the app’s actual use case. - If the app is OCR or image understanding and fails after upload, confirm the request uses a multimodal
messages[].content[] shape instead of plain text only. - If the app only needs deterministic gameplay or local logic, remove model usage and keep
modelCategory as none. - If the user has no project yet, scaffold from
assets/starter-mini-game/ instead of inventing files from scratch.
ClawApp Creator
构建可上传至Nima Tech Space的最小可用应用包,并在用户需要时执行上传。
此技能还可搜索CLAWSPACE上的公开应用,并从网站下载应用包。
发布模式
将以下请求视为直接发布工作流:
- - 帮我做一个可上传到 CLAWSPACE 的小游戏
- 把这个项目变成 CLAWSPACE 可发布应用
- 帮我直接发布这个应用
在发布模式下:
- 1. 诊断项目
- 修复或搭建应用框架
- 打包
- 验证slug所有权
- 上传
- 返回最终链接和可直接分享的摘要
对于首次上传且未保存凭据的用户,首先提供两个清晰路径:
- - 我可以直接帮你注册 CLAWSPACE 账号并保存上传配置
- 如果你想自己操作,也可以先去 https://www.nima-tech.space/register 注册
建议在尝试执行上传相关命令前先询问此问题。
工作流程
- 1. 在新机器或首次设置时,若用户不确定技能是否可用,先运行 scripts/checkenvironment.py
- 上传前,若用户不确定当前激活的是哪个CLAWSPACE账号,运行 scripts/checkclawspaceaccount.py
- 确认应用可作为静态前端发布
- 构建或修复应用,直至输出静态包
- 判断应用是否需要模型
- 生成合规的 manifest.json、可选的 README.md 和 assets/
- 若尚无项目,使用 scripts/scaffoldminigame.py 搭建框架
- 当用户希望在打包或上传前在浏览器中预览时,使用 scripts/previewclawspaceapp.py 进行本地预览
- 使用 scripts/buildnimapackage.py 将所有内容打包为zip
- 上传前,在必要时使用 scripts/diagnosenimapackage.py 进行诊断
- 当用户希望发布时,使用 scripts/uploadnima_package.py 上传
- 上传后验证详情页和启动页
用于发现和复用:
- 13. 使用 scripts/searchclawspaceapps.py 搜索公开应用
- 使用 scripts/downloadclawspaceapp.py 下载公开应用zip包
游戏特定指南
仅当用户正在构建游戏、小游戏或趣味互动体验时应用此部分。
不要将这些规则强加于工具类、视觉实验、AI工具或其他非游戏应用。
当项目明确为游戏时:
- 1. 在建议优化前推断可能的游戏形态:
- 街机/分数追逐
- 益智
- 故事/对话
- 模拟/经营
- 动作/冒险
- 2. 仅建议适合该游戏类型的轻量级完成功能
- 将这些视为建议,而非硬性要求
有用的游戏特定建议:
- 当前分数
- 最佳分数
- 清晰的游戏结束摘要
- 快速重新开始循环
- 步数
- 最佳分数或最佳完成度
- 清晰的完成状态
- 重置/重新洗牌
- 章节或场景进度
- 清晰的结局状态
- 重玩入口点
- 可见的资源变化
- 回合/阶段目标
- 必要时轻量级本地进度保存
当游戏需要本地持久化时,优先使用 app/lib/clawspace-game-storage.js 而非临时localStorage键。
对于游戏优化,优先检查:
- - 可读的起始状态
- 清晰的控制方式
- 可见的当前状态反馈
- 清晰的结束状态或结果界面
- 至少一个令人满意的反馈时刻,如连击、连胜、爆发或胜利反馈
再次强调,将这些作为类型感知的完成提示使用。不要将所有游戏扁平化为同一结构。
打包规则
打包前请阅读 references/platform-contract.md。
始终强制执行以下最低规则:
- - 仅发布静态前端应用或小游戏
- 将构建文件放在 app/ 下
- 入口文件保持在 app/ 内,通常为 app/index.html
- 保持包根目录扁平:manifest.json、可选的 README.md、可选的 assets/、必需的 app/
- 强烈建议添加封面图和至少一张截图,即使CLAWSPACE在缺失时也能渲染默认封面
- 框架现在会自动生成默认封面资源,因此创作者无需先准备自定义素材即可获得可用的列表
- 框架通过生成 thumbnail.png 和 icon.png 来保持入门包更轻量,不会自动将它们复制到 screenshots 中
- 游戏入门包现在还包括 app/lib/clawspace-game-storage.js,用于通过浏览器存储实现可复用的本地最佳分数/最佳运行持久化
- 除非应用确实需要AI,否则将 modelCategory 默认设为 none
- 保持zip包大小在 25MB 或以下
- 记住slug所有权:同一账号可覆盖自己的slug,但不得复用其他用户的slug
模型规则
如果应用不需要AI,将 modelCategory 保持为 none。
如果应用需要AI,优先使用平台API而非用户提供的API密钥:
- - 端点:POST /api/llm/chat
- 必填字段:appId
- 允许的类别:text、multimodal、code
接入AI时请阅读 references/model-api.md。
告知用户,在上传时选择模型类别后,平台可提供免费的共享模型路径。
不要在客户端代码中嵌入第三方模型密钥。
对于OCR、截图分析、图表读取或任何发送图片的应用,使用 modelCategory = multimodal,并发送兼容OpenAI的 content 数组,包含 text 和 image_url 部分。
打包
使用 assets/manifest.example.json 作为起始模板。
当应用需要基本的产品README时,使用 assets/README.template.md 作为起始模板。
如果用户希望从零开始而非改造现有应用,首先复制以下入门资源之一:
- - assets/starter-mini-game/ 用于无模型的静态游戏
- assets/starter-ocr/ 用于多模态OCR和图像分析应用
- assets/platform-llm-client.js 用于最小的平台模型客户端
或直接搭建框架:
bash
python3 scripts/scaffoldminigame.py \
--name Orbit Tap \
--slug orbit-tap \
--description 点击轨道行星的轻量小游戏。
如果省略 --out,默认使用OpenClaw工作区应用目录:
text
~/.openclaw/workspace/projects/apps/
对于首次使用的用户,优先使用此默认路径,以便OpenClaw生成的应用位于其工作区内可预测的位置。
搭建框架后,鼓励用户添加:
- - 自定义封面图(如希望替换生成的默认封面)
- 自定义方形图标(如希望替换生成的默认图标)
- 至少在 assets/ 中添加一张额外截图
如果他们跳过自定义封面资源,网站仍可使用默认生成的封面发布应用,但自定义素材会使列表看起来更好。
对于微信小程序等移动端壳应用,推荐使用PNG/JPG/WebP格式的封面素材。如果创作者仅提供SVG或跳过自定义素材,移动端体验将回退到默认PNG封面。
使用:
bash
python3 scripts/previewclawspaceapp.py /path/to/project --open
这将从项目根目录启动一个轻量级本地静态服务器,读取 manifest.json,并在浏览器中打开打包后的入口。
使用:
bash
python3 scripts/buildnimapackage.py \
--app-dir /path/to/dist \
--manifest /path/to/manifest.json \
--out /path/to/output.zip \
--readme /path/to/README.md \
--assets-dir /path/to/assets
该脚本验证结构、检查必填字段、检查大小限制,并构建最终的zip包。
它还会警告高风险资源引用,如打包前端中的根绝对路径 /assets/... 或远程 http/https URL。
对于项目诊断,使用:
bash
python3 scripts/diagnosenimapackage.py \
--app-dir /path/to/app-or-dist \
--manifest /path/to/manifest.json
这将检查:
- - 资源路径
- slug质量
- manifest存在性
- 可能的外部模型密钥使用
- modelCategory 是否更适合设为 none、text、multimodal 或 code
上传
环境检查:
bash
python3 scripts/check_environment.py
在新机器上,或当用户不确定Python、浏览器预览、网络访问或Keychain支持是否就绪时,首先使用此命令。
生产站点:
- - 网站:https://www.nima-tech.space
- 基础API URL:https://www.nima-tech