explore-architecture/SKILL.md
Search an indexed codebase to find architectural friction and surface module-deepening candidates. Use after index-codebase has run, when the user asks to find refactoring opportunities, identify shallow modules, assess coupling, or improve testability. Do NOT use for greenfield architecture design, performance optimization, or before the codebase is indexed with codemogger.
npx skillsauth add sanurb/skills explore-architectureInstall 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.
Use codemogger semantic/keyword search and git co-change analysis to find architectural friction. Output a numbered list of deepening candidates with quantitative evidence.
A deep module (Ousterhout) has a small interface hiding a large implementation. This skill finds shallow modules that should be deepened.
Run the co-change analysis script against the target repo:
bash <skill-dir>/scripts/co-change-analysis.sh <path-to-repo>
Then run targeted codemogger searches to detect coupling patterns:
npx codemogger search "shared types imported across modules"
npx codemogger search "wrapper adapter delegate"
npx codemogger search "interface implementation"
Use keyword mode for precise identifier lookups when you spot a suspicious type or function:
npx codemogger search "TypeName" --mode keyword
If zoekt is indexed, use it for regex and boolean queries:
zoekt 'sym:InterfaceName'
zoekt 'file:test -file:fixture error handling'
For each friction signal found, cross-reference co-change data with search results. Look for:
Classify each candidate's dependency category using the decision tree:
I/O involved?
├─ No → in-process (merge directly)
└─ Yes
├─ Local stand-in exists? → local-substitutable
└─ No
├─ You own the service? → ports-adapters
└─ No → mock-boundary
Output the candidate list in the exact format specified below. Do NOT propose interfaces — only list candidates. Ask which to explore.
## Deepening Candidates
### 1. [Cluster name]
- **Modules**: `path/to/a`, `path/to/b`
- **Coupling**: [shared types | co-change N times | M cross-references]
- **Category**: [in-process | local-substitutable | ports-adapters | mock-boundary]
- **Test impact**: [which tests become redundant at boundary]
- **Depth gain**: [interface surface shrink vs implementation absorbed]
### 2. [Cluster name]
...
Which candidate would you like to explore?
| Script | Purpose |
|--------|---------|
| scripts/co-change-analysis.sh | Detect files that frequently change together via git history |
development
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub, GitLab, fp, or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `fp-plan`, `fp-implement`, `fp-review`, `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
development
Build a throwaway prototype to flush out a design before committing to it. Routes between two branches — a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route. Use when the user wants to prototype, sanity-check a data model or state machine, mock up a UI, explore design options, or says "prototype this", "let me play with it", "try a few designs".
tools
Control herdr (a terminal-native agent multiplexer) from inside it. Manage workspaces and tabs, split panes, spawn sibling agents, read pane output, and wait for state changes — all via CLI commands that talk to the running herdr instance over a local unix socket. Use when running inside herdr (HERDR_ENV=1). Do not use outside herdr.
documentation
Compact the current conversation into a handoff document for another agent to pick up.