From carebridge-standards
Comprehensive coding standards and architectural patterns for the CareBridge eldercare management application. Includes critical patterns for case context management, Stripe integration, Next.js 15 requirements, component creation rules, and database operations. This skill should be used whenever working on the CareBridge codebase to ensure consistency and prevent common mistakes.
npx claudepluginhub human-frontier-labs-inc/human-frontier-labs-marketplace --plugin carebridge-standardsThis skill uses the workspace's default tool permissions.
This skill provides comprehensive coding standards, architectural patterns, and best practices for developing the CareBridge application - a multi-case eldercare management SaaS platform.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
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.