Prompt AI untuk Developer — Tinggal Salin & Tempel

Prompt yang sudah teruji untuk tugas coding harianmu: debug, review, test, refactor, SQL, pesan commit, dan dokumentasi. Atur bahasa dan framework sekali saja, lalu salin.

Diperbarui
Nilai kamuSetiap contoh di bawah ikut berubah saat kamu mengetik

Memahami kode

3
Jelaskan kode ini
Explain what this TypeScript code does, step by step. Then list:
1. Inputs and outputs
2. Side effects (network, files, state)
3. Edge cases it does not handle

```
[paste code]
```

Meminta efek samping dan edge case yang belum ditangani akan mengubah ringkasan menjadi review.

Pahami codebase yang asing
I am new to this React project. Based on the file tree and the files below, explain the architecture: the main modules, how data flows from a request to the response, and where I should look to change [feature].

File tree:
[paste tree]

Key files:
[paste files]
Jelaskan regex atau one-liner
Break this down token by token and give three example inputs that match and three that do not:

[paste regex or command]

Debug

4
Cari bugnya
This TypeScript function should [expected behavior] but instead [actual behavior].

```
[paste code]
```

Find the root cause. Explain why it happens before proposing a fix, and show the smallest change that fixes it.

Menjelaskan perilaku yang diharapkan vs yang terjadi adalah peningkatan terbesar untuk prompt debugging.

Jelaskan error dan stack trace
I get this error when [what you did]:

```
[paste error and stack trace]
```

Relevant code:
```
[paste code]
```

Explain what the error means, the most likely causes in order of probability, and how to confirm each one.
Kenapa ini lambat?
This TypeScript code takes [time] for [input size]. Identify the bottlenecks, estimate their complexity, and suggest optimizations ordered by impact vs effort. Do not change behavior.

```
[paste code]
```
Jadikan aku rubber duck
I am stuck on [problem]. Do not give me the answer yet. Ask me one question at a time to help me find the cause myself.

Cocok saat kamu ingin belajar, bukan sekadar mendapatkan perbaikan.

Menulis kode

5
Implementasi dari spesifikasi
Write a TypeScript function that [does X].

Requirements:
- [requirement]
- [requirement]

Handle these edge cases: [empty input, invalid values, …]. Use no external libraries. Add brief comments only where the logic is not obvious, and include example usage.
Buat komponen
Create a React component in TypeScript for [describe UI]. Props: [list]. It must be accessible (keyboard, ARIA where needed) and responsive. Keep styling minimal and separate from logic.
Tulis query SQL
Write a PostgreSQL query that [goal].

Schema:
```sql
[paste CREATE TABLE statements]
```

Explain the query, mention which indexes it needs, and point out anything that could be slow on large tables.
Konversi antar bahasa
Convert this code from [source language] to TypeScript. Keep the same behavior, use idiomatic TypeScript rather than a line-by-line translation, and list any behavior that cannot be preserved exactly.

```
[paste code]
```
Tulis shell script
Write a bash script that [goal]. It must: exit on errors (set -euo pipefail), print what it is doing, accept [arguments] with a --help message, and be safe to run twice.

Review & refactor

4
Code review
Review this code as a senior TypeScript engineer. Group findings by severity (bug, security, performance, readability). For each, quote the line, explain the problem and suggest a fix. Skip praise and nitpicks about formatting.

```
[paste diff or code]
```
Refactor dengan aman
Refactor this code for readability and maintainability without changing its behavior or public API. Explain each change in one line. Point out anything you were unsure was behavior-preserving.

```
[paste code]
```
Review keamanan
Audit this code for security issues: injection, XSS, auth and access control, secrets, unsafe deserialization, SSRF and input validation. For each finding give a concrete exploit scenario and a fix.

```
[paste code]
```
Sederhanakan
This works but feels too complicated. Show a simpler version with fewer branches and less state, and explain what made the original complex.

```
[paste code]
```

Test

3
Tulis unit test
Write Vitest unit tests for this TypeScript code. Cover the happy path, edge cases and error handling. Use descriptive test names, no shared mutable state, and mock only external dependencies.

```
[paste code]
```
Cari test case yang kurang
Here is a function and its tests. List the important cases the tests do not cover, then write tests for the three most valuable ones.

Code:
[paste code]

Tests:
[paste tests]
Buat data test
Generate [number] realistic test records as JSON for this schema. Include tricky values: unicode names, very long strings, empty optional fields, boundary numbers and dates around DST changes.

[paste schema or type]

Dokumentasi & komunikasi

5
Pesan commit dari diff
Write a conventional commit message for this diff: a subject line under 72 characters in the imperative mood, a blank line, then a short body explaining why the change was made.

```diff
[paste git diff --staged]
```

Dapatkan diff dengan git diff --staged.

Deskripsi pull request
Write a pull request description for these changes with sections: Summary, Why, How it works, How to test, Risks. Keep it concise.

[paste diff or list of changes]
Dokumentasikan fungsi
Add TypeScript doc comments (JSDoc/TSDoc, docstrings or equivalent) to this code: purpose, parameters, return value, errors thrown and one example. Do not change the code.

```
[paste code]
```
Tulis bagian README
Write the "Getting started" section of a README for this project: prerequisites, installation, configuration (environment variables), running locally and running tests. Use copy-pasteable commands.

Project details:
[paste package.json / notes]
Jelaskan ke non-developer
Explain this technical issue to a non-technical stakeholder in under 120 words: what happened, the impact on users, and what we are doing about it. No jargon.

[paste incident notes]

Perencanaan & desain

4
Bandingkan pendekatan
I need to [goal] in a React app. Compare [option A], [option B] and [option C] in a table: complexity, performance, maintenance, cost and when each is the best choice. Then recommend one for my situation: [context].
Desain skema database
Design a PostgreSQL schema for [domain]. Entities: [list]. Show CREATE TABLE statements with keys, constraints and indexes, and explain how it supports these queries: [queries].
Pecah fitur jadi task
Break this feature into small tasks of at most half a day each, in a sensible order, with acceptance criteria for each:

[describe feature]
Review desain API
Review this REST API design for consistency, naming, status codes, pagination, error format, versioning and security. Suggest concrete improvements.

[paste endpoints or OpenAPI spec]

Data kamu tidak pernah meninggalkan komputer kamu. Semua proses berjalan 100% secara lokal di browser kamu.

Apakah alat ini membantu?0.0 0 penilaian
Cheat sheet Git interaktifPerintah branch, commit, merge, rebase, stash, undo, dan riwayat dijelaskan singkat.Git Cheat Sheet →

Cara menggunakan Prompt AI untuk Developer

  1. Atur bahasa, framework, test runner, dan database kamu di bagian atas. Semua prompt akan ikut berubah.
  2. Pilih prompt sesuai tugasmu: memahami, debug, menulis, review, test, dokumentasi, atau perencanaan.
  3. Klik Salin prompt, tempel ke ChatGPT, Claude, Gemini, atau Copilot Chat, lalu ganti bagian [bracketed] dengan kode atau detailmu.
  4. Ajukan pertanyaan lanjutan di chat yang sama untuk menyempurnakan jawabannya.

Ciri prompt coding yang bagus

  • Konteks — bahasa, framework, dan versinya. „React 19 dengan TypeScript“ jauh lebih mudah dijawab dengan tepat dibanding „JavaScript“.
  • Yang diharapkan vs yang terjadi — untuk bug, jelaskan apa yang seharusnya terjadi dan apa yang terjadi sebenarnya.
  • Kode terkecil yang relevan — tempel fungsinya beserta pemanggilnya, bukan seluruh repository.
  • Batasan — jangan tambah dependency baru, pertahankan public API, harus jalan di Node 20…
  • Format output — diff, tabel, hanya test, atau penjelasan sebelum kode.

Verifikasi sebelum rilis

Asisten AI bisa menulis kode yang terlihat masuk akal tapi keliru halus: API yang dikarang, edge case terlewat, sintaks usang, atau pola yang tidak aman. Jalankan kodenya, baca dengan teliti seperti pull request rekan kerja, lalu minta asisten menulis test untuk output-nya sendiri. Jangan pernah menempel secret, kredensial, atau data pelanggan.

Rapikan kode sebelum ditempel dengan formatter JSON atau formatter SQL, dan cek regular expression yang dihasilkan di regex tester.

Juga dicari sebagai: prompt chatgpt untuk coding, prompt claude, prompt coding, prompt untuk programmer, prompt code review, prompt copilot, library prompt ai.

Tool yang cocok dipakai bersama Prompt AI untuk Developer

  • Git Cheat Sheet — Setiap perintah Git yang kamu pakai sehari-hari, dan yang kamu butuhkan saat ada yang salah, dijelaskan dalam satu baris.
  • Cheat Sheet Perintah Linux — Perintah Linux dan bash yang dipakai developer di server dan laptop: file, pencarian, izin, proses, log, jaringan, dan SSH.
  • Cheat Sheet Docker — Perintah Docker dan Docker Compose yang paling sering kamu pakai tiap minggu, dijelaskan dalam satu baris.
  • Cheat Sheet PowerShell — Perintah PowerShell yang sehari-hari dipakai developer dan admin di Windows — dan di PowerShell 7 untuk macOS dan Linux — dijelaskan dalam satu baris masing-masing.

Pertanyaan yang sering diajukan

Apakah prompt ini bisa dipakai di ChatGPT, Claude, Gemini, dan Copilot?
Bisa. Prompt ini ditulis dengan bahasa sederhana sehingga cocok untuk asisten AI yang mumpuni, termasuk ChatGPT, Claude, Gemini, dan GitHub Copilot Chat.
Amankah menempel kode saya ke asisten AI?
Cek dulu kebijakan perusahaanmu. Hapus secret, API key, data pelanggan, dan URL internal sebelum menempel, dan pilih paket business atau enterprise yang tidak memakai datamu untuk melatih model.
Bagaimana cara mendapatkan jawaban yang lebih baik?
Berikan konteks (bahasa, framework, versi), jelaskan yang kamu harapkan dibanding yang terjadi, tempel kode terkecil yang menunjukkan masalahnya, lalu minta penjelasan alasannya sebelum perbaikan. Ajukan pertanyaan lanjutan alih-alih mulai dari awal.
Bisakah saya memasang Prompt AI untuk Developer sebagai aplikasi web dan memakainya offline?
Bisa. Prompt AI untuk Developer adalah aplikasi web (PWA) yang bisa dipasang. Pemasangannya lewat browser kamu, bukan diunduh dari toko aplikasi. Klik Pasang aplikasi di bagian atas halaman ini di Chrome atau Edge (Windows, macOS, Linux, ChromeOS) atau di Android. Di iPhone dan iPad, gunakan Bagikan → Tambahkan ke Layar Utama, dan di Safari 17+ pada Mac, gunakan File → Tambahkan ke Dock. Setelah itu, aplikasi akan terbuka di jendelanya sendiri dengan ikonnya sendiri. Karena berjalan sepenuhnya di browser kamu, aplikasi ini tetap bisa dipakai offline. Firefox di desktop tidak bisa memasang aplikasi web. Cara memasang aplikasi.

Tool terkait