agent-coordination
Agent assignment matrix, blocker escalation, and TDM coordination patterns. Use when assigning work to specialists, managing…
Frontend patterns for Next.js App Router, Clerk auth, shadcn/Radix UI, and PostHog analytics. Use when building UI components, creating pages, implementing auth flows, or adding analytics events. Ensures consistent UX patterns and accessibility standards.
Claude Code
$ npx -y skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns --agent claude-code
Codex
$ npx skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns -a codex -y
Cursor
$ npx skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns -a cursor -y
Gemini CLI
$ npx skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns -a gemini-cli -y
GitHub Copilot
$ npx skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns -a github-copilot -y
OpenCode
$ npx skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns -a opencode -y
Windsurf
$ npx skills add bybren-llc/safe-agentic-workflow --skill frontend-patterns -a windsurf -y
name: frontend-patterns description: Frontend patterns for Next.js App Router, Clerk auth, shadcn/Radix UI, and PostHog analytics. Use when building UI components, creating pages, implementing auth flows, or adding analytics events. Ensures consistent UX patterns and accessibility standards. user-invocable: false allowed-tools: Read, Grep, Glob
Ensure consistent frontend development using established patterns for Next.js App Router, Clerk authentication, shadcn/ui components, and PostHog analytics.
Invoke this skill when:
// SERVER COMPONENT (default) - Use for:
// - Data fetching
// - Auth checks
// - SEO-critical content
// app/dashboard/page.tsx
import { auth } from "@clerk/nextjs/server";
export default async function DashboardPage() {
const { userId } = await auth();
// Fetch data server-side...
}
// CLIENT COMPONENT - Use for:
// - Interactivity (onClick, onChange)
// - Browser APIs (localStorage, window)
// - Hooks (useState, useEffect)
// app/dashboard/_components/interactive-widget.tsx
("use client");
import { useState } from "react";
export function InteractiveWidget() {
const [count, setCount] = useState(0);
// Interactive logic...
}**CRITICAL**: Always use `export const dynamic = 'force-dynamic'` for authenticated pages:
// app/dashboard/[page]/page.tsx
import { auth } from "@clerk/nextjs/server";
import { redirect } from "next/navigation";
// REQUIRED - Auth context unavailable at build time
export const dynamic = "force-dynamic";
export default async function ProtectedPage() {
const { userId } = await auth();
if (!userId) {
redirect("/sign-in");
}
// Render protected content...
}app/
├── (auth)/ # Auth routes (sign-in, sign-up)
│ ├── sign-in/[[...sign-in]]/page.tsx
│ └── sign-up/[[...sign-up]]/page.tsx
├── (marketing)/ # Public marketing pages
│ ├── page.tsx # Homepage
│ └── pricing/page.tsx
├── dashboard/ # Protected user area
│ ├── page.tsx
│ └── _components/ # Page-specific components
└── admin/ # Admin-only area
└── page.tsx// Server component auth check
import { auth } from '@clerk/nextjs/server';
export default async function Page() {
const { userId } = await auth();
// userId is string | null
}
// Client component auth
"use client"
import { useUser, useAuth } from '@clerk/nextjs';
export function UserProfile() {
const { user, isLoaded, isSignedIn } = useUser();
const { signOut } = useAuth();
if (!isLoaded) return <Skeleton />;
if (!isSignedIn) return <SignInPrompt />;
return <div>Welcome, {user.firstName}!</div>;
}When auth is disabled via feature flags, provide graceful fallbacks:
// Check feature flag
import { FEATURES } from '@/config/features';
export function AuthWrapper({ children }) {
if (!FEATURES.AUTH_ENABLED) {
// Show demo/guest experience
return <GuestExperience>{children}</GuestExperience>;
}
return <AuthenticatedWrapper>{children}</AuthenticatedWrapper>;
}// app/admin/page.tsx
import { auth } from "@clerk/nextjs/server";
import { redirect } from "next/navigation";
export const dynamic = "force-dynamic";
export default async function AdminPage() {
const { userId, orgId, orgRole } = await auth();
if (!userId) {
redirect("/sign-in");
}
// Verify admin role
const ADMIN_ORG_ID = process.env.CLERK_ADMIN_ORG_ID;
const ADMIN_ROLE = "org:admin";
if (orgId !== ADMIN_ORG_ID || orgRole !== ADMIN_ROLE) {
redirect("/admin-denied");
}
// Render admin content...
}// Always use @/components/ui path alias
import { Button } from "@/components/ui/button";
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";"use client"
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { z } from 'zod';
import { Button } from '@/components/ui/button';
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form';
import { Input } from '@/components/ui/input';
const FormSchema = z.object({
email: z.string().email('Invalid email'),
name: z.string().min(1, 'Name is required'),
});
type FormData = z.infer<typeof FormSchema>;
export function MyForm() {
const form = useForm<FormData>({
resolver: zodResolver(FormSchema),
defaultValues: { email: '', name: '' },
});
async function onSubmit(data: FormData) {
// Handle submission...
}
return (
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
<FormField
control={form.control}
name="name"
render={({ field }) => (
<FormItem>
<FormLabel>Name</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<Button type="submit">Submit</Button>
</form>
</Form>
);
}// Primary action <But
SAW — SAFe Agentic Workflow AI Agent Harness for Multi-Agent Team Workflows Built on SAFe methodology (Scaled Agile Framework), adapted for AI agent teams (Now With AI-DLC!) Works for any team with repeatable processes: Software, Marketing, Research, Legal, Operations.
Agent assignment matrix, blocker escalation, and TDM coordination patterns. Use when assigning work to specialists, managing…
API route implementation patterns with RLS, Zod validation, and error handling. Use when creating API routes, implementing…
Documentation templates for ADRs, runbooks, and architecture docs. Use when creating architectural decision records, operational…
Deployment workflows, pre-deploy validation, and smoke testing patterns. Use when deploying to staging or production, running…
Advanced git operations including rebase, bisect, cherry-pick, and conflict resolution. Use when rebasing branches, debugging…
Linear ticket management best practices. Use when creating issues, updating status, or attaching evidence. Provides evidence…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.