重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
use-template by opusgamelabs/game-creator
npx skills add https://github.com/opusgamelabs/game-creator --skill use-template从图库中克隆游戏模板到新项目。这是一个快速复制——几秒内获得可运行代码,而非 AI 流水线。
解析参数 : <template-id> [project-name]
site/manifest.json,显示所有模板的编号列表(包含引擎/复杂度/描述),并让用户选择一个。template-id 是必需的。project-name 默认为 template-id。在 site/manifest.json 中通过 id 查找模板。如果未找到,显示可用的 ID 并中止。
:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
game-creator 仓库内 → examples/<project-name>/./<project-name>/复制模板源目录 到目标位置,排除 :
node_modules/dist/output/.herenow/progress.mdtest-results/playwright-report/更新项目元数据 :
package.json 中:将 "name" 设置为项目名称index.html 中(如果存在):将 <title> 更新为项目名称的格式化版本安装依赖项 : 在目标目录中运行 npm install。
打印后续步骤 :
模板克隆成功!
cd <project-name>
npm run dev
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
// 查找 game-creator 根目录(包含 site/manifest.json)
function findRoot(dir) {
let d = dir;
while (d !== path.dirname(d)) {
if (fs.existsSync(path.join(d, 'gallery', 'manifest.json'))) return d;
d = path.dirname(d);
}
return null;
}
const root = findRoot(process.cwd());
const manifest = JSON.parse(fs.readFileSync(path.join(root, 'gallery', 'manifest.json'), 'utf-8'));
// 解析参数
const [templateId, projectName] = args; // 由 agent 提供
const template = manifest.find(t => t.id === templateId);
const name = projectName || templateId;
// 确定目标目录
const inGameCreator = process.cwd().startsWith(root);
const target = inGameCreator
? path.join(root, 'examples', name)
: path.join(process.cwd(), name);
// 复制并排除指定项
const EXCLUDE = ['node_modules', 'dist', 'output', '.herenow', 'progress.md', 'test-results', 'playwright-report'];
function copyDir(src, dst) {
fs.mkdirSync(dst, { recursive: true });
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
if (EXCLUDE.includes(entry.name)) continue;
const s = path.join(src, entry.name);
const d = path.join(dst, entry.name);
if (entry.isDirectory()) copyDir(s, d);
else fs.copyFileSync(s, d);
}
}
copyDir(path.join(root, template.source), target);
// 更新 package.json
const pkgPath = path.join(target, 'package.json');
if (fs.existsSync(pkgPath)) {
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
pkg.name = name;
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
}
// 更新 index.html 的标题
const indexPath = path.join(target, 'index.html');
if (fs.existsSync(indexPath)) {
let html = fs.readFileSync(indexPath, 'utf-8');
const prettyName = name.replace(/[-_]/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
html = html.replace(/<title>[^<]*<\/title>/, `<title>${prettyName}</title>`);
fs.writeFileSync(indexPath, html);
}
// 安装依赖
execSync('npm install', { cwd: target, stdio: 'inherit' });
// 发送即发即弃的遥测数据(尊重 DO_NOT_TRACK / DISABLE_TELEMETRY 环境变量)
if (!process.env.DO_NOT_TRACK && !process.env.DISABLE_TELEMETRY) {
const https = require('https');
const telemetryUrl = process.env.TELEMETRY_URL || 'https://gallery-telemetry.up.railway.app';
https.get(`${telemetryUrl}/t?event=clone&template=${encodeURIComponent(templateId)}&source=skill&v=1`)
.on('error', () => {});
}
/use-template flappy-bird my-game
/use-template threejs-3d-starter space-shooter
/use-template castle-siege
/use-template 是一个 10 秒复制。你立即获得可运行、可工作的代码,并手动进行自定义。/make-game 是一个 10 分钟 AI 流水线,它根据文本提示进行脚手架搭建、设计、添加音频、测试、部署和货币化。
每周安装数
66
代码仓库
GitHub 星标数
31
首次出现
2026年3月3日
安全审计
安装于
claude-code59
gemini-cli31
kimi-cli31
codex31
cursor31
opencode31
Clone a game template from the gallery into a new project. This is a fast copy — working code in seconds, not an AI pipeline.
Parse arguments : <template-id> [project-name]
site/manifest.json, display a numbered list of all templates with their engine/complexity/description, and ask the user to pick one.template-id is required. project-name defaults to template-id.Look up template in site/manifest.json by id. If not found, show available IDs and abort.
Determine target directory :
game-creator repository → examples/<project-name>/./<project-name>/Copy the template source directory to the target, excluding :
node_modules/dist/output/.herenow/progress.mdtest-results/playwright-report/Update project metadata :
package.json: set "name" to the project nameindex.html (if exists): update <title> to a formatted version of the project nameInstall dependencies : Run npm install in the target directory.
Print next steps :
Template cloned successfully!
cd <project-name>
npm run dev
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
// Find game-creator root (contains site/manifest.json)
function findRoot(dir) {
let d = dir;
while (d !== path.dirname(d)) {
if (fs.existsSync(path.join(d, 'gallery', 'manifest.json'))) return d;
d = path.dirname(d);
}
return null;
}
const root = findRoot(process.cwd());
const manifest = JSON.parse(fs.readFileSync(path.join(root, 'gallery', 'manifest.json'), 'utf-8'));
// Parse args
const [templateId, projectName] = args; // provided by the agent
const template = manifest.find(t => t.id === templateId);
const name = projectName || templateId;
// Determine target
const inGameCreator = process.cwd().startsWith(root);
const target = inGameCreator
? path.join(root, 'examples', name)
: path.join(process.cwd(), name);
// Copy with exclusions
const EXCLUDE = ['node_modules', 'dist', 'output', '.herenow', 'progress.md', 'test-results', 'playwright-report'];
function copyDir(src, dst) {
fs.mkdirSync(dst, { recursive: true });
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
if (EXCLUDE.includes(entry.name)) continue;
const s = path.join(src, entry.name);
const d = path.join(dst, entry.name);
if (entry.isDirectory()) copyDir(s, d);
else fs.copyFileSync(s, d);
}
}
copyDir(path.join(root, template.source), target);
// Update package.json
const pkgPath = path.join(target, 'package.json');
if (fs.existsSync(pkgPath)) {
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
pkg.name = name;
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
}
// Update index.html title
const indexPath = path.join(target, 'index.html');
if (fs.existsSync(indexPath)) {
let html = fs.readFileSync(indexPath, 'utf-8');
const prettyName = name.replace(/[-_]/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
html = html.replace(/<title>[^<]*<\/title>/, `<title>${prettyName}</title>`);
fs.writeFileSync(indexPath, html);
}
// Install
execSync('npm install', { cwd: target, stdio: 'inherit' });
// Fire-and-forget telemetry (respects DO_NOT_TRACK / DISABLE_TELEMETRY)
if (!process.env.DO_NOT_TRACK && !process.env.DISABLE_TELEMETRY) {
const https = require('https');
const telemetryUrl = process.env.TELEMETRY_URL || 'https://gallery-telemetry.up.railway.app';
https.get(`${telemetryUrl}/t?event=clone&template=${encodeURIComponent(templateId)}&source=skill&v=1`)
.on('error', () => {});
}
/use-template flappy-bird my-game
/use-template threejs-3d-starter space-shooter
/use-template castle-siege
/use-template is a 10-second copy. You get working, runnable code instantly and customize it manually. /make-game is a 10-minute AI pipeline that scaffolds, designs, adds audio, tests, deploys, and monetizes from a text prompt.
Weekly Installs
66
Repository
GitHub Stars
31
First Seen
Mar 3, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykPass
Installed on
claude-code59
gemini-cli31
kimi-cli31
codex31
cursor31
opencode31
Lark Skill Maker 教程:基于飞书CLI创建AI技能,自动化工作流与API调用指南
41,900 周安装