10 production-grade Claude Code skills by Amritpal Singh Boparai.
Full-stack multi-tenant SaaS development — from git analysis to architecture,
frontend, security, testing, DevOps, and beyond.
10Skills
12Knowledge Categories
7Agent Prompts
6Runtime Hooks
4Reference Docs
$ claude /install-plugin boparaiamrit/build-second-brain
A senior enterprise backend architect skill that reads frontend code, extracts real backend intent (not naive CRUD mirrors),
researches libraries before writing code, applies correct design patterns automatically, and enforces tenant hierarchy
on every table, every query, every endpoint.
■
Frontend-to-Backend
Reads React/Vue components and extracts the real API contract — not a 1:1 CRUD mirror.
■
Library Research First
Compares 3+ options before choosing any new library. Pre-evaluated decisions included.
■
Auto Pattern Selection
Adapter, Manager, Strategy, Factory — picks the right pattern based on the feature shape.
■
Tenant-Aware Everything
Company/Workspace/Domain hierarchy enforced on every table, query, and endpoint.
■
Scale by Default
>1000 rows = BullMQ mandatory. SSE progress, job deduplication, dead letter queues.
The immutable foundation. Every table, every query, every endpoint respects this hierarchy.
Company(billing entity — subscriptions, plan limits, seats) Workspace(organizational unit — settings, custom field definitions, user roles) Domain(data partition — primary query pivot for all hot-path operations) Data(recipients, campaigns, events — scoped per domain)
Denormalization
Every Table = 3 IDs
company_id + workspace_id + domain_id on every data table. Domain migration is rare (~once/year), so redundancy is worth it.
Indexing Rule
Separate Per Level
Never one composite index with all 3. Start with domain_id only. Add workspace/company indexes when proven.
Shared Module
Recipients x 10+ Products
Core recipients table + extension tables per product (email, sms, whatsapp, push...). Extension = "enrolled in this product."
Redis Context
TenantContextGuard
Every request resolves hierarchy from Redis (not DB joins). Attached to request.tenantContext. 1hr TTL.
// 7-Phase Flow
Applied to every feature, from simple CRUD to complex enterprise workflows.
Phase 0
Library Selection
List 3+ candidates, compare maturity/TypeScript/NestJS compat/license. State recommendation with reasoning.
Phase 1
Context Extraction
Write user story with hierarchy context. Flag 14 complexity dimensions (tenant, shared, bulk, async, staging...).
Phase 2
Database Schema
Drizzle tables with all 3 IDs, domain_id index always, TimescaleDB for events, JSONB + GIN for custom fields.
Phase 3
NestJS Module
Controller (HTTP only) → Service (business logic) → Repository (Drizzle, domain_id first). DTOs for validation.
20 situations showing which skill to use, what you say, and what outcome to expect
Building New Features
#1"Build a phishing report module where employees report suspicious emails"
Audit→SaaS Architect→Frontend Architect
Outcome
Audit asks 10 planning questions. SaaS designs PhishingReport schema with workspaceId + personId. Frontend builds report form + list view with UnifiedDataTable.
Without Skills
Developer builds a simple form. No workspace scoping. No Person de-dup. No Company Library for report templates. Data leaks across workspaces. UC1 users see unnecessary complexity.
#2"Add CSV import for vishing campaign phone numbers"
Developer uploads CSV, parses all at once (UI freezes on 10K rows), no duplicate detection, no preview step, no undo capability. Phone numbers not validated.
#3"Build company-wide dashboard showing risk scores across all subsidiaries"
Audit catches: UC3-only, company-level, Person de-dup needed. SaaS: /companies/:id/dashboard endpoint aggregating across workspaces. Frontend: workspace selector + progressive complexity (hidden for UC1).
Without Skills
Developer builds dashboard that queries across workspaces without permission check. Workspace admin can see other subsidiaries' data. Person not de-duplicated — inflated headcount. UC1 users confused by empty workspace selector.
Auditing Existing Modules
#4"Is the training module ready for Tata Group?"
Audit (5 phases)
Outcome
48-check audit: schema (personId? companyId?), API (workspace scoped?), frontend (domain tabs?), integration (campaign↔training?), deployment (non-breaking?). Gap report with severity + sprint estimates.
Without Skills
"Looks fine to me" — ship it. Tata Steel admin discovers they can see TCS training data. CISO can't see cross-workspace completion rates. Data leak reported. Trust lost.
#5"Before releasing v3, check all modules for data leaks"
Audit (6 negative tests)
Outcome
6 negative tests per module: cross-WS data leak, bulk cross-WS, company admin scope, Person de-dup, UC1 complexity, settings inheritance. Concrete PASS/FAIL per test with reproduction steps.
Without Skills
Manual testing misses edge cases. "It works on my machine" with one workspace. First MSSP customer finds the bug in production.
Architecture Decisions
#6"Should we use BullMQ or Temporal for the new email workflow?"
SaaS (Phase 0 + library-decisions)
Outcome: SaaS skill's Phase 0 library selection fires. Pre-evaluated: BullMQ for everything, Temporal only for multi-step durable sagas. Decision made in 2 minutes, not 2 days of research.
#7"How should the JIT Coach data model look?"
Audit (planning)→SaaS (Phase 2)
Outcome: Audit asks: hierarchy level? (Domain). Company Library? (Yes — company tips). SaaS Phase 2: JitTip + JitTriggerRule + JitTipDelivery tables with all 3 IDs + companyId. MSSP flags catch Blueprint need early.
Frontend Development
#8"Build the campaign list page with filters, bulk actions, and inline editing"
Frontend (Phase 3 + table-reference)
Outcome: UnifiedDataTable with column persistence, DnD reorder, 3-layer filters, bulk actions with confirmation, editable cells. All from table-reference.md templates. Without: Custom table from scratch. No persistence. No DnD. Rebuilds what already exists.
#9"The recipients page loads 10,000 records on mount — fix this"
Frontend (migration + Phase 2)
Outcome: Migration skill Phase 3: replace ?limit=10000 with React Query hooks + server-side pagination. Query key hierarchy for cache. Without: Someone adds useMemo and calls it "optimized." Still fetches 10K rows.
Migration & Refactoring
#10"Migrate the frontend to the correct folder structure"
Frontend (migration-skill)
Outcome: 7-phase migration: src/ → feature modules → API layer → Zustand → route groups → auth → i18n. Each phase independently deployable. App keeps working throughout.
#11"Add Drizzle ORM for the new reporting module alongside existing Prisma"
SaaS (ORM Migration section)
Outcome: SaaS skill's Prisma→Drizzle section: existing modules keep Prisma, new modules use Drizzle. Translation guide maps Prisma syntax to Drizzle. Patterns (tenant hierarchy, indexes) are ORM-agnostic. Without: Developer rewrites existing Prisma code to Drizzle. Breaks existing queries. Two weeks of regression fixing.
#12"Add settings inheritance to the announcement module"
SaaS (mssp-patterns)+Frontend (MSSP UI)
Outcome: SaaS: CompanyDefaultAnnouncementSettings + useCompanyDefaults + overriddenFields[] + resolution algorithm. Frontend: COMPANY/WORKSPACE/OVERRIDE badge components per field. Without: Developer adds a "copy settings" button. No field-level override. Company admin changes default → overwrites workspace customizations.
Planning & Prevention
#13"My boss wants a 'copy campaign to another workspace' feature"
Audit (planning gate)
Outcome
Audit's 10 questions fire: "Does this need Blueprint pattern?" — YES. "Who can do this?" — Company Admin only. "What does UC1 see?" — Nothing (hidden). Produces Planning Output Template. Correctly designs as Blueprint, not copy.
Without Skills
Developer builds a "clone" button that duplicates the campaign record. Workspace admin can copy campaigns INTO other workspaces they don't manage. Scenarios/templates don't exist in target workspace. Broken references everywhere.
#14"I'm about to ship the portal module — what should I check?"
Audit (all 5 phases + 6 negative tests)
Outcome: Full 90-minute audit. 48 checks + 6 negative tests. Report: "UC1: PASS. UC2: PARTIAL (Person column missing). UC3: FAIL (no settings inheritance, no workspace selector)." Clear gap list with sprint estimates. Without: Ship and pray. First MSSP customer finds 12 issues in week 1.
#15"New developer joined — show them how we build features"
Audit→SaaS→Frontend
Outcome: Full walkthrough: Audit planning (10 questions) → SaaS backend (7 phases) → Frontend (7 phases) → Audit verification (48 checks). New developer understands the entire flow on day 1. Without: "Read the codebase and figure it out." Three months of learning by breaking things.