agentleFS
MindrallyMindrally/skills/modern-web-development/SKILL.md

modern-web-development

Skill275 starsChanged 38 days agoApache-2.0View on GitHub

Modern web development best practices for TypeScript, Next.js 14, React Server Components, Supabase, GraphQL, and Tailwind CSS.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 12 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, technical responses with accurate TypeScript examples

    line 17
  2. Very specific:

    Use descriptive variable names with auxiliary verbs (isLoading, hasError)

    line 20
  3. Very specific:

    Use function keyword for pure functions

    line 25
  4. Distinctive:

    Use guard clauses for precondition validation

    line 36
  5. Distinctive:

    Use functional components with TypeScript interfaces

    line 41
  6. Very specific:

    Write declarative JSX using function declarations

    line 42
  7. Distinctive:

    Use dynamic loading for non-critical components

    line 48
  8. Distinctive:

    Use Supabase for real-time synchronization and state management

    line 55
  9. Distinctive:

    Consider Vercel KV for chat history, rate limiting, and sessions

    line 56
  10. Distinctive:

    Use Supabase client for database interactions and subscriptions

    line 60
  11. Distinctive:

    Use Genql for type-safe GraphQL API interactions

    line 63
  12. Distinctive:

    Use Class Variance Authority (CVA) for component variants

    line 71
  13. Distinctive:

    Create integration tests for complex components

    line 76
  14. Distinctive:

    Ensure keyboard navigation throughout interfaces

    line 83
  15. Distinctive:

    Document Supabase schemas, RLS policies, and Edge Functions

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Modern Web Development

Brandon Fernandez's comprehensive cursor rules for modern web development with TypeScript, Node.js, Next.js 14, React, Supabase, GraphQL, Tailwind CSS, Radix UI, and Shadcn UI.

Key Development Principles

Code Style and Architecture

  • Write concise, technical responses with accurate TypeScript examples
  • Employ functional, declarative programming while avoiding class-based approaches
  • Prioritize iteration and modularization over code duplication
  • Use descriptive variable names with auxiliary verbs (isLoading, hasError)
  • Implement the RORO pattern (Receive an Object, Return an Object)

JavaScript/TypeScript Standards

  • Use function keyword for pure functions
  • Omit semicolons
  • Leverage TypeScript exclusively, preferring interfaces over types
  • Structure files as: exported component, subcomponents, helpers, static content, types
  • Minimize unnecessary curly braces in conditionals

Error Handling

  • Address errors and edge cases at function entry points
  • Apply early returns for error conditions avoiding deep nesting
  • Position the success path last for improved readability
  • Use guard clauses for precondition validation
  • Implement user-friendly error messaging

React and Next.js Guidelines

  • Use functional components with TypeScript interfaces
  • Write declarative JSX using function declarations
  • Style with Shadcn UI, Radix, and Tailwind CSS
  • Implement mobile-first responsive design
  • Minimize use client, useEffect, and setState - favor React Server Components
  • Employ Zod for form validation
  • Wrap client components in Suspense with fallbacks
  • Use dynamic loading for non-critical components
  • Optimize images (WebP format, size data, lazy loading)

Data and State Management

  • Leverage React Server Components for data fetching
  • Implement the preload pattern to prevent waterfalls
  • Use Supabase for real-time synchronization and state management
  • Consider Vercel KV for chat history, rate limiting, and sessions

Supabase and GraphQL

  • Use Supabase client for database interactions and subscriptions
  • Implement Row Level Security (RLS) policies
  • Leverage Supabase Auth, Storage, and Edge Functions
  • Use Genql for type-safe GraphQL API interactions
  • Optimize GraphQL queries to fetch only necessary data

Styling and Testing

Styling

  • Apply Tailwind CSS utility-first approach
  • Use Class Variance Authority (CVA) for component variants

Testing

  • Implement unit tests for utilities and hooks
  • Create integration tests for complex components
  • Develop end-to-end tests for critical user flows

Accessibility and Documentation

Accessibility

  • Ensure keyboard navigation throughout interfaces
  • Implement proper ARIA labels and semantic roles
  • Maintain WCAG-compliant color contrast ratios

Documentation

  • Provide clear JSDoc comments for IDE intellisense
  • Document Supabase schemas, RLS policies, and Edge Functions

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.