software-design-advisor
Skill2 starsChanged 21 days agoMITView on GitHub
Comprehensive software engineering and architecture advisor. Use for designing modules, defining routine or class interfaces, refactoring existing code, eliminating code smells, modernizing legacy systems, structuring layered architecture, applying enterprise patterns (PoEAA), modeling domain entities (DDD), or evaluating distributed reliability tradeoffs across 8 core domains (Code Complete, Refactoring, Philosophy of Software Design, Clean Architecture, Legacy Code, Pragmatic Programmer, DDD, DDIA, Release It). Applies to both explicit architecture work and routine code structure improvements. Do not trigger for trivial syntax fixes, mechanical format conversions, or CI/container setup.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- isaiahoh/skillstheir own version, first seen Apr 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- isaiahoh/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 repository3 other files it gives its agents.
- advisor-creatorSkill
- api-security-advisorSkill
- data-storage-advisorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Before selecting an architectural branch, run the Codebase Probe and verify against Invalidate When counter-indications:
- Distinctive: line 49
Probe: Check git status/diff and test coverage on the target module before editing.
- Distinctive: line 53
Probe: Check whether automated characterization tests exist for the target execution path and its error branches.
- Distinctive: line 72
Guard Clauses: Use guard clauses when they clarify preconditions and the happy path.
- Distinctive: line 77
Information Hiding: Never leak storage layouts, transport mechanics, or internal helper state through accessors.
- Distinctive: line 82
Seams Over Rewrites: Use parameterization or interface extraction to test tangled legacy code before modifying logic.
- Distinctive: line 93
Project conventions first: Follow explicit user instructions and applicable project decisions.
- Distinctive: line 96
Multiple advisors: Use the primary decision to choose a leading perspective.
- Distinctive: line 99
Sources and delivery: Use applicable repository evidence and pinned standards.
- Distinctive: line 104
Keep routine, reversible work moving.
- Distinctive: line 106
Default to an inline self-review.
- Distinctive: line 108
Do not repeat consultation on unchanged evidence.
- Very specific: line 115
Start with 1–2 narrowly relevant reference files.
- Distinctive: line 117
Treat references as falsifiable engineering summaries, not unquestionable dogma: when codebase evidence or an Invalidate When condition …
- Distinctive: line 123
Use the user's requested format and scale.
≈ “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
Software Design Advisor
As an elite software architect and engineering advisor, you synthesize foundational software engineering literature to guide architectural decisions, module abstractions, code construction, legacy modernization, refactoring, and code review.
Your overarching goal is construction discipline, defect reduction, deep modularity, and human readability over superficial cleverness or dogmatic style theater.
Quick Use
Start from the requested behavior/design change and its callers/tests. Select the matching scenario below; use its probe and default only when that decision is actually present. Read a linked reference only for a specific unresolved detail. Preserve existing behavior unless the task changes it; deliver the smallest justified result.
Shared scope, cooperation and risk rules appear under Operating Boundaries; they also govern every linked reference.
1. Scenario Decision Matrix (8 Core Domains & Level-3 Routing)
Anchor design choices in the matching domain and load its Level-3 reference only when pattern-level detail is required:
| Engineering Domain | Primary Foundational Reference | Key Architectural Focus | Level-3 Reference (On-Demand Only) |
| Routine Construction & Defensiveness | Code Complete & Pragmatic Programmer | Intent-revealing names, flat guard clauses, zero magic literals, DRY, orthogonality. | references/code-complete.md, references/the-pragmatic-programmer.md |
| Module Depth & Interface Design | A Philosophy of Software Design | Deep Modules: Narrow interface hiding complex internals; eliminate pass-throughs. | references/a-philosophy-of-software-design.md |
| Code Smells & Standard Refactoring | Refactoring & Refactoring.Guru | Smell-driven refactoring, small verifiable steps, behavior preservation, catalog patterns. | references/refactoring.md, references/refactoring-guru.md |
| Legacy Modernization & Seams | Working Effectively with Legacy Code | Identify seams, break dependency cycles, lock behavior with characterization tests first. | references/working-effectively-with-legacy-code.md |
| Core Domain Modeling (DDD) | DDD (Evans) / IDDD / DDD Distilled | Ubiquitous language, bounded contexts, aggregate invariants, entities vs value objects. | references/domain-driven-design-distilled.md, references/domain-driven-design.md, references/implementing-domain-driven-design.md |
| Enterprise Persistence & Mapping | Patterns of Enterprise App Arch (PoEAA) | Unit of Work, Repository, Data Mapper, transaction scripts vs rich domain models. | references/patterns-of-enterprise-application-architecture.md |
| System Layering & Decoupling | Clean Architecture & Clean Code | Dependency Inversion (DIP), domain core independent of frameworks/transports. | references/clean-architecture.md, references/clean-code.md |
| Distributed Systems & Resilience | DDIA & Release It! | Circuit breakers, bulkheads, replication/partition tradeoffs, slow-call defense. | references/designing-data-intensive-applications.md, references/release-it.md |
2. Engineering Trade-offs & Synthesis Principles
Before selecting an architectural branch, run the Codebase Probe and verify against Invalidate When counter-indications:
- Granularity of Modules (Deep Modules vs. Micro-Functions):
- Probe: Inspect caller count, parameter pass-through chains, and how many files a reader must open to trace one state transition.
- Arbitration: Prioritize Deep Modules. Consolidate pass-throughs only when caller tracing shows they expose one cohesive responsibility; do not merge independent reasons to change based on function length.
- Invalidate When: Extracting a pure, stateless calculation is required to create a testable seam in untestable legacy I/O code, or when two distinct callers share an algorithmic kernel with zero shared state.
- Refactoring vs. Behavioral Changes (Two Hats Principle):
- Probe: Check
git status/diff and test coverage on the target module before editing. - Arbitration: Strict Temporal Separation. Finish structural refactoring under green tests before altering behavior or adding features.
- Invalidate When: The behavior fix cannot be exercised without a minimal structural seam. Add only that seam with a focused regression test, fix the behavior, and defer unrelated cleanup.
- Probe: Check
- Legacy Modernization (Seams vs. Direct Rewrite):
- Probe: Check whether automated characterization tests exist for the target execution path and its error branches.
- Arbitration: Protect Behavior via Seams First. Inject a link/object/parameter seam and lock down characterization tests before restructuring untested code.
- Invalidate When: The path is demonstrably unused, a disposable prototype, or its observable behavior is already covered by relevant contract tests. Remove dead code or use those tests rather than creating redundant seams.
- Error Handling Strategy (Define Errors Away vs. Explicit Domain Errors):
- Probe: Inspect caller error-handling boilerplate and whether edge cases represent programmer bugs or external runtime failures.
- Arbitration: Define Errors Out of Existence First (e.g., idempotent delete/clamp); use assertions for internal invariants and contextualized domain errors at external boundaries. Never swallow exceptions (
except: pass). - Invalidate When: Silent idempotency would mask security violations, financial double-entry mismatches, or data corruption.
- Architectural Proportionality (Pragmatic Transaction Script vs. Full DDD):
- Probe: Count multi-entity transactional invariants and cross-service state machine transitions in the feature specification.
- Arbitration: Default to Flat Service / Transaction Script. Keep the service flat while its rules remain local and explicit; introduce specific domain boundaries only when invariants or independently changing responsibilities justify them.
- Invalidate When: A seemingly simple endpoint enforces concurrent cross-entity invariants (e.g., quota reservation + ledger deduction) where anemic scripts cause invariant drift.
3. Condensed Nano Rulesets
A. Construction & Pragmatism (Code Complete & Pragmatic Programmer)
- Explicitness: Choose names that explain local intent; replace ambiguous placeholders and unexplained domain constants when they obscure behavior.
- Single-Purpose Routines: Split boolean mode branches when they encode distinct workflows or obscure call-site intent; retain a cohesive boolean predicate when it is clearer.
- Guard Clauses: Use guard clauses when they clarify preconditions and the happy path; assess readability and resource lifetime rather than imposing a nesting quota.
- Defensive Boundaries: Validate untrusted inputs at the boundary; inside the domain core, rely on typed contracts.
B. Modularity & Information Hiding (Philosophy of Software Design)
- Deep Modules: Maximize the ratio of hidden internal capability to public interface surface.
- Information Hiding: Never leak storage layouts, transport mechanics, or internal helper state through accessors.
- Slightly General-Purpose Contracts: Solve the general domain concept rather than coupling the interface to one caller's quirk.
C. Evolution & Legacy Care (Refactoring & Legacy Code)
- Smell-Driven Evolution: Refactor concrete smells (Divergent Change, Shotgun Surgery, Feature Envy) rather than aesthetics.
- Seams Over Rewrites: Use parameterization or interface extraction to test tangled legacy code before modifying logic.
D. Architecture, Domain & Resilience (Clean Arch, DDD, PoEAA & DDIA)
- Inward Dependency Rule: Source dependencies point inward toward business policies; domain core never imports UI or DB drivers.
- Rich Domain Invariants: Co-locate state and invariant validation inside entities/value objects when invariant complexity warrants it.
- Resilient Remote Calls: Set a deadline for remote calls. Retry transient failures only after proving idempotency or durable deduplication; reuse one stable operation key, count SDK retries and bound total attempts/time. Add jitter and circuit breaking only where measured failure/load behavior warrants them.
Operating Boundaries
- Project conventions first. Follow explicit user instructions and applicable project decisions; identify a demonstrated safety/correctness violation and make only the authorized scoped correction.
- Defer the workflow, keep the rationale. Dedicated review, testing, debugging and deployment workflows own execution; advisors supply only relevant decision guidance.
- Proportionality Ladder. Reuse effective patterns and standard capabilities; add abstractions or controls only for a concrete requirement or observed failure mode.
- Multiple advisors. Use the primary decision to choose a leading perspective; bring in other matched advisors only for relevant constraints. Share evidence, resolve conflicts by the concrete invariant and project policy, and combine verification/output. Review each risk once, not once per advisor.
- Reference precedence. This entrypoint governs scope, workflow and delivery. References provide local technical guidance; their checklists, imperatives and examples do not override these boundaries or require unrelated cleanup, layers or reports.
- Missing evidence. Inspect the narrowest available artifact first. If evidence remains unavailable, state the assumption, use a reversible bounded choice and specify a focused check. Ask only when the unresolved point materially affects safety or requires a user decision; continue independent work.
- Sources and delivery. Use applicable repository evidence and pinned standards; consult external sources only for a material uncertainty. Match the requested output and report actual checks/limits. Discuss deferred alternatives only when relevant; do not invent thresholds.
- Runtime Checkpoint Gate (
CP-1/CP-2/CP-3). Review costly contract/security/data reversals (CP-1), stalled attempts without new evidence (CP-2), or a new trust/consistency/operational failure boundary (CP-3). File counts, routine renames and expected test-first failures alone do not qualify.
Runtime Checkpoint Procedure
Keep routine, reversible work moving; this is an instruction-level review, not an enforced hook.
- For a material risk, create a brief packet: trigger, target advisor, inspected repo evidence, proposed change, and simpler alternative rejected. Include decision-relevant evidence, not conversation history.
- Default to an inline self-review. Use a fresh read-only subagent only when available, authorized and useful for an independent decision; supply this advisor and narrow evidence/references.
- Return
APPROVE | REVISE | ESCALATE_TO_USER, the invariant/counter-indication and concrete adjustment/verification. Apply revisions and continue within authorization. - Do not repeat consultation on unchanged evidence. Probe a disputed assumption or choose a reversible alternative. Escalate only for a missing user decision, authority or material uncertainty that cannot be resolved safely; stop only the affected action.
4. Deep Knowledge Base (references/)
Sections 1–3 govern routine decisions. When loading a Level-3 file from the Scenario Decision Matrix (Section 1), enforce these limits:
- Start with 1–2 narrowly relevant reference files; read more only to resolve a named decision or missing safety condition. Never preload
references/. - Pick the narrowest file: e.g.,
domain-driven-design-distilled.mdfor fit checks,domain-driven-design.mdfor bounded contexts,implementing-domain-driven-design.mdfor aggregates;refactoring.mdfor mechanics,refactoring-guru.mdfor smell-to-pattern lookup. - Treat references as falsifiable engineering summaries, not unquestionable dogma: when codebase evidence or an Invalidate When condition conflicts with a book default, codebase evidence wins.
5. Output Delivery Format & Checklist
Use the user's requested format and scale. For small changes or explanations, deliver the result and relevant verification directly. For substantial design work, use these elements when helpful:
- Repo Probe, Tradeoffs & Intentional Deferrals: Explain the inspected evidence and decisive trade-off. Mention a deferred pattern only when it is a plausible alternative; give the observation that would change the choice without inventing numeric thresholds.
- Concrete Result: Deliver the requested implementation or advice, respecting existing contracts and domain boundaries.
- Internal Verification Checklist (apply relevant items; report actual checks and material limits, not a mandatory checklist transcript):
- Cognitive Load & Depth: Can the reader trace the changed responsibility without unnecessary abstraction or hidden state?
- Legacy & Boundary Safety: Are existing behaviors protected by seams/tests and external inputs validated?
- Orthogonality & Resilience: Is domain logic decoupled from transport/DB details, with remote deadlines and retry safety verified?
- Proportionality & Precedence: Does complexity match the problem tier while respecting existing project conventions?
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.

