返回 Skill 列表
extension
分类: 开发与工程无需 API Key

nycraves

NYCRAVES代码库的完整开发指南。在创建任何新代码时使用此技能 - 组件、页面、功能、数据函数或工具。确保视觉一致性(野兽派暗主题)、代码一致性(既定模式)和正确的Next.js 16架构(缓存、服务器组件、加载状态)。触发条件:(1) 创建新组件,(2) 构建新页面,(3) 添加功能,(4) 编写数据函数,(5) 关于模式或约定的问题。

person作者: jakexiaohubgithub

NYCRAVES Development Guide

Complete patterns and conventions for the NYCRAVES NYC rave events app.

What This Skill Covers

  1. UI Design System - Brutalist dark-mode aesthetic
  2. Component Patterns - Structure, naming, exports
  3. Architecture - Data fetching, caching, utilities
  4. Next.js 16 - Cache Components, Server/Client patterns

Core Principles

  1. Consistency over creativity - Match existing patterns exactly
  2. Server Components by default - Only use 'use client' when necessary
  3. Centralized utilities - Never duplicate functions across files
  4. Centralized constants - Import from lib/constants/, don't hardcode
  5. Barrel exports always - Every folder needs index.ts with named exports
  6. Cache everything - Data functions use 'use cache' + cacheTag + cacheLife

Quick Reference

Creating a New Component

  1. Place in /components/[domain]/
  2. Add 'use client' only if using hooks/browser APIs
  3. Define TypeScript interface for props
  4. Follow design tokens from design-tokens.md
  5. Match structure from component-patterns.md
  6. Add named export to domain's index.ts

Creating a Data Function

  1. Place in /lib/data/[domain].ts
  2. Add 'use cache' directive
  3. Add cacheTag('[domain]') for invalidation
  4. Add cacheLife('hours') or 'days'
  5. Export from lib/data/index.ts

See architecture-patterns.md for full examples.

Creating a New Utility

  1. Check if similar function exists in lib/utils.ts
  2. If reusable (2+ files), add to lib/utils.ts
  3. Add JSDoc comment explaining purpose
  4. Import from @/lib/utils everywhere

Reference Files

Load these as needed for detailed patterns and examples: