My Cheatsheets

Enticing Thinking for Code Projects

With the release of the GPT-5 model in August 2025, OpenAI updated usage limits—especially for the deeper Thinking mode.

ChatGPT (web/mobile)

Tier GPT-5 Standard GPT-5 Thinking (deeper reasoning)
Free 10 messages per 5 hours; then switches to GPT-5 mini. Also 1 Thinking message per day. 1 Thinking message/day.
Plus Up to 160 messages per 3 hours (temporary increase; may revert). Up to 200 messages per week. Automatic switching doesn’t count.
Pro/Team Unlimited GPT-5 usage (subject to abuse guardrails). Access to GPT-5 Thinking Pro for more extended reasoning.

Notably: Manual GPT-5 Thinking usage is capped at 200 messages/week on Plus and Team. Automatic switching from GPT-5 to GPT-5 Thinking does not consume this weekly quota.

There are essentially two buckets:

What this means: if you are in standard GPT-5 and the system decides your request needs more reasoning, it will “upgrade” internally at no cost to your manual Thinking quota.

How to spot auto-switching (informal signs)

Reset timing: Weekly Thinking limits reset 7 days after your first message, at 00:00 UTC on the reset day. You can see the reset date by hovering the model name in the picker.

The goal of these cheats is to reliably push deeper reasoning without burning a manual Thinking slot. If a result feels shallow, re-run it explicitly with the Thinking model to spend one of your 200 for the week.

General Prompt Structure

“You are acting as a senior [language/framework] engineer. Task: [clear outcome]. Context: [repo summary / constraints / runtime / env]. Inputs: [code snippets, error logs, benchmarks]. Requirements: [functional + non-functional]. Deliverables: [plan, patch, tests, risks, alternatives]. Evaluate edge cases, trade-offs, and failure modes before proposing code.”

Why it helps: multiple linked tasks + constraints + evaluation criteria tends to trigger auto-escalation.


1) Bug Triage & Minimal Repro

Template

“Given this failing behavior [symptoms/logs], infer likely root causes ranked by probability. Produce a minimal reproducible example in [language/tooling]. For each suspected cause, show a quick experiment to falsify it, then propose the smallest patch and the regression test.”

Signals that trigger depth: ranking, falsification plan, MRE, patch + test pair.


2) Spec → Plan → Interfaces (no code first)

Template

“Translate this feature request [spec/user story] into:

  1. explicit invariants and pre/post-conditions,
  2. module boundaries and public interfaces,
  3. a stepwise implementation plan with clear checkpoints and rollback. Highlight ambiguous requirements and propose clarifying questions. Only then outline code structure.”

Why: forces requirement disambiguation + architecture before code.


3) Defensive Test Design

Template

“Design a test suite for [component] covering:

  • happy paths, boundary values, property-based cases, and adversarial inputs;
  • performance guards (time/mem thresholds);
  • concurrency/race conditions if applicable. Return: test matrix table, example inputs/expected outputs, and rationale per case.”

Add-on: “Convert the matrix into [framework] test stubs.”


4) Performance Analysis

Template

“Given [benchmarks/profiles], identify the true bottleneck. Compare at least 3 optimization strategies (algorithmic, data-structure, system-level) with complexity analysis and expected absolute wins on current workload. Provide a guardrail benchmark and acceptance threshold to verify the win.”

Key: comparative strategies + quantified targets.


5) Refactor With Safety

Template

“Refactor [module/path] to improve [maintainability/cohesion/cyclomatic/duplication]. Constraints: zero behavior change; public API stable. Output: refactor map (before→after), risk list, and a safety net (snapshot tests, golden files, or contract tests). Show how to stage the change across N small PRs.”


6) Concurrency & Correctness

Template

“For [concurrent/async] code, enumerate possible interleavings that violate invariants. Provide a happens-before diagram and identify deadlock/livelock/starvation risks. Propose a synchronization strategy (locks/STM/actors/channels) and justify with contention analysis.”


7) API Design Review (backwards-compat)

Template

“Evaluate this API [signature/examples] for: ergonomics, consistency, discoverability, error surface, and evolution strategy. Propose deprecation path and versioning policy; include adapters/shims for [old→new]. Provide examples that make mis-use hard.”


8) Migration/Rewrite Plan

Template

“Plan migration from [X] to [Y]. Map data/schema transforms, compatibility layers, dual-write/dual-read strategy, and cutover criteria. Identify irreversible steps and a rollback plan. Provide a milestone timeline with measurable gates.”


9) Security & Threat Modeling (lightweight)

Template

“Do a quick threat model for [component] using STRIDE-lite. List assets, trust boundaries, and the top 5 concrete threats with exploit sketches. Recommend mitigations with cost/impact and note residual risk.”


10) Code Review With Rationale

Template

“Review this diff [patch]. Classify findings: correctness, performance, readability, testability, security. For each, provide a one-sentence rationale plus a minimal fix snippet. End with a risk summary and whether to approve, block, or request changes.”


Cheatsheet: Phrases That Nudge Auto-Thinking


When to Spend Manual Thinking

Use the toggle when:


Example (drop-in)

“You are a senior Go engineer. Task: intermittent deadlock in the job scheduler. Context: Go 1.22, Linux, 16-core; scheduler uses worker pool + buffered channels; see logs below. Inputs: [stack traces / pprof]. Requirements: no functional regressions; must handle 50k jobs/min; p95 latency < 150ms. Deliverables: (1) ranked root causes with falsification experiments, (2) minimal repro, (3) proposed fix with happens-before explanation, (4) test plan covering races and starvation, (5) rollback plan.”