Category

Code & Dev AI prompts

Code and dev AI prompts are structured instructions that get models like Claude or GPT to reason about software the way an engineer would. On Prompt Dock they target real tasks: debugging a stack trace, refactoring a messy function, writing unit tests, explaining unfamiliar code, generating regexes, or reviewing a diff for bugs. Because every prompt a member submits is reviewed by a person before it goes live, you avoid the vague one-liners that produce shallow answers. Free and premium prompts sit side by side, and you can reveal any of them and run it live in the Playground against a snippet before you drop it into your workflow.

21 prompts

Code & DevFree

Write a Failing Test That Reproduces This Bug Before I Fix It

Describe a bug and paste the function and the framework. Get a single focused failing test that reproduces it deterministically — the right assertion, the right fixture, no flakiness — so you fix the bug, not your guess about the bug.

GPT 5.25 views
Code & DevFree

Build Personal Cloud Storage in HomeLab

A phased mega-prompt that turns an AI into a disciplined infrastructure consultant — Built and battle-tested deploying a self-hosted Nextcloud stack on Proxmox, but generalized for any homelab/self-hosting build.

Claude Sonnet 53 views
Code & DevFree

Explain a Stack Trace and Give Me the Minimal Safe Fix

Paste an error stack trace plus the function it points at. Get a plain-English root cause, the smallest diff that fixes it, why that fix works, and the edge cases to watch — no over-engineering, no try/catch band-aids.

Claude Opus 4.82 views
Code & DevFree

Break a God Function into Small, Testable Units (No Behavior Change)

Paste a function that grew too big. Get it split into well-named single-responsibility helpers, a slim top-level function that reads like a table of contents, and a why-bullet for each extraction — guaranteed identical behavior, no new dependencies, no algorithm changes.

Grok 4.1 Fast Reasoning2 views
Code & DevFree

Turn a Git Diff into a Clean Conventional Commit Message

Paste your staged git diff and get one properly-typed, properly-scoped Conventional Commit message — imperative summary, optional why-body, and a BREAKING CHANGE footer when needed. For devs who want a readable history without agonizing over wording.

Claude Sonnet 4.61 views
Code & DevFree

Map Cloud Dependencies Before an Outage

Turn architecture notes into a critical-path and failure-dependency map with targeted read-only validation questions.

GPT-6.1 Sol0 views
Code & DevPremium

Plan a Terraform Backend Migration With Clear Stop Conditions

Build a reviewable backend migration plan that protects state ownership, handles client and lock compatibility, verifies workspace mapping, and defines when recovery is still safe.

GPT-6.1 Sol0 views
Code & DevFree

Review AWS Access Against Real Workflows

Compare IAM policies with required workflows and observed activity to produce a least-privilege review and a safe validation plan.

GPT-6.1 Sol0 views
Code & DevPremium

Review a PR Diff for Real Bugs and Security Holes (Skip the Nits)

Paste a pull request diff and intent. Get a severity-ranked review focused only on correctness bugs, security vulnerabilities, and serious performance issues — with line citations and fixes. No style nits, no invented findings, no speculation about code it can't see.

Gemini 3 Pro Preview0 views
Code & DevPremium

Plan a Workload Move Across AWS Accounts

Map the dependencies, cutover risks, access changes, and rollback limits of moving a workload into a separate AWS account.

GPT-6.1 Sol0 views
Code & DevFree

Triage Kubernetes Probe Failures Without Triggering More Restarts

Reconstruct a restart incident from sanitized events, status, logs, and probe configuration, then rank hypotheses and propose evidence-led containment options.

GPT-6.1 Sol0 views
Code & DevFree

Build a Regex from Plain English with Tests and a Breakdown Table

Describe what to match and what to skip in plain English. Get the tightest correct pattern for your engine, a part-by-part breakdown table, a table of match / no-match test cases, and a ready-to-paste code snippet — assumptions called out, no cargo-cult patterns.

Gemini 2.5 Pro0 views
Code & DevPremium

Turn RTO and RPO Into a Recovery Design

Translate business recovery goals into a dependency-aware architecture comparison, evidence gaps, and a validation plan.

GPT-6.1 Sol0 views
Code & DevFree

Review CI/CD Failure Paths Before the Next Release

Stress-review a pipeline on paper for cancellation, credential expiry, partial deployment, retries, stale artifacts, and failed cleanup, then produce a prioritized verification plan.

GPT-6.1 Sol0 views
Code & DevPremium

Build a Release Rollback Runbook With Data-Safety Gates

Create an operator-ready rollback decision plan that checks artifact availability, configuration and schema compatibility, short-lived access, and recovery evidence before any change.

GPT-6.1 Sol0 views
Code & DevFree

Review Terraform State Security Without Shared Credentials

Turn sanitized backend and access details into a prioritized state-security review, with scoped identities, version-aware locking, recovery checks, and explicit evidence gaps.

GPT-6.1 Sol0 views
Code & DevFree

Review CI OIDC Trust and Deployment Permissions

Audit the boundary between a CI workflow and its cloud role, checking actual subject and audience claims, untrusted triggers, environment controls, and resource-level access.

GPT-6.1 Sol0 views
Code & DevFree

Generate a Helpful PR Description from the Branch's Commits

Paste your branch's commit log and the diff stat. Get a reviewer-friendly PR description — a one-line summary, what changed and why, a test plan, and a risk/rollback note — so reviewers get context instead of a wall of 'misc fixes'.

Grok 4.30 views
Code & DevFree

Design AWS Account Boundaries for a Small Team

Turn a workload inventory and team constraints into a practical AWS account plan with access boundaries, ownership, costs, and a staged rollout.

GPT-6.1 Sol0 views
Code & DevFree

Plan a Restore Drill With Measurable Evidence

Create an isolated restore exercise that measures recovery time, data freshness, application integrity, and gaps without touching production.

GPT-6.1 Sol0 views
Code & DevFree

Design Kubernetes Probes Around Real Application Failures

Choose startup, readiness, and liveness signals from measured application behavior, with dependency-aware tradeoffs, timing assumptions, and a safe validation plan.

GPT-6.1 Sol0 views

Frequently asked

Where can I find good coding prompts for Claude or ChatGPT?

Prompt Dock's Code & Dev category collects them, and each prompt a member submits is reviewed by a person before it publishes. You can reveal the full text, check the recommended model, and run it in the Playground on a real snippet, so you confirm it handles debugging or refactoring the way you need before relying on it.

Which model is best for coding prompts?

Claude and GPT are both strong for code; Claude tends to excel at reading large files and explaining logic, GPT at quick generation. Each Code & Dev prompt lists a recommended model, and running it in the Playground lets you compare outputs on your own code before committing to one.

Can these prompts help me debug and refactor?

Yes. The category includes prompts built specifically for debugging error messages, refactoring for readability, adding tests, and doing code review. Reveal the prompt, paste your code into the Playground, and run it live to see the fix or explanation on your actual codebase rather than a generic example.

Free to start

Build on prompts you can trust.