/loxihart-engineering:generating-build-specsfrom loxihart-engineering
Generates project-aware pre-build specs using project knowledge and codebase context. Phase 1 runs a 7-section spec: outcome contract, states, data contract, failure taxonomy, platform constraints, adversarial questions, unknown unknowns. Phase 2 generates actionable artifacts: build prompt, state scaffold, type definitions, error handling scaffold, pre-ship checklist, test scenarios, task list — referencing real file paths and patterns, not generic best practices. Use when: pre-build spec, spec this out, spec my build, run a spec pass, spec before I code, generate a build spec, what will break, surface the gaps, what am I missing before I build, pre-mortem this build, what could go wrong, unknown unknowns for this feature, adversarial review of my build plan, think through this build, help me plan this feature, build prompt for this, state scaffold, error scaffold, type definitions, pre-ship checklist, test scenarios, task list for this build, I'm about to build, before I start coding.
Trending skills
7-day visitors to each skill page
Ships in loxihart-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Runs a 2-phase pre-build spec pass using project context. Makes the first real iteration about refinement, not gap discovery.
User wants to build or spec something?
├── Yes — "spec [feature]" / "pre-build spec" / "what will break"
│ ├── Project knowledge available?
│ │ ├── Yes → Context-gather first (Step 1), then Phase 1 + Phase 2
│ │ └── No → Run Phase 1 from description alone, note the gap
│ └── User wants only one artifact (e.g. "just the error scaffold")?
│ └── Skip Phase 1, jump to Phase 2 for that artifact using context
└── No — don't activate
Scope selector — read from user message or ask once:
LITE — 3–4 items per section, throwaway buildsSTANDARD — 5–7 items, feature work or internal tools (default)FULL — exhaustive, system-level builds touching auth/payments/user dataBefore generating any section, search project knowledge for context that makes outputs specific to the actual codebase.
Run these searches in sequence. Use whatever is found — if nothing comes back, proceed with the description and note that output is description-only.
project_knowledge_search("error handling patterns")
project_knowledge_search("state management approach")
project_knowledge_search("data models schema types")
project_knowledge_search("test file patterns fixtures")
project_knowledge_search("tech stack deployment config")
What to extract:
If project context is found, prefix each section with [SOURCED].
If description-only, prefix with [GENERATED].
Generate all 7 sections in order. Present each as a headed block.
See references/spec-sections.md for detailed instructions per section.
| # | Section | What it produces | LITE | STANDARD | FULL |
|---|---|---|---|---|---|
| 1 | Outcome Contract | Done/failure/context | 3 fields | 3 fields | 3 fields |
| 2 | States | Every system state | 4 | 6–7 | exhaustive |
| 3 | Data Contract | Inputs/outputs/source/constraints | 3–4/array | 5–7/array | exhaustive |
| 4 | Failure Taxonomy | Mode + category + mitigation | 4 | 6–7 | exhaustive |
| 5 | Platform Constraints | Concrete gotchas for this build type | 3–4 | 5–7 | exhaustive |
| 6 | Adversarial Questions | What breaks, what was assumed handled | 4 | 5–6 | 7+ |
| 7 | Unknown Unknowns | Things specific to this build not thought of | 3–4 | 5–7 | exhaustive |
For each section, output:
### [Section Name]
[SOURCED or GENERATED]
[Content — list items or structured fields depending on section type]
After all 7 sections, pause and ask: "Generate artifacts for all sections, specific sections, or skip Phase 2?"
Each section maps to one actionable artifact. Generate on request — either all at once or per section. Use project context gathered in Step 1 to make outputs reference real file paths and extend real patterns.
See references/artifact-types.md for detailed instructions per artifact.
| Section | Artifact | What it is |
|---|---|---|
| Outcome Contract | Build Prompt | Ready-to-paste brief for the actual build session |
| States | State Scaffold | useReducer / state machine with every state typed |
| Data Contract | Type Definitions | Interfaces + Zod schema + parse functions |
| Failure Taxonomy | Error Scaffold | AppError class, classifier, per-category handlers |
| Platform Constraints | Pre-Ship Checklist | Verify-before-merge checklist by severity |
| Adversarial Questions | Test Scenarios | Test file with describe/it stubs per question |
| Unknown Unknowns | Task List | Pre-mortem tickets with acceptance criteria |
For each artifact:
### [Artifact Name] — [Section it comes from]
[SOURCED: references X from project] OR [GENERATED: no project context]
\```[language]
[artifact content]
\```
Used in Section 5 and the Pre-Ship Checklist. Match to declared or inferred build type.
| Build Type | Key Constraints |
|---|---|
| React Artifact | No localStorage/sessionStorage, no runtime npm, CORS blocks external fetches, React state = only persistence, bundled libs only |
| Live Artifact | No client API key, max_tokens is a real output limit, streaming interruption must be handled |
| Base44 | Bearer auth pattern, n8n webhook integration, Supabase data layer |
| n8n Workflow | Node execution order, credential scoping, webhook URL exposure, error branches required |
| Prompting Toolkit | Injection surface, output variability, eval criteria needed, model version pinning |
| Chrome Extension | MV3 service worker lifecycle, CSP restrictions, cross-origin messaging limits |
| API / Backend | Auth/session, injection vectors, rate limiting, secret exposure via bundle |
| Supabase + RLS | RLS silently drops policies on schema overwrite, service_role key server-side only |
Used in Section 4 (Failure Taxonomy) and the Error Scaffold.
| Category | Covers |
|---|---|
| Network | Timeouts, CORS, DNS, connectivity loss |
| API | External service errors, rate limits, auth failures |
| Data | Null/malformed/missing data, schema drift |
| Input | Bad user input, injection attempts, edge-case strings |
| UI | Render failures, missing states, layout breaks |
| Platform | Environment-specific limits (see table above) |
| Auth | Session expiry, permission errors, token issues |
| Cost | Token budget overflow, API cost overrun |
| Race | Concurrent updates, stale state, out-of-order responses |
[SOURCED]/[GENERATED] labels.Before outputting:
[SOURCED] or [GENERATED]?What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub krosebrook/loxihart-skills --plugin loxihart-engineering22 skills in this plugin
/administering-supabaseManages Supabase database operations for FlashFusion's production stack — schema design, Row Level Security policies, migrations, Edge Functions, and debugging. Active project: flashnframe-app (etctmappdhpjuwptdbeb). Use when the user mentions: Supabase, RLS, row level security, migration, schema, database, table, Edge Function, auth, policies, Postgres, supabase query, database admin, add a column, create a table, why is my query blocked, or any task involving the Supabase project or database structure.
/auditing-logicAudits code for logical errors before they become bugs — control flow gaps, data contract violations, schema/type drift, business logic inconsistencies, and silent failure paths. Produces a severity-rated issue list with a one-line diagnosis and one-line fix per finding. Use this skill whenever code is pasted with a review request, or when the user says "audit this", "check the logic", "does this make sense", "any issues with this", "logic audit", "what's wrong here", "review this function", "is this correct", or hands you any code file and wants a critical eye. Even if the user does not say "logic" — if code is present and they want feedback, use this skill. Also triggers on: "find the bug", "something feels off", "is this right", "sanity check this", "does this hold", "validate my logic", "code review", "PR review", "review this PR".
/code-auditorPerforms comprehensive codebase analysis covering architecture, code quality, security, performance, testing, and maintainability. Use when user wants to audit code quality, identify technical debt, find security issues, assess test coverage, or get a codebase health check./code-transferTransfer code between files with line-based precision. Use when users request copying code from one location to another, moving functions or classes between files, extracting code blocks, or inserting code at specific line numbers./debug-like-expertDeep analysis debugging mode for complex issues. Activates methodical investigation protocol with evidence gathering, hypothesis testing, and rigorous verification. Use when standard troubleshooting fails or when issues require systematic root cause analysis. Triggers on: debug this, root cause analysis, systematic debugging, why is this failing, trace this bug, diagnose this issue, investigation protocol, hypothesis testing./engineering-patternsProduction engineering pattern library spanning 11 phases — Foundation, Resilience, Performance, Data Integrity, Observability, Deployment, Scalability, Edge Cases, Security Deep, Compliance/DR/FinOps, and AI/HITL. Use when auditing code for production readiness, applying hardening patterns, reviewing system design, pattern audit, apply phase, harden this, production-ready, resilience patterns, observability gaps, security review, DR plan, FinOps, or AI guardrails. Use alongside engineering-staff-workflows for execution. Not for writing the implementation itself — that is engineering-staff-workflows.