nodejs-project-arch
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/abczsl520/nodejs-project-archWhat This Skill Does
The nodejs-project-arch skill provides a standardized framework for building Node.js applications specifically optimized for AI-assisted development. By enforcing strict file size limits (under 400 lines), modular routing, and externalized configurations, this skill ensures that project codebases remain readable and maintainable within limited AI context windows. It addresses the common pain point of 'context bloat,' where massive monolithic files force AI agents to spend the majority of their token allocation just reading existing code. The architecture encourages a clean separation of concerns, utilizing an admin dashboard pattern that allows for hot-reloading configurations, thus empowering both the developer and the AI to tune application behavior without restarting services or manual file editing.
Installation
To integrate this architecture standard into your development environment, run the following command in your terminal: clawhub install openclaw/skills/skills/abczsl520/nodejs-project-arch Once installed, the skill provides templates and structure recommendations based on the project type identified during your setup phase.
Use Cases
This skill is ideal for teams and individual developers working on:
- H5 Games (using Phaser, Matter.js, or Canvas) that require frequent logic adjustments.
- Data-intensive tools like scrapers, crawlers, or complex ETL pipelines.
- API-first microservices that demand high modularity and clean endpoint separation.
- Real-time monitoring dashboards that benefit from administrative hot-reloading of metrics and threshold settings.
- SDK libraries intended for multi-consumer ecosystems, where documentation and file-size constraints are critical for developer experience.
Example Prompts
- "I am starting a new Phaser.js H5 game. Initialize the project structure using the nodejs-project-arch standards so I can keep my game loop and asset management in separate files."
- "My current scraper script is 1,200 lines long and the AI is struggling to keep track of the logic. Refactor this into the nodejs-project-arch format, separating the crawler logic, the database handler, and the config settings."
- "Please generate an admin.html and the corresponding routes/admin.js for my existing utility service, ensuring I can update my API endpoints and timeout settings without redeploying."
Tips & Limitations
- Tip: Treat the 400-line limit as a hard constraint; if a file approaches this threshold, treat it as a trigger to extract sub-services or utility modules.
- Tip: Use the provided JSON config pattern to externalize all environment-specific variables, making your code environment-agnostic.
- Limitation: This skill is specifically tailored for Node.js environments. It will not be applicable for frontend-only frameworks like React or Vue unless they include a Node.js backend.
- Limitation: While this architecture improves context management, developers must still perform architectural reviews to ensure modularity doesn't lead to over-fragmentation.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-abczsl520-nodejs-project-arch": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
debug-methodology
Systematic debugging and problem-solving methodology. Activate when encountering unexpected errors, service failures, regression bugs, deployment issues, or when a fix attempt has failed twice. Also activate when proposing ANY fix to verify it addresses root cause (not a workaround). Prevents patch-chaining, wrong-environment restarts, workaround addiction, and "drunk man" random fixes.
game-quality-gates
Game development quality gates and mandatory checks. Activate when building, reviewing, debugging, or deploying any game project (H5/Canvas/WebGL/Phaser/Three.js/2D/3D). Covers state cleanup, lifecycle management, input handling, audio, persistence, networking, anti-cheat, and performance. Use as pre-deploy checklist or when diagnosing game-specific bugs (state leaks, phantom timers, buff conflicts, memory growth, touch issues).
memory-cn
OpenClaw + Ollama 中文记忆系统优化。诊断 FTS5 unicode61 中文分词 bug,优化搜索参数,自动维护记忆文件。命中率从 55% 提升到 100%。
bug-audit
Comprehensive bug audit for Node.js web projects. Activate when user asks to audit, review, check bugs, find vulnerabilities, or do security/quality review on a project. Works by dissecting the project's actual code to build project-specific check matrices, then exhaustively verifying each item — not by running a generic checklist. Supports games, data tools, WeChat apps, API services, bots, and dashboards.
codex-review
Three-tier code quality defense: L1 quick scan, L2 deep audit (via bug-audit), L3 cross-validation with adversarial testing. 三级代码质量防线。