Nodejs Project Arch
Description
🏗️ AI-friendly Node.js project architecture standards. Keep files <400 lines for AI agents. Covers H5 games, data tools, APIs, SDKs. 70-93% token savings. OpenClaw skill.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
nodejs-project-arch
**Node.js project architecture standards for AI-assisted development.**
An [OpenClaw](https://openclaw.ai) / AI agent skill that enforces modular file structures, keeping every file small enough for AI to read and edit without blowing the context window.
✨ Why?
When AI agents work with large single-file codebases, things go wrong fast:
| Scenario | Tokens per read | Context usage (200K) |
|---|---|---|
3000-line server.js |
~40K | 20% |
| 200-line module | ~2.7K | 1.3% |
**Result:** Splitting files means **10-15 productive rounds** before context compression, vs 3-5 with monolithic files. That's **70-93% token savings** per file read.
📐 Core Rules
- Single file ≤ 400 lines /
index.html≤ 200 lines /server.jsentry ≤ 100 lines - All tunable values in
config.json— loaded at runtime, editable via admin dashboard - Backend:
routes/by domain,services/for shared logic,db.jsfor database init - Frontend: HTML skeleton only, JS/CSS in separate files under
public/ - Every project gets
admin.html+routes/admin.jsfor config hot-reload + stats
🎮 Supported Project Types
| 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 |
📁 Typical Structure
project-name/
server.js ← Entry point,
Related Skills
mcp-server-postgres
Read-only PostgreSQL database access.
Data mcp-server-sqlite
SQLite database interaction and querying.
Data mcp-server-google-maps
Google Maps integration for location data.
Data Bitbucket Data Center
---
Data Csv Data Summarizer
Automatically analyze CSV files and generate comprehensive insights with visualizations
Data OpenViking
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Data