- Home
- Skills
- APIs & Backend
- micro saas prd architect
More screenshots
Works with the AI Agents you already use
micro saas prd architect
Generates enterprise-grade Technical PRDs for micro-SaaS with hardened SQL, atomic billing, and RLS security.
Free
micro saas prd architect
Example session with this skill installed
Architect a micro-SaaS called 'DocuQuery'. It allows users to upload PDFs and ask questions via LLM. $20/mo for Pro, 5 free credits for new workspaces. Standard stack.
- Read your context and instructions
- Compiled the micro saas prd
DocuQuery Technical PRD
Section 1 — Executive Scope & Tenancy Boundary
Core Value: RAG-based document interrogation for small legal teams.
MVP Scope:
- Auth & Workspace Context: Clerk-based auth with Supabase workspace mapping.
- Core Value Engine: PDF ingestion, vector embedding, and chat interface.
- Atomic Quota: Per-query credit deduction with Stripe integration.
- Asset Delivery: Signed URL access for uploaded documents.
Out-of-Scope: Bulk folder uploads, OCR for handwritten notes, team-member roles (flat workspace membership only), mobile app, and API developer keys.
Section 2 — Visual Architecture & Trust Boundaries
graph TD
A[Browser] -->|Signed Request| B[Edge Rate Limiter]
B --> C[Next.js Server]
C -->|reserve_quota| D[PostgreSQL/RLS]
D -->|Success| E[LLM Engine]
E -->|settle_quota| D
E -->|Failure| F[refund_quota]
Section 3 — Hardened Database Schema
CREATE TABLE workspaces (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
slug TEXT UNIQUE NOT NULL,
subscription_tier TEXT DEFAULT 'free' CHECK (subscription_tier IN ('free', 'pro')),
quota_balance INT DEFAULT 5 CHECK (quota_balance >= 0),
created_at TIMESTAMPTZ DEFAULT now()
);
ALTER TABLE workspaces ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users can view joined workspaces"
ON workspaces FOR SELECT
USING (is_member(id));
CREATE OR REPLACE FUNCTION reserve_quota(p_workspace_id UUID, p_amount INT)
RETURNS BOOLEAN AS $$
BEGIN
IF p_amount <= 0 THEN RAISE EXCEPTION 'Invalid amount'; END IF;
UPDATE workspaces
SET quota_balance = quota_balance - p_amount
WHERE id = p_workspace_id AND quota_balance >= p_amount;
RETURN FOUND;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER SET search_path = public;
Next steps
- Copy the Hardened Database Schema into your Supabase SQL editor.
- Set up the Stripe Webhook secret in your
.env.local. - Run the Phase 1 build prompt to generate TypeScript types.
Connects securely to your tools. The creator never sees your data.
About this skill
Building a micro-SaaS requires more than just a functional UI. Most AI-generated backends fail under concurrency, leak data through weak RLS policies, or fall victim to double-spending race conditions in billing logic. This skill bridges the gap between a raw idea and a production-grade architecture. It delivers a 7-section Technical PRD designed for implementation by AI coding engines like Cursor or Claude Code.
What it does
- Architects hardened schemas. Generates PostgreSQL DDL with UUID primary keys, auto-update triggers, and mandatory Row Level Security (RLS).
- Enforces atomic billing. Designs PL/pgSQL functions for quota reservation, settlement, and refunds to prevent credit race conditions.
- Maps trust boundaries. Visualizes the data flow from untrusted browsers through edge rate limiters to secure server-side settlement.
- Defines webhook state machines. Outlines idempotent Stripe webhook handling using ledger-claim patterns to prevent duplicate processing.
- Generates phased prompts. Produces four self-contained build prompts with specific Definition-of-Done (DoD) gates for AI agents.
How it works
- Input collection. Provide the product name, core idea, pricing tiers, and free quota limits.
- Architecture synthesis. The skill applies hardened SQL baselines and concurrency patterns to your specific domain.
- Defect screening. The output passes through a rejection checklist to catch common flaws like RLS bypasses or signature verification errors.
Frameworks & tools
Default stack includes Next.js 15 (App Router), TypeScript, PostgreSQL/Supabase, Tailwind CSS, and Stripe.
Why this beats prompting it yourself
Standard prompts often produce "Happy Path" code that breaks during parallel requests or billing failures. This skill embeds senior-level engineering constraints, ensuring that quota management is atomic and multi-tenancy is cryptographically isolated from the start.
Use cases
- Rapid prototyping. Move from a napkin sketch to a comprehensive technical blueprint in one interaction.
- Security hardening. Audit existing micro-SaaS plans for race conditions and RLS vulnerabilities.
- AI-driven development. Create structured, context-rich prompts that prevent Cursor or Windsurf from hallucinating bad patterns.
Known limitations
Requires a PostgreSQL environment that supports PL/pgSQL and Row Level Security. Optimized for the Next.js and Supabase ecosystem.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
Requires PostgreSQL with RLS and PL/pgSQL support. Default stack is Next.js 15 and Supabase. Not for monolithic legacy migrations.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 27 days ago
- Free with an Agensi account
Permissions
Minimal by design: this skill only reads its bundled reference files and generates a PRD document. No external services, no terminal commands, no project file modifications unless you explicitly ask it to save the PRD output.