Core principles

From MadAppGang/claude-code · View interactive version

Core principles is an AI agent skill from the GitHub repository MadAppGang/claude-code. Use when planning new projects, onboarding, or reviewing architectural decisions. Core principles and project structure for React 19 SPA development. Covers stack overview, project organization, agent execution rules, and authoritative sources.

How to use this skill

Skill file

Core Principles for React 19 SPA Development

Production-ready best practices for building modern React applications with TypeScript, Vite, and TanStack ecosystem.

Stack Overview

Project Structure

/src
  /app/               # App shell, providers, global styles
  /routes/            # TanStack Router file-based routes
  /components/        # Reusable, pure UI components (no data-fetch)
  /features/          # Feature folders (UI + hooks local to a feature)
  /api/               # Generated API types & client (from OpenAPI)
  /lib/               # Utilities (zod schemas, date, formatting, etc.)
  /test/              # Test utilities

Key Principles:

Agent Execution Rules

Always do this when you add or modify code:

  1. API Spec: Fetch latest via Apidog MCP and regenerate /src/api types if changed
  1. Data Access: Wire only through feature hooks that wrap TanStack Query. Never fetch inside UI components.
  1. New Routes:
  1. Server Mutations:
  1. Compiler-Friendly:
  1. Tests:
  1. Before Committing:

"Done" Checklist per PR

Authoritative Sources

Final Notes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.