- Home
- Skills
- Code Quality & Review
- JS Architecture Advisor — Static AST Pattern Auditor
Works with the AI Agents you already use
JS Architecture Advisor — Static AST Pattern Auditor
Scans your Node.js codebase, names the exact architectural anti-pattern, and shows the design pattern that fixes it.
$19.99
JS Architecture Advisor — Static AST Pattern Auditor
Example session with this skill installed
// Combined entry and handler sample showing structural vulnerabilities
const express = require('express');
const fs = require('fs');
const app = express();
const users = require('./routes/users');
const orders = require('./routes/orders');
const billing = require('./routes/billing');
const webhooks = require('./routes/webhooks');
const admin = require('./routes/admin');
const reports = require('./routes/reports');
app.use('/users', users);
app.use('/orders', orders);
app.use('/billing', billing);
app.use('/webhooks', webhooks);
app.use('/admin', admin);
app.use('/reports', reports);
app.post('/chat', async (req, res) => {
const userId = req.body.userId;
const config = fs.readFileSync('./config.json', 'utf8');
res.json({ userId, config });
});
module.exports = app;
- Read your context and instructions
- Compiled the js architecture advisor
{
"audit_status": "CRITICAL",
"findings": [
{
"id": "f1",
"file": "live/scan1.js",
"line": 16,
"severity": "HIGH",
"signature": "MONOLITHIC_DISPATCHER",
"message": "6 explicit app.use calls in the entry file",
"snippet": "app.use('/users', users)"
},
{
"id": "f2",
"file": "live/scan2.js",
"line": 6,
"severity": "HIGH",
"signature": "RAW_BODY_BOUNDARY",
"message": "req.body.userId accessed without a schema validator",
"snippet": "const userId = req.body.userId"
},
{
"id": "f3",
"file": "live/scan2.js",
"line": 7,
"severity": "HIGH",
"signature": "BLOCKING_IO_IN_ASYNC",
"message": "fs.readFileSync called inside an async function - blocks the event loop",
"snippet": "const config = fs.readFileSync('./config.json', 'utf8')"
}
],
"metadata": {
"version": "1.0.0",
"timestamp": "2026-10-15T12:00:00Z",
"files_scanned": 2,
"calls_found": 3
}
}
Connects securely to your tools. The creator never sees your data.
About this skill
Stop debugging unexpected asynchronous stalls and runtime type crashes in production. JS Architecture Advisor is a static AST-driven linter that detects structural decay across Node.js repositories before it morphs into high-severity backend incidents.
It executes deterministic static analysis via Abstract Syntax Tree (AST) parsing to isolate five systemic architectural flaws, mapping each violation directly to its proven enterprise design pattern solution.
What it does
- Automated Anti-Pattern Audit: Deep-scans modules to instantly isolate cyclic dependencies, event loop bottlenecks, and architectural decay.
- Deterministic AST Signatures: Evaluates JavaScript and TypeScript code structures against five rigid compliance rules, discarding heuristic guessing.
- Production-Risk Mapping: Quantifies architectural liabilities, surfacing critical threats like Node event loop starvation or silent production TypeError crashes.
- Machine-Readable Telemetry: Outputs a strict, schema-validated JSON report optimized for IDE buffers, local git hooks, or CI/CD pipelines.
Detected Structural Vulnerabilities
- MONOLITHIC_DISPATCHER: Excessive explicit route registrations expanding inside entrypoints (app.js/server.js), triggering severe version control merge conflicts.
- RAW_BODY_BOUNDARY: Direct property extraction on unvalidated network boundaries (req.body), causing raw runtime type crashes due to shifting payloads.
- BLOCKING_IO_IN_ASYNC: Synchronous disk operations (fs.readFileSync) executed directly inside an asynchronous request handler, completely freezing the Node.js event loop.
- FRAGMENTED_ENV_READS: Disparate process.env lookups scattered haphazardly across leaf modules, breaking secret rotation pipelines.
- CIRCULAR_ROOT_IMPORT: Interlocking dependency loops where leaf components attempt to require/import primitives back from the primary server entrypoint script.
When to use
- Conducting pre-feature repository evaluations before onboarding automated coding agents.
- Standardizing architecture rules across distributed Express, Koa, Fastify, or NestJS codebases.
- Identifying the root structural cause behind chaotic, unmanageable app.js or server.js files.
When NOT to use
- Initiating end-to-end automated codebase refactoring or file-writing routines (this linter is strictly read-only).
- Linting early prototypes or simple automation scripts under 300 total lines of code.
Under the Hood & Security
- 100% Local & Air-Gapped: Operates fully within local memory buffers (file_system_write: false). Zero outbound network connections ensure proprietary engineering prompts and corporate source code never leak.
- Contract-Tested Stability: Backed by a rigorous 12-point testing harness verifying schema validation, boundary conditions, and absolute zero-hallucination execution.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Operates under static analysis constraints only. Parses source code structures without executing runtime dependency resolution or package compilation. The engine focuses exclusively on structural architectural patterns and does not monitor dynamic event-loop execution metrics or active network traffic.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 month ago
- Software
Node.js
Permissions
File Scopes
Read-only sandbox access to local JS/TS modules. Generates structural telemetry completely offline with zero risk of corporate code extraction or data leakage.