Home / Blog / Claude Code and Agent Skills: Wiring SaaS Patterns Into Your App

Claude Code and Agent Skills: Wiring SaaS Patterns Into Your App

How to add Stripe, auth or teams to your app with Claude Code and Agent Skills: the setup we verified, a worked Stripe example, and the rules agents miss.

Published Dec 2026
8 min read
By the LaunchSaaS team

TL;DR: LaunchSaaS is 16 copy-in packages, and each one ships an Agent Skill: a SKILL.md file that tells a coding agent which files to copy, in what order, which rules are easy to break, and how to check the result. With the boilerplate cloned next to your app, claude --add-dir ../launchsaas-boilerplate loads those skills into Claude Code. One catch: Claude Code does not load the added folder's AGENTS.md, so you ask it to read that file first. Below is the setup, a walk through what the Stripe skill tells the agent, and why short rules beat long docs when the reader is an agent.


When I started selling LaunchSaaS, I pictured people reading the package READMEs and copying files by hand. That is not how I build anymore, and probably not how you do either: I open Claude Code in the app and type something like "add Stripe subscriptions". So the first reader of the docs is often an agent, and an agent reads differently from a person: it does the plausible thing fast, and the plausible thing is where billing bugs live.

That is why every package now has a skill, and why the repo has an AGENTS.md. This post explains both, using the real files.

What AGENTS.md and Agent Skills are

AGENTS.md is a plain markdown file at the repo root, written for coding agents instead of people. Ours is 74 lines: what the repo is, how to use it from your app, a package map, the verify commands, and a short list of rules. The first line of the "What this repo is" section sets the frame:

A library of copy-in SaaS patterns, not a runnable starter app.

That sentence matters more than it looks. Without it, an agent could reasonably treat the repo as an app to install and run, which it is not.

Agent Skills are an open format (documented at agentskills.io): a folder with a SKILL.md file whose YAML frontmatter holds a name and a description. The description is what the agent matches your request against, so it should name the situations the skill covers. Here is the frontmatter of .agents/skills/payments-stripe/SKILL.md, shortened:

---
name: payments-stripe
description: "Wires the payments-stripe pattern into a React plus Supabase app - a Stripe webhook Supabase Edge Function that grants and revokes paid access, ... Use when the user asks to add Stripe subscriptions, Stripe checkout, a Stripe webhook, a billing page, a customer portal, gate features on a paid plan, or to debug webhooks that do not grant access, retry forever, or wipe customer_id."
---

The spec defines the frontmatter. The body is up to you. All 16 LaunchSaaS skills use the same five sections, a convention of ours rather than part of the format:

The setup we verified on 2026-12-01

The skills use paths relative to the boilerplate root, so keep the boilerplate checked out next to your app and give the agent both folders:

# once: clone the boilerplate next to your app (the URL is in your GitHub invite)
git clone <the repository URL from your GitHub invite> launchsaas-boilerplate

# then, from your app's folder, sitting next to it
cd my-app
claude --add-dir ../launchsaas-boilerplate

Claude Code loads skills from .claude/skills in an added folder. In the boilerplate that path is a symlink, .claude/skills -> ../.agents/skills, so the same 16 files serve Claude Code and any agent that reads .agents/skills.

Here is the caveat, and it is easy to miss: --add-dir does not load the added folder's CLAUDE.md or AGENTS.md. We checked this on 2026-12-01 and wrote it into AGENTS.md itself. The skills arrive, but the repo-wide rules and package map do not. Two fixes:

  1. Start the session with "read ../launchsaas-boilerplate/AGENTS.md first".
  2. Or add one line to your app's own CLAUDE.md, so every session gets it:
@../launchsaas-boilerplate/AGENTS.md

Worked example: "add Stripe subscriptions"

Say your app is React on Supabase and you ask Claude Code to add Stripe subscriptions. The request matches the payments-stripe description, so the skill's body is what the agent follows. I'm not going to paste a transcript of an agent session here. Instead, here is what the skill tells the agent to do, in order, because that is the part you can check.

1. Look before applying anything. Step 1 is a check, not a copy: does the project already have a public.users table? The billing SQL uses CREATE TABLE IF NOT EXISTS, so on an existing table it skips the create but still enables RLS, revokes writes from anon and authenticated, and attaches a trigger. That can break your app's existing writes. The skill gives the agent two ways out: add the two billing columns to your table, or rename the billing table in the copy.

2. Copy exact files to exact places. The "What to copy" table maps six files. Three examples:

Boilerplate file Destination in your app
packages/payments-stripe/sql/billing-schema.sql a Supabase migration
packages/payments-stripe/webhook/stripe-webhook.ts supabase/functions/stripe-webhook/index.ts, unchanged
packages/payments-stripe/context/SubscriptionContext.tsx your frontend, e.g. src/lib/payments-stripe/context/

It also says to import the copies by relative path, because the package name is not published and will not resolve.

3. Deploy with the flag that is easy to forget.

supabase functions deploy stripe-webhook --no-verify-jwt

Stripe sends no Supabase JWT, so with JWT verification on, Supabase rejects every delivery before your handler runs.

4. Write the three functions that are not shipped. This is the part of the job that stays yours. The context calls create-checkout, create-portal-session and check-subscription through supabase.functions.invoke, and the skill spells out the contract: create-checkout takes { priceId }, returns { url }, authenticates the caller from the JWT, checks the price id against an allowlist, and creates the session with metadata: { user_id }. Without that metadata the webhook returns 400 and grants nothing.

5. Gate features on the server. Paid access means public.users.product_id is not null, read with the service role or under the user's own-row policy. And one fact the skill states up front: one-time payments grant nothing in this pattern. If you sell one-time access, you add your own column.

The rules the agent must not "improve"

The Rules section is where the skill earns its keep. A few of them, with the code they protect:

// Async variant: on Deno/Edge, Stripe uses Web Crypto, and the sync
// constructEvent throws "SubtleCryptoProvider cannot be used in a synchronous context"
event = await stripe.webhooks.constructEventAsync(body, signature, webhookSecret);

The Verify section then says how to check your app, not ours: run stripe listen against your function, do a test checkout, confirm customer_id and product_id get set, and confirm that a signed-in user trying to update their own product_id fails with error 42501.

Why rules beat docs for agents

An agent is a fast, confident reader that fills gaps with the most common pattern on the internet. Long prose explaining a design gets skimmed; a one-line constraint with the failure attached gets followed. Every rule in our skills is there because the plausible version broke something. From our own _FRAGILE.md and CHANGELOG.md:

The pattern generalises to your own codebase, whether or not you ever buy anything: when an agent (or a person) breaks something non-obvious, don't write a paragraph. Write a rule that names the trap, says what to do instead, and gives the reason in one clause. Put it where the agent reads before acting, which for skills means the Rules section, and for a repo means AGENTS.md or CLAUDE.md.

Limits

Being straight about what this does not do:

The bottom line

If you build with Claude Code, the useful question about any boilerplate is no longer "how good are the docs?" but "what does the agent read before it touches billing?" For LaunchSaaS the answer is one SKILL.md per package, an AGENTS.md you load yourself, and a Rules section built from bugs we actually shipped and fixed.

Frequently Asked Questions

What is an Agent Skill?

An Agent Skill is a folder with a SKILL.md file whose frontmatter has a name and a description. A coding agent matches your request against the description and then follows the instructions in the body. LaunchSaaS ships one skill per package, 16 in total, each with the same sections: When to use, What to copy, Steps, Rules and Verify.

How do I use the LaunchSaaS skills with Claude Code?

Clone the boilerplate next to your app, then run claude --add-dir ../launchsaas-boilerplate from your app folder. Claude Code loads the skills from the .claude/skills folder in the boilerplate, which links to .agents/skills. It does not load the boilerplate's AGENTS.md, so ask Claude to read it first or import it from your app's CLAUDE.md.

Does the Stripe skill write all the billing code for me?

No. The skill covers the webhook Edge Function, the billing schema and the React subscription context. You still write three small Edge Functions the context calls: create-checkout, create-portal-session and check-subscription. The skill gives their exact contract, including the user_id metadata the webhook needs to grant access.

Do the skills work with Codex, GitHub Copilot or Windsurf?

The skills live in .agents/skills, the folder those agents say they read according to their own docs, and the boilerplate's AGENTS.md is written for Claude Code, Codex and GitHub Copilot. We have only tested the Claude Code setup, so treat other agents as untested.


Related Articles

Ready to ship

Skip the boilerplate. Ship your product.

16 packages with an agent skill each and 200+ tests of their own. Most are extracted from apps used by 13,000+ people (2,335 tests in those apps). One-time payment. Lifetime access to all packages.

Get Instant Access - $99