Skip to content
Skills Library
Programming · Review & audit

architecture-optimizer

/architecture-optimizer

Audit and optimize software architecture -- monoliths, modular monoliths, microservices, serverless and event-driven systems -- for module boundaries and dependency cycles, coupling/cohesion, shared databases and data ownership, transaction and consistency boundaries, synchronous call chains, timeouts/retries/idempotency, scalability and operability, SLOs/observability, deployment topology, quality-attribute trade-offs, ADRs and migration risk, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the u

Licence
MIT
Last repository change
04.11.2026

Assessment and security

85/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/audit.py

What it does and when to use it

Audit and optimize software architecture -- monoliths, modular monoliths, microservices, serverless and event-driven systems -- for module boundaries and dependency cycles, coupling/cohesion, shared databases and data ownership, transaction and consistency boundaries, synchronous call chains, timeouts/retries/idempotency, scalability and operability, SLOs/observability, deployment topology, quality-attribute trade-offs, ADRs and migration risk, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the u

Original author description

Audit and optimize software architecture -- monoliths, modular monoliths, microservices, serverless and event-driven systems -- for module boundaries and dependency cycles, coupling/cohesion, shared databases and data ownership, transaction and consistency boundaries, synchronous call chains, timeouts/retries/idempotency, scalability and operability, SLOs/observability, deployment topology, quality-attribute trade-offs, ADRs and migration risk, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the u

How it works

  1. Workflow
  2. Principles
Original SKILL.md headings · 66 lines, 755 words
SKILL.md preview
---
name: architecture-optimizer
description: Audit and optimize software architecture -- monoliths, modular monoliths, microservices, serverless and event-driven systems -- for module boundaries and dependency cycles, coupling/cohesion, shared databases and data ownership, transaction and consistency boundaries, synchronous call chains, timeouts/retries/idempotency, scalability and operability, SLOs/observability, deployment topology, quality-attribute trade-offs, ADRs and migration risk, with real before/after measurement. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions architecture review, monolith vs microservices, modular monolith, service boundaries, shared database, circular dependencies, distributed transactions/sagas/outbox, coupling, scalability, SLOs, technical debt, strangler fig, or "is this architecture good / optimize my architecture" -- even if they never say audit or optimize.
---

# Architecture Optimizer

Audit a system's architecture, report what is coupled, risky or expensive and why, agree a plan, then change it. Order: evidence, approval, edits. Architecture changes are expensive and hard to reverse; a diagram or a pattern name is not evidence. Nothing is restructured before approval.

## Workflow

### 1. Scope (quick)

- Map the system: repositories/services, deployables, data stores, synchronous and asynchronous edges, team ownership, environments, and the quality attributes that matter (latency, availability, throughput, cost, compliance, delivery speed).
- Read the existing architecture docs/ADRs/C4 if present; otherwise reconstruct the map from manifests, compose/K8s files, routes, schemas and calls.
- Run `python <skill-dir>/scripts/audit.py <repo-root>` -- static scan for dependency cycles, boundary leaks, shared databases, multiple ORMs, remote calls without timeouts, HTTP-in-loop, oversized files, missing ADRs/contracts/observability and deployment probes, with file:line evidence. Use `--json` to post-process.
- Classify the pain: slow delivery/coupling, runtime latency/reliability, data consistency, scaling/cost, security/compliance, or migration risk. Ask which hurts if unclear.
- Read `references/tooling.md` once: what can be measured here.

### 2. Audit

The script finds cheap leads; you find the rest by reading the dependency graph, the transaction boundaries and the call chains. Load only what applies:

| Area | Reference |
|------|-----------|
| Modules, layering, cycles, public APIs, monorepo boundaries | `references/module-boundaries.md` |
| Data ownership, transactions, shared DB, sagas/outbox/idempotency | `references/data-consistency.md` |
| Sync/async calls, timeouts, retries, contracts, gateways | `references/distributed-systems.md` |
| Scaling, queues/backpressure, SLOs, observability, deployment | `references/scalability-operability.md` |
| Performance, availability, security, maintainability, cost, trade-offs | `references/quality-attributes.md` |
| Modularization, service/DB extraction, strangler fig, rollout | `references/migrations.md` |
| Measurement and honest reporting | `references/tooling.md` |

**Measure, never guess.** Build the dependency graph and measure real behavior: p50/p95/p99, error rate, throughput, queue age, DB pool wait, deploy frequency/lead time, change failure rate, and the cost of the current topology. A pattern is not a result; a diagram is not a measurement.

Mark each finding **Confirmed** (graph/trace/load/code evidence) or **Suspected** (needs measuring).

### 3. Report

Fill `assets/report-template.md`, save it as `ARCHITECTURE_OPTIMIZATION_REPORT.md` in the repo root, and show the user. Five-line summary, findings table by impact/effort/risk, then per-finding detail (evidence, why it hurts, fix, risk, migration/rollback). Include a current/target boundary map and the decisions that need an ADR.

### 4. Plan -- then stop for approval

Use plan mode: `EnterPlanMode` (load with ToolSearch if deferred), write the plan, present with `ExitPlanMode`; if unavailable show it in chat and wait for an explicit "go". Structure:

1. **Quick wins** -- break cycles, fix boundary leaks, add timeouts/retries/idempotency, remove shared mutable state, add indexes/caching, bound pools/queues, add health/metrics/traces, document an ADR. Low risk and reversible.
2. **Structural** -- introduce/repair module boundaries, move code behind a public API, split a package, apply outbox/inbox, make handlers idempotent, add contract tests, isolate a data store, change deployment topology. Name each behavior and ownership change.
3. **Heavy** -- extract a service, split a database/schema, adopt event-driven flows, replace the monolith, platform/cloud migration. Separately approved, with a staged rollout and rollback.
   Each step: scope, files/services touched, expected effect, how to verify, how to roll back, and the decision record.

### 5. Fix

Only approved items, in small groups. After each: build, typecheck/lint, unit/integration/contract tests, and the relevant load/trace check. Keep changes reversible; do not combine a data migration with a boundary refactor. If a change alters a transaction boundary, public API/event contract, data ownership or deploy topology, stop and ask.

### 6. Verify and wrap up

Re-run the same graph/metrics/load: cycles, cross-boundary imports, p50/p95/p99, error rate, queue age, DB pool wait, deploy lead time/change failure rate, cost. State plainly what could not be measured. End with deferred items, the ADRs written, and one suggested next step.

## Principles

- **Boundaries follow data and transactions, not org charts.** A service that shares a database is a distributed monolith.
- **Modular monolith before microservices.** Extract only when a measured constraint (team autonomy, scaling, isolation, compliance) justifies the network and consistency cost.
- **Every remote call needs a contract and a failure mode.** Timeout, retry policy, idempotency, circuit breaker/bulkhead, and an owner.
- **Data ownership is the hard part.** One writer per aggregate; schemas/contracts evolve; shared tables are coupling.
- **Async is not free.** Events need ordering/idempotency/outbox/inbox, replay and dead-letter handling.
- **Measure quality attributes.** Latency, availability, cost and delivery speed decide; pattern fashion does not.
- **Prefer reversible steps.** Strangler fig, parallel run, feature flags, expand/contract migrations.
- **Record decisions.** ADRs and fitness functions stop the same debate from recurring.
- **Docs and systems drift.** Reconstruct the map from code/config, then reconcile the docs.
Files in this package (12)
  • LICENSE 1 KB
  • README.md 1 KB
  • SKILL.md 7 KB
  • assets/report-template.md 2 KB
  • references/data-consistency.md 3 KB
  • references/distributed-systems.md 2 KB
  • references/migrations.md 2 KB
  • references/module-boundaries.md 3 KB
  • references/quality-attributes.md 3 KB
  • references/scalability-operability.md 2 KB
  • references/tooling.md 2 KB
  • scripts/audit.py 16 KB

Versions

The database has no other skills named architecture-optimizer.

Database snapshot: 13.11.2026 · package version 35573a3645a0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100software-architecture-design
    Designs system structure across monolith/microservices/serverless. Use when structuring systems, scaling, decomposing monoliths, or choosing patterns.
  • 95microservices-patterns
    Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.
  • 100microservices-patterns
    Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.
  • 100microservices-patterns
    Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.
  • 95microservices-architecture
    Microservices architecture patterns and best practices. Use when designing distributed systems, breaking down monoliths, or implementing service communication.
  • 100architecture-reviewer
    Reviews designs and architectural changes against quality attributes: modularity, coupling, resilience, scalability, security, operability and cost, and records decisions as ADRs. Use for new components, service boundaries and significant changes.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.