skills/senior-architect/SKILL.md
Use when designing system architecture, evaluating technology trade-offs, creating architecture diagrams, defining service boundaries, planning database schemas, or reviewing architectural decisions. NEVER use for UI/UX design decisions, individual code-level refactoring, or DevOps pipeline configuration.
npx skillsauth add sharkitect-solutions/sharkitect-claude-toolkit senior-architectInstall 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.
| File | Purpose | Load When |
|---|---|---|
| references/architecture_patterns.md | Pattern catalog with implementation details | Designing a new system or evaluating architectural patterns |
| references/system_design_workflows.md | Step-by-step design process and review procedures | Running an architecture review or structured system design session |
| references/tech_decision_guide.md | Technology selection criteria and comparison matrices | Evaluating tech stack choices or comparing specific technologies |
| scripts/architecture_diagram_generator.py | Generates architecture diagrams from spec | Creating or updating architecture diagrams |
| scripts/project_architect.py | Analyzes existing project structure and surfaces issues | Reviewing an existing codebase's architectural health |
| scripts/dependency_analyzer.py | Maps and validates dependency relationships | Checking dependency health, circular deps, or coupling metrics |
When this skill activates, follow this sequence before writing any recommendation:
references/architecture_patterns.md for pattern context applicable to the domainscripts/dependency_analyzer.py on any existing codebase to surface hidden coupling before proposing changes.scripts/architecture_diagram_generator.py to produce a visual baseline.When signals in a decision matrix point in opposite directions, do NOT pick the "safer" default. Surface the conflict explicitly: "Signal A suggests X, but Signal B suggests Y. Here is the trade-off..." The decision-maker needs to see the tension, not a pre-resolved answer.
Before recommending any architecture, work through these decision matrices in order.
| Signal | Monolith | Microservices | |---|---|---| | Team size | < 10 engineers | > 20 engineers with clear ownership | | Deployment cadence | Weekly or less | Multiple teams deploy independently | | Domain boundaries | Unclear or evolving | Well-defined, stable bounded contexts | | Operational maturity | Low (no on-call, no observability) | High (distributed tracing, alerting, runbooks) | | Current pain point | None or feature velocity | Deployment coupling between teams |
Default: start monolith. Extract services only when deployment coupling is proven painful, not anticipated.
| Criterion | PostgreSQL | NoSQL (Mongo/DynamoDB) | Redis | ClickHouse/BigQuery | |---|---|---|---|---| | Data shape | Relational, normalized | Deeply nested documents, schema-per-entity | Ephemeral, key-value, session | Append-only analytics, time-series | | Consistency need | Strong (ACID required) | Eventual acceptable | Eventual acceptable | Eventual acceptable | | Query pattern | Ad hoc, joins, aggregations | Primary key or simple lookups | Single-key reads/writes | Aggregations over large scan ranges | | Scale target | < 100M rows / table | > 100M items with single-key access pattern | < 1GB hot data | Analytics over billions of events |
Default: PostgreSQL. Move to NoSQL only when the data shape genuinely does not fit relational model -- not for "scalability."
| Use Case | REST | GraphQL | gRPC | |---|---|---|---| | Public-facing API consumed by unknown clients | Yes | Possible | No | | Mobile clients with variable bandwidth | Possible | Yes (query what you need) | Possible | | Internal service-to-service (same org) | Yes | Rarely | Yes (high throughput, strong contracts) | | Real-time subscriptions | No | Yes (subscriptions) | Yes (streaming) | | Team has GraphQL operational experience | Required | Yes | N/A | | Schema evolution with backward compat | Easy (versioned paths) | Moderate (deprecation) | Hard (proto versioning) |
Default: REST for external APIs, gRPC for internal high-throughput services, GraphQL only when client-driven query flexibility is the actual requirement and the team has operational experience.
| Signal | Use Sync (HTTP/gRPC) | Use Async (Queue/Event) | |---|---|---| | Caller needs the response to continue | Always | Never | | Operation is < 2s expected latency | Yes | No | | Operation can fail and caller retries | Yes | Yes | | Producer and consumer must scale independently | No | Yes | | Order of processing matters strictly | Easier with sync | Requires sequencing discipline | | Fire-and-forget acceptable | No | Yes |
Default: sync. Add async only when the operation is genuinely fire-and-forget or when independent scaling of producer/consumer is the proven bottleneck.
| Factor | Buy / Use OSS | Build | |---|---|---| | Is this a commodity capability? | Yes | No | | Does it differentiate the product? | No | Yes | | Maintenance burden over 3 years | Low (active community) | High (owned forever) | | Integration effort | < 2 weeks | N/A | | Vendor lock-in risk acceptable? | Must evaluate | N/A |
Default: buy commodity, build differentiators. Authentication, payments, search indexing, email delivery -- buy. Core domain logic that generates competitive advantage -- build.
| Conflict | Default Mistake | Correct Resolution | |---|---|---| | Consistency vs Availability | Apply strong consistency everywhere (safe default) | Determine consistency requirement per service per operation. Most reads tolerate stale data; only writes to shared financial or inventory state require strong consistency. | | DRY vs Coupling | Extract shared library the moment code is duplicated | Duplication across service boundaries is cheaper than wrong abstractions. Extract only when the contract is stable and the abstraction is proven across 3+ independent use cases. | | Microservices vs Monolith | Choose microservices for perceived future scalability | Start with a modular monolith. Introduce service extraction only when deployment coupling between teams is a demonstrated, recurring problem -- not an anticipated one. | | SQL vs NoSQL | Default to NoSQL for "web scale" | PostgreSQL handles the vast majority of production workloads. NoSQL is appropriate only when the data access pattern is definitively key-value or document-shaped and the query pattern is known and stable. | | Sync vs Async | Add message queues to every integration for "resilience" | Async adds operational complexity (dead letter queues, ordering guarantees, consumer lag). Use it only when fire-and-forget semantics are genuinely required or independent scaling is proven necessary. | | Build vs Buy | Build for control and customization | Buy commodity capabilities (auth, payments, email, observability). The maintenance cost of owned infrastructure compounds over years. Build only what directly differentiates the product. | | Abstraction vs Premature Generalization | Abstract interfaces to "allow swapping later" | Abstractions for hypothetical future swaps add indirection with no current benefit. Build the concrete implementation; refactor to an abstraction when a second consumer materializes. | | Shared Library vs Duplication | Create a shared library for common utilities | Shared libraries create hidden coupling between services. A change to the library forces coordinated deploys. Prefer duplication at service boundaries; extract when the abstraction is stable and worth the coordination cost. |
| What Someone Says | Why It's Wrong | What to Do Instead |
|---|---|---|
| "The team is small, we don't need architecture" | Small teams benefit most from clear boundaries -- they have the least capacity to manage unexpected coupling later | Define service and module boundaries explicitly even in a two-person project. The cost is low; the benefit compounds. |
| "We'll refactor later when we need to scale" | Architecture refactoring is 10x more expensive than initial design. Database schemas, API contracts, and auth models are expensive to reverse under live traffic. | Make deliberate decisions now. Document them. Revisit on a scheduled cadence, not in a crisis. |
| "Microservices will make us faster" | Microservices add operational complexity (distributed tracing, network failures, data consistency across services). They are faster only if deployment coupling is the actual bottleneck. | Measure whether deployment coupling is causing friction. If not, a monolith ships faster. |
| "We should use the latest framework or technology" | New technology has unknown failure modes in production. Mature technology has known failure modes and documented solutions. | Prefer technology where the failure modes are understood. Adopt new technology in a low-risk, non-critical path first. |
| "This decision doesn't matter, we can change it later" | Some decisions (database choice, API contracts, event schemas, auth provider) are structurally expensive to reverse under load. | Classify decisions by reversibility before making them. Irreversible decisions warrant more deliberation. |
| "Let's abstract this so we can swap the implementation" | Abstractions for hypothetical swaps add complexity for scenarios that rarely materialize and often guess wrong about the future interface. | Build the direct implementation. Extract an abstraction when a second concrete implementation actually exists. |
| "We need a shared library for this common code" | Shared libraries introduce deployment coupling. A version bump requires coordinated releases across every consumer. | Duplicate code at service boundaries. Extract a shared library only when the API is stable, the consumers are known, and the coordination overhead is worth it. |
| "The architecture diagram can wait until the system is built" | Undocumented architecture drifts from intention within weeks. New engineers build on assumptions rather than decisions. | Document the intended architecture before building. Use scripts/architecture_diagram_generator.py to generate a baseline from the spec. |
Review before finalizing any architecture recommendation. Raise these explicitly if observed.
development
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.
testing
--- name: using-sharkitect-methodology description: Use when starting any conversation in a Sharkitect workspace OR before any task involving NEW pricing, positioning, proposal, strategy, plan-execution, or schema-design work — mandates invocation of Sharkitect-specific methodology skills (pricing-strategy, marketing-strategy-pmm, smb-cfo, hq-revenue-ops, executing-plans, brainstorming) under the same anti-rationalization discipline as using-superpowers. Documentation has failed 4 times across H
testing
Use when user says 'end session', 'wrap up', 'stop for the day', 'done for today', 'close out', 'save session', 'wrapping up', or invokes /end-session. Runs the full 9-step end-of-session protocol: resource audit, MEMORY.md update, lessons capture, plan status, pending items, workspace checklist, .tmp/ audit, git commit+push, Supabase brain sync, session brief, summary. Final step schedules a detached self-kill of the current session ONLY (3s delay) so the window closes cleanly. Other claude.exe processes (active workspaces) are NOT touched -- orphan cleanup is handled separately by Claude-Orphan-Cleanup-Hourly with proper age safeguards. Do NOT use for: mid-session quick saves (use session-checkpoint), skill syncing (use sync-skills.py), brain memory queries (use supabase-sync.py pull), document freshness reviews (use document-lifecycle), resource gap detection (use resource-auditor).
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.