Skip to main content

AI & Developer Tools · Intermediate

Rules AI — Production Performance

Seven performance rules, as ready-to-paste prompts for Codex, Claude Code, OpenCode and Cursor

Download PDF

PDF · 49 KB · 6 pages

The PDF is in Arabic. This page describes it in your language; the file itself is unchanged.

  • ai
  • performance
  • agents.md
  • claude.md
  • codex
  • claude code
  • opencode
  • cursor
  • prompts
  • caching
  • pagination

01About this document

About this document

The goal is not only code that runs, but an application that holds up under real conditions without needless complexity. The opening page lists the six areas — pagination, database optimisation, image optimisation, caching, loading experience and performance testing — each in a single line.

Four pages follow, one per tool: OpenAI Codex, Claude Code, OpenCode and Cursor. Each is a full prompt asking the tool to create or update its own instruction file without overwriting existing guidance and to report any conflict. The last page is a checklist to run before shipping, with the official documentation for each tool, and a reminder that the rules are general and must be adapted to the stack and project size.

Preview

The first page of the document, as it is.Open the PDF in a new tab

02What you will learn

What you will learn

  • Give an AI coding tool durable performance rules before it writes any feature
  • Bound list endpoints and avoid N+1 queries with indexes based on real queries
  • Cache only what is safe, with clear keys, expiry and invalidation
  • Show proper loading, empty and error states instead of a blank screen
  • Check a project against a pre-launch checklist, measuring rather than guessing

03What is inside

What is inside

  1. 0101 — Pagination: bounded lists, server-side filtering and sorting
  2. 0202 — Database optimisation: indexes and avoiding N+1 queries
  3. 0303 — Image optimisation: sizing, compression and lazy loading
  4. 0404 — Caching: scope, expiry and invalidation
  5. 0505 — Loading experience: skeletons and states
  6. 0606 — Performance testing: realistic data and measured results
  7. 07Copy-ready prompts: Codex (AGENTS.md), Claude Code (CLAUDE.md), OpenCode (AGENTS.md), Cursor (AGENTS.md)
  8. 08Before you ship: a checklist, and the official documentation

04Who this is for

Who this is for

  • Developers starting a new project with an AI coding tool
  • Teams that want consistent performance rules across Codex, Claude Code, OpenCode and Cursor
  • Anyone reviewing an AI-assisted project before launch

05Related resources

  • AI & Developer Tools

    AI Coding Roadmap

    An ordered path through four coding agents, built from selected videos with a practical prompt to run after each one — three graded stages for Claude Code and three for Codex — plus a seven-day plan and a section on using AI without letting your own level slip.

  • AI & Developer Tools

    3 Prompts to Start a Project with AI

    Three ready prompts, one each for ChatGPT, Claude Code and Codex, that force the same sequence on every project: understand the problem before choosing any technology, review the plan before executing, then build phase by phase — with a checklist of what must be settled before you say “start building”.

  • AI & Developer Tools

    Find Skills — A to Z

    A twelve-page guide to Find Skills: what it is in one sentence, the search commands, installing it on Claude Code and on Codex — per project and globally — ready prompts for both, how to use it day to day, what to do once you have picked a skill, and a troubleshooting section.