app-foundations
Skill2 starsChanged 6 months agoMITView on GitHub
Use this skill whenever the user wants to build, design, or scaffold a multi-user application — CRM, ERP, SaaS, marketplace, e-commerce site, payment-processing app, admin dashboard, internal tool, AI-powered product with user accounts, or any system holding data for more than one user. Trigger on requests like "build me a CRM", "I need a customer management system", "build a marketplace", "create a SaaS dashboard", "app with users and roles", "site with login and payments", "build an admin panel", or any non-trivial app where users sign in. Be aggressive about triggering — if the system has users + data + actions, this skill applies. Designed primarily for non-technical builders ("vibe coders", entrepreneurs, designers, creators) using Claude Code without a dev background, so the conversation must be in plain language with real-world examples and safe defaults. The skill enforces 8 foundational concerns (sign-in, privacy, roles, ownership, deletion, backups, admin area, double-action protection) before any code is written, because retrofitting them later is expensive and painful.
In this repository15 other files it gives its agents.
- brand-guidelinesSkill
- code-reviewerSkill
- content-templatesSkill
- design-md-librarySkill
- hebrew-business-docsSkill
- image-genSkill
- logo-creatorSkill
- marketing-copywriterSkill
- premium-landing-effectsSkill
- production-security-auditSkill
- scroll-videoSkill
- seo-launchpadSkill
- skill-creatorSkill
- ui-ux-pro-maxSkill
- visual-generatorSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Match the user's language: if they write in Hebrew, respond in Hebrew.
- Distinctive: line 18
Exception: if the user explicitly identifies as a developer ("I'm a backend engineer", "I know SQL") or uses technical terms naturally, …
- Distinctive: line 35
Get a final confirmation: before writing code: "Does this look right?
- Distinctive: line 150
Don't bother the user with this nuance.
- Distinctive: line 162
When actually writing code, load the matching technical reference for deep guidance:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
App Foundations
CRITICAL: Who is using this skill
The user is most likely a non-technical builder — someone using Claude Code to build a real product without a programming background. Treat every interaction with this in mind:
- Never use technical jargon without immediately translating it into plain language with a real-world example.
- Always offer a recommended default: "If you're not sure → I recommend X because Y."
- Group questions — ask all 8 in one or two messages, not eight back-and-forth turns.
- Match the user's language: if they write in Hebrew, respond in Hebrew. If Spanish, Spanish. Etc. Translate the questions below into their language.
- Be warm and patient, never condescending. They are smart people learning a new domain.
Exception: if the user explicitly identifies as a developer ("I'm a backend engineer", "I know SQL") or uses technical terms naturally, switch to technical mode and ask concisely with proper terminology.
Quick-start mode
If the user says any of these — "just build it", "you decide everything", "use defaults", "skip the questions", "I trust you" — skip the question phase entirely. Apply all defaults from the "Defaults" section below, write FOUNDATIONS.md documenting what was chosen, briefly summarize the choices in 5 bullet points, and start building.
Standard workflow
- Acknowledge the build request with one warm sentence.
- Set expectations — say something like:
"Before I write any code, I want to ask you 8 quick questions. They take 2 minutes and they're the difference between a system that works in a demo and one that survives real customers. For any question — if you're not sure, just say 'you decide' and I'll pick the safe default. Ready?"
- Ask the 8 questions in plain language, grouped into 2 messages (questions 1-4, then 5-8). Use the exact framing in "The 8 questions" section below.
- Summarize the decisions back to the user in a friendly recap: "Great — here's what we decided…"
- Get a final confirmation before writing code: "Does this look right? Any changes?"
- Create
FOUNDATIONS.mdin the project root documenting every decision with a one-sentence rationale. - Build the system with the foundations baked in from the first line of code.
The 8 questions (use this exact framing)
Question 1: Sign-in
How should people sign into your app?
a) Email + password (the standard, like most websites) b) Email + password, plus "Sign in with Google" c) Phone number + SMS code (like WhatsApp) d) Magic link sent to email (no password — Slack-style)
If you're not sure → I recommend (a). Most products start here and add more options later.
Question 2: Privacy between users
When one user creates a record (a customer, a project, a note) — should other users in your app see it?
a) No — each user sees only their own data (like a personal Notion account) b) Yes — users on the same team share data (like Slack) c) Yes — everyone in the company sees everything (like a shared Google Sheet)
If you're not sure → (a) is the safest. Discovering later that user A could see user B's private data is a nightmare. We can loosen it later if needed.
Question 3: User roles
Will all users have the same powers, or are there different types?
Example: in a CRM you might have "admin" (sees billing, deletes customers) vs "salesperson" (only edits their own deals).
a) Everyone is equal — one type of user b) Two types — admin + regular user c) Three or more (tell me which and what each can do)
If you're not sure → (b). Almost every real product eventually needs admin vs regular.
Question 4: Deletion
When a user deletes something — a customer, a project, a file — what should happen?
a) Gone forever, immediately b) Goes to a "trash" that can be restored for 30 days (like Gmail trash) c) Hidden from the user but kept in the database forever
If you're not sure → (b). It has saved countless products from disaster — a user clicks delete by mistake and we can bring it back.
(Send the next 4 in the second message)
Question 5: Backups
If the database has a catastrophic failure tomorrow morning — how recent a copy do you want to restore from?
a) Up to 24 hours of data loss is OK (daily backups, cheapest) b) Up to 1 hour (hourly backups) c) Near-zero loss (continuous backup, more expensive)
If you're not sure → (a). Daily is plenty for most products until you have paying customers; we can upgrade later.
Question 6: Admin area
Will your app have an "admin panel" — a separate area only you (or your team) can access, to do things like view all users, ban accounts, see analytics?
a) Yes — build a separate admin area b) No — I'll do admin tasks manually in the database c) Not now — maybe later
If you're not sure → (a) but minimal. We'll start with a "see all users" page and grow from there.
Question 7: Money / payments
Will your app handle real money — payments, subscriptions, anything that charges the user?
a) Yes b) No — free product c) Maybe later, but not in the first version
If you say (a), I'll automatically turn on double-charge protection — it's not optional for payments. If a user clicks "pay" twice or their internet hiccups, they won't be charged twice.
Question 8: Tech stack
Last question — do you have a preference for the technology I should use?
a) You pick what's best b) I have a preference (tell me which) c) I have an existing project — match its stack
If you're not sure → (a). I'll pick a modern, well-supported stack.
Defaults (when user says "you decide everything")
Apply all of these without asking:
| Concern | Default | Why |
| Sign-in | Email + password (bcrypt, cost 12), session cookies, MFA stub for admins | Industry standard, secure, familiar to users |
| Privacy | Each user sees only own data; user_id (or tenant_id) on every table; auto-filter every query | Safest starting point, easy to relax later |
| Roles | admin + member; permission strings (resource:action); deny by default | Covers 80% of cases; expandable |
| Ownership | user_id FK on every business table, indexed | Anchors all access checks |
| Soft Delete | deleted_at TIMESTAMP NULL; 30-day retention; partial unique indexes that account for it | Allows undo; preserves audit trail |
| Backup | Managed DB with daily backups, 30-day retention, PITR if available | Standard SaaS-grade safety |
| Admin area | Minimal admin route prefix (/admin), separate middleware chain, role-gated | Establishes API scopes early |
| Idempotency | ON for payments + signup, OFF for everything else | The hard rule for money: never double-charge |
| Stack | Next.js + Postgres + Prisma + NextAuth (or framework match) | Mainstream, AI-friendly, well-documented |
Critical rule: idempotency on payments
For payments, signups, and anything touching real money or external services — double-action protection is always on, no exceptions, never ask. A double-charge is the worst possible failure.
For notifications, emails, and audit logs — protection is off by default. Users actually want repeat notifications when they click "send" twice.
Don't bother the user with this nuance. Just apply the rule.
What to produce after the conversation
FOUNDATIONS.mdin the repo root. Include every decision in plain language with a one-sentence rationale. This is the most important file — future Claude Code sessions will read it and stay consistent.- Database schema with
user_id(ortenant_id),deleted_at,created_at,updated_atcolumns on every business table from day one. - Auth + authorization middleware stubs before any features.
- API endpoint list annotated with scope (
public/authenticated/admin). - A friendly summary message to the user: "Everything's set. Here's what I built and why. Now let's add features." Keep this in plain language.
Reference files (for technical implementation)
When actually writing code, load the matching technical reference for deep guidance:
references/01-authentication.md— auth implementation, password hashing, MFAreferences/02-authorization.md— query filtering, row-level securityreferences/03-rbac.md— role tables, permission middlewarereferences/04-ownership.md— owner FK design, multi-tenant patternsreferences/05-soft-delete.md— deleted_at column, partial indexes, unique constraintsreferences/06-backup-restore.md— managed DB setup, restore testingreferences/07-api-scopes.md— route grouping, middleware tiersreferences/08-idempotency.md— Idempotency-Key handling, dedup tables
The references contain technical detail; never paste their content at the user verbatim unless they explicitly ask for technical depth.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

