prototype
Fungsinya
Skill ini membangun kode sekali pakai yang menjawab satu pertanyaan tentang bagaimana sesuatu seharusnya bekerja atau terlihat. Skill ini ditujukan bagi orang produk dan pengembang yang ingin menguji sebuah gagasan sebelum membangunnya sungguhan.
Kapan dipakai
- โSaat Anda ingin memeriksa apakah sebuah model logika atau state sudah terasa tepat.
- โKetika Anda ingin membandingkan beberapa versi layar yang sangat berbeda.
- โKetika Anda belum yakin bagaimana sesuatu seharusnya bekerja dan ingin mengujinya lebih dulu.
Link skill
https://github.com/mattpocock/skills/blob/main/skills/engineering/prototype/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โSaya butuh prototipe cepat sekali pakai agar bisa melihat tiga tata letak berbeda untuk halaman checkout saya.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memilih salah satu dari dua jalur berdasarkan pertanyaan Anda: halaman yang bisa dibagikan untuk menguji logika, atau beberapa versi layar yang bisa dialihkan untuk melihat desain. Agent memberi label jelas pada kode sebagai prototipe.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Prototype
A prototype is throwaway code that answers a question. The question decides the shape.
Pick a branch
Identify which question is being answered, using the user's prompt, the surrounding code, or by asking if the user is around:
- "Does this logic / state model feel right?" โ LOGIC.md. Build a single shareable HTML file (free-play buttons plus tabbed guided walkthroughs) that pushes the state machine through cases that are hard to reason about on paper, and that a non-developer can drive.
- "What should this look like?" โ UI.md. Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.
The two branches produce very different artifacts, so getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module โ logic; a page or component โ UI) and state the assumption at the top of the prototype.
Rules that apply to both
- Throwaway from day one, and clearly marked as such. Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious, but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
- Trivial to run. A UI prototype starts from one command in the project's task runner:
pnpm <name>,python <path>,bun <path>, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it. - No persistence by default. State lives in memory. Persistence is the thing the prototype is checking, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE, wipe me" name.
- Skip the polish. No tests, no error handling beyond what makes the prototype runnable, no abstractions. The point is to learn something fast.
- Surface the state. After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
- Capture it when done. Fold any validated decision into the real code, then capture the prototype itself as a primary source: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
Pertanyaan umum
Apakah prototipe itu dimaksudkan untuk disimpan?
Tidak. Skill menyatakan itu kode sekali pakai yang diberi tanda jelas agar tidak keliru dianggap kode produksi.
Apa perbedaan kedua jalur?
Satu membantu menguji cara logika bekerja dalam satu file yang bisa dibagikan. Yang lain menampilkan beberapa versi antarmuka dalam satu halaman.
Bagaimana jika saya tidak yakin harus memilih jalur yang mana?
Agent memilih berdasarkan kode di sekitarnya dan menyatakan asumsinya di bagian atas prototipe.
Detail
Deskripsi asli dari pembuat
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
repo: mattpocock/skills
Popularitas
- Bintang GitHub
- 310k
- Peringkat
- #105
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
ask-matt
310kMembuat agent Anda menjadi pemandu kumpulan skill pemrograman, menunjuk skill yang tepat untuk situasi Anda, dari ide sampai kode yang siap dirilis.
code-review
310kMemeriksa perubahan Anda terhadap standar kode repositori dan spesifikasi asli, dengan menjalankan kedua tinjauan berdampingan sebelum Anda menggabungkan.
domain-modeling
310kMembangun glosarium proyek bersama dan mencatat keputusan desain penting, agar kode Anda memakai kata-kata yang sama dengan yang dipakai tim Anda.
implement-spec
310kMengubah spesifikasi yang sudah selesai dan tiketnya menjadi kode yang berfungsi, menangani tiket secara berurutan dan menggabungkannya dalam satu cabang.
Skill serupa
canvas
394kMemungkinkan agent Anda menampilkan widget visual yang di-hosting di panel Mac yang terhubung, lalu menyembunyikan panel atau memindahkannya ke halaman lain.
control-ui
394kMembantu agent Anda mengatur dan memecahkan masalah OpenClaw Control UI, termasuk sesi, dasbor, dan Gateway yang terhubung.
diagram-maker
394kMembantu agent Anda membuat diagram yang jelas sebagai SVG, HTML, atau Excalidraw yang dapat diedit untuk proses, arsitektur sistem, dan sketsa papan tulis.