code_patterns
code_patterns analyzes the indexed codebase and returns the patterns it actually uses — framework, styling approach, state management, i18n strategy, testing setup, and naming conventions. It reads from real code, not configuration files.
code_patterns()What it detects
Section titled “What it detects”| Category | Examples |
|---|---|
| Framework | Next.js, NestJS, Express, FastAPI, Actix |
| Styling | Tailwind, CSS Modules, styled-components, Sass |
| State management | Redux, Zustand, Jotai, React Query, MobX |
| i18n | next-intl, i18next, react-intl |
| Testing | Jest, Vitest, pytest, cargo test, Playwright |
| Naming | camelCase, snake_case, PascalCase conventions per layer |
Output
Section titled “Output”Detected patterns:
Framework: Next.js 14 (App Router)Styling: Tailwind CSS with design tokensState: Zustand (client), React Query (server)i18n: next-intl, keys in messages/ar.json + en.jsonTesting: Jest + Playwright (E2E)API: tRPC (internal), REST (external)Naming: Components: PascalCase Functions: camelCase DB columns: snake_caseWhen to use
Section titled “When to use”- Before writing new code — understand what patterns to follow
- Onboarding to an unfamiliar project
- Before
code_rules— patterns give the raw facts, rules give the actionable guidance
Related
Section titled “Related”code_rules uses the detected patterns to return scope-specific rules for your AI agent to follow. Run code_patterns once to understand the project, then use code_rules during work sessions.