/carebridge-standards:carebridge-standardsfrom carebridge-standards
Coding standards and architectural patterns for the CareBridge eldercare management app. Covers case context preservation, Stripe integration, Next.js 15 async params, shadcn/ui-only components, and database RLS policies.
Ships in carebridge-standards. 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.
This skill provides comprehensive coding standards, architectural patterns, and best practices for developing the CareBridge application - a multi-case eldercare management SaaS platform.
CareBridge has specific architectural patterns that MUST be followed to ensure:
Breaking these patterns causes critical bugs, build errors, and scalability issues.
ALWAYS use this skill when:
Critical scenarios that require this skill:
Every navigation link, redirect, or router.push MUST preserve the caseId query parameter.
Bad example:
<Link href="/dashboard">Dashboard</Link>
Good example:
const caseId = searchParams.get('caseId')
<Link href={caseId ? `/dashboard?caseId=${caseId}` : '/dashboard'}>Dashboard</Link>
See references/case-context.md for complete patterns.
Always use shadcn/ui. Never create custom UI components.
Bad example:
export function CustomButton({ children }) {
return <button className="custom-btn">{children}</button>
}
Good example:
import { Button } from '@/components/ui/button'
<Button variant="default">{children}</Button>
Add components with: npx shadcn@latest add button
See references/component-standards.md for the complete list of available components.
Next.js 15 requires awaiting params and searchParams.
Bad example:
export default function Page({ params }: { params: { id: string } }) {
const { id } = params // ERROR!
}
Good example:
type Props = { params: Promise<{ id: string }> }
export default async function Page({ params }: Props) {
const { id } = await params
}
See references/nextjs-15-patterns.md for all Next.js 15 changes.
Stripe webhooks route based on metadata.package_type.
Bad example:
const session = await stripe.checkout.sessions.create({
line_items: [...],
mode: 'subscription',
})
Good example:
const session = await stripe.checkout.sessions.create({
line_items: [...],
mode: 'subscription',
metadata: {
clerk_user_id: userId,
package_type: 'concierge_plus',
payment_type: 'subscription',
},
})
See references/stripe-integration.md for the complete integration guide.
Never create tables via SQL in application code.
Bad example:
await supabase.sql`CREATE TABLE ...` // Don't do this!
Good example:
npx supabase migration new create_table
# Edit the generated .sql file
npx supabase db push
See references/database-patterns.md for migration workflows.
When implementing any feature in CareBridge, follow this workflow:
Before writing any code, identify which domain(s) you're working in:
references/case-context.mdreferences/stripe-integration.mdreferences/nextjs-15-patterns.mdreferences/component-standards.mdreferences/database-patterns.mdEach reference document contains:
Before completing any task, verify:
Case Context Checklist:
caseId query parameteruseEffect for caseId to prevent hydration mismatchcaseId is missingStripe Integration Checklist:
src/lib/config/concierge-pricing.ts as single source of truthmetadata.package_type for routingNext.js 15 Checklist:
params are typed as Promise<{ ... }> and awaitedsearchParams are typed as Promise<{ ... }> and awaitedComponent Standards Checklist:
npx shadcn@latest add)Database Patterns Checklist:
npx supabase migration newcreateServerClient() in server componentscreateBrowserClient() in client componentsBased on real bugs encountered during development:
Application: CareBridge - Multi-case eldercare management platform
Tech Stack:
Architecture:
This skill includes comprehensive reference documentation in the references/ directory:
case-context.md
stripe-integration.md
nextjs-15-patterns.md
component-standards.md
database-patterns.md
When stuck, refer to the reference documents for:
Remember: These patterns exist because they've been proven through real development. Breaking them leads to bugs, build errors, and technical debt.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub human-frontier-labs-inc/human-frontier-labs-marketplace --plugin carebridge-standardsOther plugins' skills for the same job