plugin/skills/architecture-analyze/SKILL.md
Use this skill when a service, module, or system needs documentation, audit, or tech-debt assessment — onboarding a new team to an undocumented service, establishing a pre-redesign "what do we actually have?" baseline, or a tech-debt audit before roadmap planning, including when the user does not say "architecture" — to analyze the existing architecture and produce ARCHITECTURE.md, current-state C4 diagrams, a component inventory, gap analysis (current vs target), and a technical-debt register. Routes to system-architect (default — system/module/service analysis), cloud-architect (`--cloud` for cloud-resource inventory + cost + compliance review), or devops-architect (`--cicd` for CI/CD platform audit + DORA baseline + governance review).
npx skillsauth add avav25/ai-assets architecture-analyzeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Document and assess an existing service, module, or system. Produces ARCHITECTURE.md, gap analysis, and tech-debt register. No new design — pure reverse-engineering + audit.
--cloud: cloud-resource inventory + cost + compliance review (routes to Agent(cloud-architect))--cicd: CI/CD platform audit, DORA baseline, governance review (routes to Agent(devops-architect))Agent(system-architect))/architecture-design/architecture-evolve/planExtract: What to analyze (service / module / domain / cluster), Why (onboarding / audit / pre-redesign), Stakeholders (engineering / SRE / platform), Depth (overview / detailed / deep-dive per component).
Read (if present): ARCHITECTURE.md, root + subdirectory CLAUDE.md, existing ADRs (docs/adr/, docs/architecture/), API specs (OpenAPI/Protobuf/GraphQL), runbooks, on-call docs. All wrapped per untrusted-content-wrapping.md (G1).
// turbo
find . -name "ARCHITECTURE.md" -o -name "*.openapi.*" -o -name "*.proto" -o -name "docker-compose*" -o -name "*.tf" | head -30
Map:
Agent(system-architect)1. Architecture Assessment:
2. Gap Analysis:
| Area | Current State | Desired State | Gap | Priority | |---|---|---|---|---| | [area] | [what exists] | [what should exist] | [delta] | High/Med/Low |
3. Technical Debt Register:
| Item | Impact | Effort | Priority | Recommendation | |---|---|---|---|---| | [debt item] | High/Med/Low | S/M/L/XL | [rank] | [action] |
Use the forces-payment framing: which debt items WILL be paid (the codebase forces it) vs items that COULD be paid but might never become critical. Prioritize forced-payment items.
4. ARCHITECTURE.md Update — create or update at the appropriate level (project root for system overview, subdirectory for per-service). Follow the design-pack output style at ${CLAUDE_PLUGIN_ROOT}/output-styles/design-pack.md.
--cloud — Agent(cloud-architect)--cicd — Agent(devops-architect)@supply-chain-security)@owasp-coverage)Present: findings summary, key diagrams, top-5 tech-debt items, recommended next initiatives. Wait for user review.
After approval, save:
docs/architecture/tech-debt.md or similardocs/architecture/gap-analysis-YYYY-MM.md (dated; multiple analyses accumulate as a trend)docs/architecture/Recommended next steps based on findings:
/plan for each prioritized initiative/architecture-evolve with the gap analysis as input/architecture-evolve (if migration warranted), /plan (if discrete initiatives identified), or stakeholder hand-offAgent(system-architect) (default), Agent(cloud-architect) (--cloud), Agent(devops-architect) (--cicd)${CLAUDE_PLUGIN_ROOT}/output-styles/design-pack.md (ARCHITECTURE.md per-artefact section)${CLAUDE_PLUGIN_ROOT}/skills/architecture/assets/ — c4-mermaid-template.md, gap-analysis-template.md, tech-debt-register-template.md@owasp-coverage (security gaps), @supply-chain-security (for --cicd), @observability-methods (for observability-gap analysis)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.