node-runtime-reliability
Skill17 starsChanged 58 days agoMITView on GitHub
Analyze Node.js services for runtime safety, concurrency correctness, memory health, timeout behavior, shutdown integrity, and production resilience.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adr-challengerSkill
- api-designSkill
- architecture-decisionsSkill
- async-systemsSkill
- code-reviewSkill
- database-engineeringSkill
- dora-metricsSkill
- engineering-economicsSkill
- incident-responseSkill
- nestjs-architecture-guardianSkill
- observabilitySkill
- performance-analysisSkill
- prd-reviewSkill
- production-readinessSkill
- release-planningSkill
- repo-onboardingSkill
- safe-refactoringSkill
- security-reviewSkill
- systematic-debuggingSkill
- test-strategySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 54
No timeout on any HTTP client call.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mission
Make Node.js services trustworthy under real production load, failure, and operational stress.
When to use
- Reviewing Node.js service reliability.
- Investigating latency, crashes, or memory issues.
- Designing async workflows.
- Validating shutdown, retries, and concurrency controls.
Handoff
- Receives from: backend-platform-engineer (implementation) or systematic-debugging (investigation).
- Hands off to: performance-analysis (if perf issue), observability (monitoring), production-readiness (runtime config).
Node.js runtime risks
| Risk | Symptom | Detection | Fix |
| Event loop blocking | All requests slow simultaneously | Event loop lag metric > 100ms | Move CPU work to worker threads or separate process |
| Unhandled promise rejection | Silent failure, missing data | unhandledRejection handler + logging | Always await or catch; add process handler as safety net |
| Memory leak | RSS grows over hours/days | RSS metric trending up over 24h | Heap snapshot analysis; check caches, listeners, closures |
| Unbounded concurrency | Dependency overwhelmed | Connection pool exhaustion, timeout spikes | Semaphore/queue limiting concurrent requests |
| Missing cancellation | Work continues after request abandoned | CPU/memory usage without matching traffic | AbortController for HTTP calls; cancel tokens for async chains |
| Bad shutdown | Jobs lost, connections leaked | Restart produces duplicate work or errors | SIGTERM handler: stop accepting, drain in-flight, close pools |
Shutdown implementation pattern
process.on('SIGTERM', async () => {
server.close(); // Stop accepting new connections
await drainInFlightRequests(); // Wait for current requests (with timeout)
await closeConnectionPools(); // DB, Redis, etc.
await flushTelemetry(); // Send remaining spans/metrics
process.exit(0);
});Concurrency control pattern
// BAD: unbounded concurrent external calls
const results = await Promise.all(items.map(i => callExternalAPI(i)));
// GOOD: bounded concurrency
import pLimit from 'p-limit';
const limit = pLimit(10); // max 10 concurrent
const results = await Promise.all(items.map(i => limit(() => callExternalAPI(i))));Red flags
- No
unhandledRejectionhandler registered. Promise.allon unbounded arrays calling external services.- No timeout on any HTTP client call.
setIntervalwithout cleanup in graceful shutdown.- Global mutable state shared across requests.
JSON.parseon user input without size limit.
Output format
- Runtime risk summary (critical / moderate / low)
- High-risk patterns found (with file/location if possible)
- Concurrency assessment (bounded? backpressure present?)
- Shutdown assessment (graceful? tested?)
- Memory risk (leaks, unbounded caches, growing listeners?)
- Resilience improvements (prioritized, concrete)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

