Skip to main content
Ganesh Joshi
Back to AI Rules

Use existing patterns

Updated 2026-02-13

Follow project APIs, patterns, and structure; don't invent new conventions or duplicate utilities that already exist. Use in any AI-assisted editor.

Use in Cursor, Windsurf, Codeium, or any AI-assisted editor.

Rule
# Use existing patterns

Follow the project's existing APIs, patterns, and structure. Do not invent new conventions or duplicate utilities that already exist.

- **Discover first:** Look for existing helpers, components, or modules that do what you need (e.g. shared UI components, API clients, error handling).
- **Consistency:** Use the same patterns for state management, routing, styling, and data fetching as the rest of the codebase.
- **Avoid:** Introducing a new library or pattern for something the project already does elsewhere, or creating a one-off solution when a project-wide pattern exists.
Use existing patterns | AI Rules | Ganesh Joshi