- Home
- Skills
- Code Quality & Review
- JS ImportShield — Static AST Circular Dependency Auditor
Works with the AI Agents you already use
JS ImportShield — Static AST Circular Dependency Auditor
Finds the exact circular require cycle, root instance leak, and duplicate router registration that freezes Node.
$5
JS ImportShield — Static AST Circular Dependency Auditor
Example session with this skill installed
// Combined input sample showing structural dependency issues
// Live run: root instance leak, sibling route imports, and a circular chain.
const app = require('../app');
const OrderService = require('../services/orderService');
const UserHandler = require('./user');
const Order = require('../models/order');
class OrderHandler {
constructor() {
this.service = new OrderService();
}
create(payload) {
return this.service.create(payload);
}
}
module.exports = OrderHandler;
- Read your context and instructions
- Compiled the js importshield
{
"audit_status": "CRITICAL",
"findings": [
{
"id": "f1",
"file": "live/scan1.js",
"line": 2,
"severity": "HIGH",
"signature": "ROOT_INSTANCE_IMPORT",
"message": "leaf module imports the root application instance from '../app'",
"snippet": "const app = require('../app')"
},
{
"id": "f2",
"file": "live/scan1.js",
"line": 4,
"severity": "MEDIUM",
"signature": "SIBLING_ROUTE_IMPORT",
"message": "route module imports from a sibling route module './user'",
"snippet": "const UserHandler = require('./user')"
},
{
"id": "f3",
"file": "project_root",
"line": 0,
"severity": "HIGH",
"signature": "CIRCULAR_IMPORT_CHAIN",
"message": "cycle across 3 files: routes/order.js -> services/orderService.js -> models/order.js -> routes/order.js",
"snippet": "project root scan"
}
],
"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 fighting silent dependency corruptions, empty object modules, and cryptic startup freezes. JavaScript Import Shield is a static AST-driven linter that detects structural dependency loops across your repository before they break your Node.js runtime environment.
In JavaScript and TypeScript backend architectures (Express, Koa, Fastify, NestJS), circular modules rarely fail loudly—they silently emit partial objects or freeze server initialization execution boundaries, spinning up tracebacks that mask the actual root cause. This skill isolates the architectural root defect and returns a strict, machine-readable JSON report mapping the exact dependency cycle.
What it does
- Circular Dependency Tracking: Traces module resolution trees to isolate multi-file require/import loops (File A → File B → File C → File A).
- Root Instance Extraction: Identifies and flags leaf modules attempting to require/import core primitives (app, server) directly from the application entrypoint.
- Duplicate Router Validation: Traverses routing definitions to capture identical framework routes mounted multiple times across middleware layers.
- Sibling Route Inspection: Flags structural cross-contamination where localized route controllers perform direct imports from sibling module blocks.
- Scattered Register Auditor: Aggregates manual route registers scattered haphazardly across the repository to enforce standardized single-aggregator layouts.
When to use
- Your Node.js application hangs completely on launch with an unhandled runtime error or an ambiguous stack trace.
- Onboarding automated coding agents to execute massive refactoring tasks across large modular repositories.
- Re-architecting legacy applications to break up sprawling module boundaries or routing tracks.
When NOT to use
- Scanning lightweight single-file prototypes or automation scripts under 300 total lines of code (where loops cannot physically occur).
- Non-JavaScript technology stacks (this linter is strictly optimized for JS/TS AST constructor tracking).
- Executing automatic file-writing or repository modification routines (this guard functions strictly in an advisory, read-only mode).
Under the Hood & Security
- 100% Local & Air-Gapped: Operates entirely within your local environment buffer (file_system_write: false). Zero external cloud dependencies ensure proprietary system prompts and internal 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.
Static graph analysis constraints only. Evaluates literal imports, require definitions, and path layouts without executing local runtimes or writing automated patches. Dynamic require statements containing active variables are bypassed. Heuristic root tracking isolates constructors and skips loops or programmatic factory setups. Scans are ignored on micro-scripts under 300 total lines.
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 23 days ago
- Software
Node.js
Permissions
File Scopes
Read-only sandbox access to local JavaScript and TypeScript files. Maps graph architectures completely offline with absolute zero data collection or tracking overhead.