abczsl520/nodejs-project-arch/SKILL.md
Node.js project architecture standards for AI-assisted development. Enforces file splitting (<400 lines), config externalization, route modularization, and admin dashboards. Use when creating new Node.js projects, refactoring large single-file codebases, or when AI context window is being consumed by oversized files. Covers H5 games (Canvas/Phaser/Matter.js), data tools (crawlers/scrapers), content platforms, monitoring dashboards, API services, and SDK libraries.
npx skillsauth add openclaw/skills nodejs-project-archInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Architecture standards that keep files small enough for AI agents to read/edit without blowing the context window.
index.html max 200 lines, server.js entry max 100 linesconfig.json, loaded at runtime, editable via admin dashboardroutes/ by domain, services/ for shared logic, db.js for databaseadmin.html + routes/admin.js for config hot-reloadDetermine project type, then read the corresponding reference:
| Type | Signals | Reference | |------|---------|-----------| | H5 Game | Canvas, Phaser, Matter.js, game loop, sprites | references/game.md | | Data Tool | Crawler, scraper, scheduler, data sync, analytics | references/tool.md | | Content/Utility | Generator, library, publisher, file processing | references/tool.md | | Dashboard/Monitor | Charts, real-time, alerts, metrics | references/tool.md | | API Service | REST endpoints, middleware, microservice | references/tool.md | | SDK/Library | Shared module, build step, multi-consumer | references/sdk.md |
config.jsonroutes/admin.js + admin.htmlconfig.js fetches /api/config at startup, code reads GAME_CONFIG.xxx or APP_CONFIG.xxx// Server: load and serve config
const config = JSON.parse(fs.readFileSync('./config.json', 'utf8'));
app.get('/api/config', (req, res) => {
const safe = { ...config };
delete safe.admin; // strip secrets
res.json(safe);
});
// Admin: hot-reload
app.post('/admin/config', requireAdmin, (req, res) => {
fs.writeFileSync('./config.json.bak', fs.readFileSync('./config.json'));
fs.writeFileSync('./config.json', JSON.stringify(req.body, null, 2));
Object.assign(config, req.body);
res.json({ ok: true });
});
admin.html auto-generates form from config structure:
x-admin-password header)Large single files consume massive context tokens when AI reads them:
tools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。