Skip to content
Intermediate

Best Gemini Prompt for Write Features

Why Gemini?

Gemini 2.5 Pro's 1M-token context window handles entire codebases, letting it write new features that are architecturally consistent with existing patterns, naming conventions, and dependencies.

Prompt Template
Open Gemini
Implement the following feature in my codebase.\n\nFeature description: {feature_description}\n\nTech stack: {tech_stack}\nLanguage / framework version: {versions}\n\nExisting code context:\n{existing_code}\n(Paste relevant files, interfaces, or schemas. More context = better consistency.)\n\nRequirements:\n- Functional requirements: {functional_requirements}\n- Non-functional requirements: {non_functional_requirements} (e.g., must be <200ms, handle 1000 concurrent users)\n- Must integrate with: {integration_points}\n- Must NOT change: {off_limits}\n\nDeliver:\n1. Implementation plan before writing any code (confirm with me if architecture choices exist)\n2. Full implementation with inline comments explaining non-obvious decisions\n3. Error handling and edge cases covered\n4. Any environment variables or config changes needed\n5. Manual test steps to verify the feature works
Example Output
Plan: add refresh_tokens table, issue pair on login, rotation middleware, /auth/refresh endpoint, revocation on logout. Implementation follows existing Express middleware pattern. Migration script included. Test steps: login → capture refresh token → call /auth/refresh → verify old token rejected.

Make it yours

Got your AI output? Make it better.

Paste what Gemini generated into Coda One — free, no signup.

Tips for Better Results
Paste your existing auth middleware and database schema — Gemini will match your exact token signing method and DB query style rather than introducing a conflicting pattern.
Example (filled in)
Add JWT refresh token rotation, Node.js Express + PostgreSQL, Node 20 / Express 4.18, [auth middleware + user model pasted], Refresh tokens expire 7 days, rotate on use, invalidate on logout, Must work with existing /auth/login endpoint, Do not modify User schema