architecture-analysis
Skill0 starsChanged 5 months agoMITView on GitHub
This skill should be used when the user asks to "check architecture", "Architektur prüfen", "find circular dependencies", "zirkuläre Abhängigkeiten", "run dependency-cruiser", "enforce layer/import rules", "module boundaries", "Abhängigkeitsgraph", or wants to validate the dependency structure of a JS/TS codebase. Runs dependency-cruiser in Docker and drives violations to zero, processed directly in Claude Code.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- juandelossantos/another-agent-skillstheir own version, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- juandelossantos/another-agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- bearer-privacySkill
- build-verifySkill
- code-audit-suiteSkill
- dast-runtimeSkill
- kubescape-k8sSkill
- license-complianceSkill
- megalinter-qualitySkill
- opengrep-sastSkill
- secrets-scanSkill
- sonarqube-qualitySkill
- trivy-securitySkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
If the project has no .dependency-cruiser.{cjs,js,json}, the scan uses a bundled default ruleset (no-circular = error, no-orphans = warn) …
- Distinctive: line 34
Orphan: delete dead code or wire the module in.
- Very specific: line 50
Add forbidden/allowed/required rules.
≈ “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
Architecture Analysis
Purpose
Enforce the intended dependency structure of a JS/TS codebase — circular dependencies, orphan modules, and declared layer/import boundaries (e.g. "the UI layer must not import from the data layer directly"). This is structural analysis SonarQube does not do for JS/TS.
Scope / no double coverage: this skill targets JS/TS via
dependency-cruiser. JVM/architecture-level analysis is intentionally not
duplicated here — SonarQube Server's built-in Architecture feature (the
former Structure101 engine, acquired by Sonar) already covers that, so use the
sonarqube-quality skill for JVM architecture.
Core Workflow (drive to zero)
- Analyze:
If the project has no~/.claude/skills/architecture-analysis/scripts/scan.sh [TARGET_DIR].dependency-cruiser.{cjs,js,json}, the scan uses a bundled default ruleset (no-circular = error, no-orphans = warn) mounted read-only into the container — it is never written into your repo. - Fix violations:
- Circular dependency: break the cycle — extract a shared module, invert a dependency, or introduce an interface.
- Orphan: delete dead code or wire the module in.
- Layer/import rule: route the dependency through the allowed boundary.
- Re-run until
RESULT: PASS.
Defining real architecture rules
The bundled default ruleset is only a starting point. To enforce real layering,
create your own .dependency-cruiser.cjs in the project root (it is used instead
of the default when present), e.g.:
{ name: 'ui-not-to-db', severity: 'error',
from: { path: '^src/ui' },
to: { path: '^src/data' } }Add forbidden/allowed/required rules; dependency-cruiser fails the run on
any error-severity match.
Notes
- The npm cache is persisted in the
depcruise-npmDocker volume; the first run downloads dependency-cruiser + typescript, later runs are fast. - Source directories are auto-detected (
src,lib,app,source,packages); falls back to the whole project. - For a visual graph, set
DEPCRUISE_OUTPUT_TYPE=dot(ormermaid/json). This is review-only, printed in addition to the gate — the pass/fail verdict is ALWAYS derived from an internalerr-longrun (the graph reporters exit 0 even when there are violations, so they must never be the gate signal).
Resources
scripts/scan.sh— runs dependency-cruiser against a JS/TS project (source tree mounted read-only); uses a bundled read-only default ruleset (never written into the repo) unless the project ships its own; exit 1 on violations. Skips cleanly when there is no real JS/TS source.scripts/default.dependency-cruiser.cjs— the bundled default ruleset.
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.

