agentleFS
medy-gribkovmedy-gribkov/arcana/skills/fullstack-developer/SKILL.md

fullstack-developer

Skill1 starsChanged 9 months agoApache-2.0View on GitHub

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cache-components, frontend-developer and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mm-mazharSkill

    cache-components

    Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).

    Also in 3 projects that use this

  • dylantarreSkill

    frontend-developer

    Use when implementing animations in code, building UI transitions, or when a developer needs practical animation guidance for web/mobile applications.

    Also in 3 projects that use this

  • GoogleSkill

    pr-creator

    Also in 3 projects that use this

  • JetBrainsSkill

    webapp-testing

    Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

    Also in 4 projects that use this

  • VercelSkill

    find-skills

    Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these steps when building any API endpoint.

    line 12
  2. Distinctive:

    Create a Zod schema for request validation

    line 15
  3. Distinctive:

    Add error handling that returns consistent JSON

    line 17
  4. Distinctive:

    Write the corresponding client-side fetch hook

    line 18
  5. Distinctive:

    Every error response must follow this structure:

    line 59
  6. Distinctive:

    Follow these steps when building any component.

    line 79
  7. Distinctive:

    Keep components under 80 lines.

    line 84
  8. Distinctive:

    Follow these steps when writing any database operation.

    line 150
  9. Distinctive:

    Use an ORM (Prisma) with generated types.

    line 152
  10. Distinctive:

    Add indexes on fields used in WHERE, ORDER BY, or JOIN clauses

    line 155
  11. Distinctive:

    When starting a new full-stack project, follow this order.

    line 205
  12. Very specific:

    Create the shared types file at src/types/index.ts

    line 210
  13. Distinctive:

    Add error boundaries at the layout level

    line 213
  14. Distinctive:

    Run through these checks before any deployment.

    line 217
  15. Distinctive:

    Use parameterized queries (Prisma handles this).

    line 220
  16. Distinctive:

    Add rate limiting to auth endpoints (5 attempts per minute)

    line 222
  17. Distinctive:

    Place each feature's hook, component, and types together.

    line 240

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Full-Stack Developer

Act as a senior full-stack engineer. Write type-safe, production-ready code with proper error handling, validation, and separation of concerns.

API Design Workflow

Follow these steps when building any API endpoint.

  1. Define the route, HTTP method, and response shape first
  2. Create a Zod schema for request validation
  3. Implement the handler with typed request/response
  4. Add error handling that returns consistent JSON
  5. Write the corresponding client-side fetch hook

BAD: Unvalidated, untyped handler

// No validation, raw any types, inconsistent errors
app.post("/api/posts", async (req, res) => {
  const post = await db.post.create({ data: req.body });
  res.json(post);
});

GOOD: Validated, typed, consistent errors

import { z } from "zod";

const CreatePostSchema = z.object({
  title: z.string().min(1).max(200),
  content: z.string().min(1),
  published: z.boolean().default(false),
});

type CreatePostInput = z.infer<typeof CreatePostSchema>;

app.post("/api/posts", async (req: Request, res: Response) => {
  const result = CreatePostSchema.safeParse(req.body);
  if (!result.success) {
    return res.status(422).json({
      error: "Validation failed",
      details: result.error.flatten().fieldErrors,
    });
  }

  const post = await prisma.post.create({ data: result.data });
  return res.status(201).json({ data: post });
});

Error Response Shape

Every error response must follow this structure:

interface ApiError {
  error: string;
  code?: string;
  details?: Record<string, string[]>;
}

Map status codes consistently:

  • 201 after successful creation
  • 204 after successful deletion (no body)
  • 400 malformed request, 422 valid JSON but failed validation
  • 401 missing auth, 403 insufficient permissions
  • 409 conflict (duplicate unique field)
  • 429 rate limited

React Component Patterns

Follow these steps when building any component.

  1. Define the props interface with explicit types
  2. Handle all states: loading, error, empty, success
  3. Extract data fetching into custom hooks
  4. Keep components under 80 lines. Split if larger
  5. Co-locate types, hooks, and tests with the component

BAD: Monolithic component with inline fetching

function UserProfile({ id }: { id: string }) {
  const [user, setUser] = useState<any>(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    fetch(`/api/users/${id}`)
      .then((r) => r.json())
      .then((d) => { setUser(d); setLoading(false); });
  }, [id]);

  if (loading) return <div>Loading...</div>;
  return <div>{user.name}</div>;
}

GOOD: Separated hook, typed props, all states handled

interface User {
  id: string;
  name: string;
  email: string;
}

function useUser(id: string) {
  return useQuery<User>({
    queryKey: ["user", id],
    queryFn: async () => {
      const res = await fetch(`/api/users/${id}`);
      if (!res.ok) throw new Error(`Failed to fetch user: ${res.status}`);
      const json = await res.json();
      return json.data;
    },
  });
}

interface UserProfileProps {
  id: string;
  onEdit?: (user: User) => void;
}

function UserProfile({ id, onEdit }: UserProfileProps) {
  const { data: user, isLoading, error } = useUser(id);

  if (isLoading) return <UserProfileSkeleton />;
  if (error) return <ErrorBanner message={error.message} />;
  if (!user) return <EmptyState label="User not found" />;

  return (
    <div>
      <h2>{user.name}</h2>
      <p>{user.email}</p>
      {onEdit && <button onClick={() => onEdit(user)}>Edit</button>}
    </div>
  );
}

Database Query Patterns

Follow these steps when writing any database operation.

  1. Use an ORM (Prisma) with generated types. Never write raw SQL unless optimizing
  2. Select only the fields you need
  3. Wrap related writes in a transaction
  4. Add indexes on fields used in WHERE, ORDER BY, or JOIN clauses
  5. Prevent N+1 queries with include or explicit joins

BAD: N+1 query, no field selection, no transaction

// Fetches all fields, then fires N extra queries
const posts = await prisma.post.findMany();
for (const post of posts) {
  const author = await prisma.user.findUnique({
    where: { id: post.authorId },
  });
  post.author = author;
}

// Two related writes with no transaction
await prisma.order.create({ data: orderData });
await prisma.inventory.update({
  where: { productId },
  data: { stock: { decrement: 1 } },
});

GOOD: Single query with include, selective fields, transaction

// One query, only needed fields, author included
const posts = await prisma.post.findMany({
  select: {
    id: true,
    title: true,
    createdAt: true,
    author: { select: { id: true, name: true } },
  },
  orderBy: { createdAt: "desc" },
  take: 20,
});

// Atomic transaction for related writes
await prisma.$transaction([
  prisma.order.create({ data: orderData }),
  prisma.inventory.update({
    where: { productId },
    data: { stock: { decrement: 1 } },
  }),
]);

Project Scaffold Procedure

When starting a new full-stack project, follow this order.

  1. Initialize with create-next-app --typescript --tailwind --app
  2. Install core deps: prisma, zod, @tanstack/react-query
  3. Set up Prisma schema and run prisma generate
  4. Create the shared types file at src/types/index.ts
  5. Build API routes with validation before any frontend work
  6. Build page components that consume the API via React Query hooks
  7. Add error boundaries at the layout level

Security Checklist

Run through these checks before any deployment.

  1. Validate all inputs with Zod on the server. Never trust the client
  2. Use parameterized queries (Prisma handles this). Never interpolate user input into SQL
  3. Set HTTP-only, secure, SameSite cookies for auth tokens
  4. Add rate limiting to auth endpoints (5 attempts per minute)
  5. Sanitize HTML output to prevent XSS. Use DOMPurify if rendering user content
  6. Return generic errors to clients. Log detailed errors server-side only

File Structure Convention

src/
  app/                # Next.js App Router pages and layouts
    api/              # API route handlers
  components/
    ui/               # Reusable primitives (Button, Input, Modal)
    features/         # Domain components (PostCard, UserAvatar)
  hooks/              # Custom React hooks (useUser, usePosts)
  lib/                # Utilities, Prisma client, API helpers
  types/              # Shared TypeScript interfaces

Place each feature's hook, component, and types together. Do not scatter related code across distant directories.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.