testdouble/han/architectural-analysis
Claude Code and agent skill by testdouble/han
- community
Checking that the SKILL.md file is still in the repository.
Performs deep architectural analysis of a specified module, directory, or feature area by examining structural coupling, data flow, concurrency patterns, risk, and SOLID alignment. Use when the user wants to assess, evaluate, or review the architecture, design quality, dependency structure, coupling, cohesion, or technical debt of an existing part of the codebase. Not for investigating specific bugs, runtime errors, or failures — use investigate. Not for test planning — use automated-test-planning. Not for file-level code review — use code-review. Not for researching open-ended options, prior art, or how something works — use research. Not for designing a new interface or contract — use design-an-api. Not for planning the change its findings imply — use plan-a-change. Not for discovering bounded contexts, ubiquitous language, or where code boundaries diverge from domain boundaries — use ddd-analysis. Not for writing documentation or architectural decision records.
Install
npx vskill@latest install testdouble/han/architectural-analysisSKILL.md
The same SKILL.md was published earlier as testdouble/han/architectural-analysis.
Project Context
- git installed: !
which git 2>/dev/null || echo "not installed" - CLAUDE.md: !
find . -maxdepth 1 -name "CLAUDE.md" -type f - project-discovery.md: !
find . -maxdepth 3 -name "project-discovery.md" -type f - personal config directory: !
bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude" - project .han/config.md: !
cat .han/config.md 2>/dev/null || echo ""
As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md probe supplies content, apply it per config-rule.md, which governs precedence between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.
Operating Principles
Read these before dispatching anything. They constrain every step below.
- A focus area is required. This skill analyzes a specific module, directory, or feature. "Analyze the whole
codebase" is not a valid input. If no focus area resolves to real files, stop and ask the user to name one.
- The agents own the judgment; the skill orchestrates. The skill validates the focus area, classifies size, selects
the roster, fans agents out and in, and renders the report. It does not produce findings itself.
- The discovery roster is signal-selected; the synthesis spine always runs.
han-core:structural-analyst,
han-core:behavioral-analyst, han-core:risk-analyst, and han-core:software-architect run at every size BECAUSE structure, runtime behavior, risk-of-inaction, and SOLID synthesis are the irreducible core of an architectural read. Every other specialist is added only when the focus area's signals warrant it and the size band allows it, BECAUSE dispatching an agent whose domain the code does not touch burns tokens and dilutes the report with low-signal findings.
- Default to small. Start classification at small and escalate only when a higher-band signal is clearly present.
Borderline signals stay at the smaller band. Under-dispatching is recoverable by re-running at a larger size; over-dispatching is not.
- Recommendations, not refactors. The skill never modifies code.
han-core:software-architect(and
han-core:system-architect when dispatched) produce pseudocode sketches for proposed boundaries. Implementation is a separate, later step.
- Negative results are valuable. When a dimension is genuinely clean (no concurrency in a pure-functional module,
sound boundaries), the report says so. Agents must not fabricate findings to fill a section.
- Single pass, no iteration round. This skill is a fan-out / fan-in, not an iterative loop. If a band proves too
small, the user re-runs at a larger size — the skill does not self-escalate mid-run.
- System-altitude work is deferred by default.
han-core:software-architectdefers cross-service / bounded-context
/ trust-boundary findings rather than absorbing them. han-core:system-architect is added to the roster only at large size and only when a boundary-crossing seam is actually present. When it is not dispatched, those deferrals are surfaced in the report so the user can dispatch han-core:system-architect separately.
- **The report template lives at
references/architectural-analysis-report-template.md.** The skill renders that template by filling placeholders and removing the sections whose agent was not dispatched. It does not invent a structure inline.
- The synthesized report is written for a named reader. As the skill writes the final report's synthesized prose, it
sources the shared standard by invoking han-communication:readability-guidance and applies it, holding one audience above the writing: the engineer weighing the module's design and deciding whether to change it. Scope that frame per section so the technical specifics that reader needs — file paths, finding IDs, exact conditions, pseudocode — are preserved, never simplified away.
Run an Architectural Analysis
Step 1: Validate the Focus Area and Resolve Project Context
Bind `$size`. If the user passed small, medium, large, or dynamic as the first positional argument, bind $size to it. Anything else is part of the focus-area context, not a size; bind $size to the literal none provided.
Resolve the focus area. Take the remaining argument and conversation context as the focus area. Confirm it resolves to real files using Glob and Read. Identify the boundary: which files and directories the focus area includes, and one layer of neighbors in each direction (what it imports, what imports it). If the focus area does not resolve to actual files, stop and ask the user to clarify it before going further. If no focus area was supplied at all, ask the user to name one — do not proceed against the whole codebase.
Resolve project context. If CLAUDE.md is present (see Project Context), read its ## Project Discovery section for conventions. Fall back to project-discovery.md if present. These resolve language, framework, and convention questions so the agents infer less. If neither exists, the agents fall back to surrounding-code inference — note this in the agent briefs.
Note git availability. Read the git installed value from Project Context. If it is empty or reads not installed, git is unavailable: the analysts will skip churn- and recency-based reasoning and the report must state this. If it shows a path, the analysts may use git history for churn and likelihood evidence.
State the driving concern, if any. If the user named a concern ("I suspect a race in the retry queue", "we want to split this module"), capture it. It biases every agent's attention without narrowing scope. Pass it into every brief.
Step 2: Detect Signals and Classify Size
Run targeted Grep and Glob over the focus area to detect which domains the code actually touches. These signals drive both the size band and the roster:
- Concurrency signal:
async/await, Promises, threads, goroutines, workers, channels, mutexes/locks, semaphores,
queues, Promise.all, WaitGroup, thread pools, atomic types.
- Security signal: authentication, authorization, sessions, tokens, passwords, secrets, crypto calls, PII fields,
deserialization of untrusted input, SQL/command construction from input.
- Data signal: schema or migration files, ORM models/repositories, hand-written SQL, query builders, data-pipeline
or stream/event-contract code, document-store access.
- DevOps signal: Dockerfiles, IaC (Terraform, CloudFormation, k8s manifests), CI/CD pipeline definitions,
observability/metrics/tracing wiring, retry/timeout/scaling configuration.
- System-seam signal: the focus area crosses a deployable unit or bounded-context boundary — RPC/HTTP clients to
sibling services, message brokers, shared databases across services, cross-context model imports, contested data ownership.
- Unfamiliar-area signal: the focus area is large or its internal structure is not legible from a first read, so the
discovery analysts would benefit from a map first.
Classify the size. Default to small. Escalate only when a band's signal is clearly present; when a signal is borderline, stay at the smaller band.
- Small _(default)_ — a single module or directory, contained surface, no cross-cutting concerns: no security
signal, no data signal, no DevOps signal, no system-seam signal. The concurrency signal may be present or absent.
- Medium — two or three adjacent subsystems, OR exactly one cross-cutting concern present (one of: security, data,
or DevOps signal — a single auth surface, a single data-contract, a single operational surface).
- Large — more than roughly a dozen files across multiple subsystems, OR two or more cross-cutting concerns present
together, OR a system-seam signal is present, OR $size is large.
Apply the size override. If $size is not none provided, use it: a band value is the band and skips the signal-based classification above, while dynamic forces the signal-based classification even when the project config sets a default band. If $size is none provided and the project config supplies a band via default-swarm-size (per the config rule in ../../references/config-rule.md), use that band, skip the signal-based classification, and announce the config as the source. In every case still select specialists by signal (a large band does not dispatch agents whose domain the code never touches). A conversational override ("run this large") is equivalent to $size.
Step 3: Build the Roster and Announce It
Synthesis spine — dispatched at every size:
han-core:structural-analyst— static structure: module boundaries, coupling, dependency direction, abstractions,
duplication. Emits S# findings.
han-core:behavioral-analyst— runtime behavior: data flow, error propagation, state management, integration
boundaries. Emits B# findings.
han-core:risk-analyst— scores theS/B/Cfindings for risk of inaction (likelihood, severity, blast radius,
reversibility). Emits R# items. Runs after the discovery wave.
han-core:software-architect— synthesizes all upstream findings into intra-codebase recommendations grounded in
cohesion, coupling, and SOLID, with pseudocode sketches. Emits A# items. Runs last.
Signal-selected discovery specialists — added when the signal is present and the band allows:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinghan-coding/skills/architectural-analysis/SKILL.md
Popularity
- Repository stars
- 206
- Repository forks
- 19
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 6 Aug 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/testdouble/han/architectural-analysis)