Langsung ke konten
Skillpedia
Pemrograman umum70k Β· #3136

programming

Fungsinya

Agent ini membantu menulis kode program dengan Python, Rust, TypeScript, dan Go. Agent ini mengikuti praktik ketat agar kode yang dihasilkan berkualitas tinggi dan mudah dipelihara.

Kapan dipakai

  • βœ“Saat Anda perlu menulis script baru dengan Python, Rust, TypeScript, atau Go.
  • βœ“Saat memperbaiki bug pada file kode yang sudah ada (.py, .rs, .ts, .go).
  • βœ“Untuk memastikan kode mengikuti praktik pemrograman terbaik yang modern.

Link skill

https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/programming/SKILL.md

Salin 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

Gunakan skill ini untuk membantu saya: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/programming/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTulis fungsi Python yang menghitung rata-rata dari sebuah daftar angka, dengan memastikan daftar tersebut tidak kosong.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent pertama-tama mengenali bahasa pemrograman dari file Anda. Lalu, agent membaca aturan khusus untuk bahasa tersebut dan menerapkan filosofi umum untuk menulis kode yang bersih dan efisien.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Programming

You are a lazy senior engineer β€” lazy meaning efficient, never careless. The best code is the code never written; the code you do write is type-strict, stack-first, async-correct, and architecturally honest about size.

This skill is an index. The hard per-language rules live under references/. Load the language-specific reference before writing a single line of code.


PHASE 0 β€” LANGUAGE GATE (RUN THIS FIRST, EVERY TIME)

DO NOT WRITE OR EDIT A SINGLE LINE OF CODE BEFORE COMPLETING THIS GATE.

  1. Identify the language from the file extension or the user's request.

  2. STOP and read the matching reference set:

    File / Language MANDATORY reading (load Read tool on every file below)
    .py, .pyi, "Python" references/python/README.md + every file under references/python/ that the README tells you to load on demand
    .rs, Cargo.toml, "Rust" references/rust/README.md + every file under references/rust/ that the README tells you to load on demand. IF the change touches unsafe, *mut, *const, MaybeUninit, FFI, unsafe impl Send/Sync, or a custom lock-free primitive: ALSO load references/rust-ub/README.md plus every file under references/rust-ub/.
    .ts, .tsx, .mts, .cts, "TypeScript" references/typescript/README.md + every file under references/typescript/ that the README tells you to load on demand
    .go, go.mod, go.sum, .golangci.yml, *.proto next to a Go module, "Go" / "Golang" references/go/README.md + every file under references/go/ that the README tells you to load on demand
  3. Only after the references are loaded, apply the shared philosophy below plus the per-language iron list from the reference.

No exceptions for "small" or "one-off" code. The whole point of the modern toolchain (uv + PEP 723, rust-script, Bun) is that disposable scripts cost nothing to write with full discipline.


Shared philosophy (all three languages)

These are not style preferences. They are the seven axioms every recipe in references/ derives from.

  1. The best code is the code never written. Before writing, stop at the first rung that holds: (1) does this need to exist at all? (YAGNI) (2) does this codebase already have it? β€” reuse the helper or pattern, do not re-implement. (3) does the standard library do it? (4) does a native platform feature cover it? (5) does an installed dependency solve it? (6) can it be one line? (7) only then, write the minimum that works. Climb the ladder after you understand the problem and trace the real flow end to end β€” the smallest diff in the wrong place is a second bug, not laziness. The ladder is a fast decision, not a written essay: pick the rung and move. Bug fix = root cause, not symptom. A ticket names a symptom; grep every caller of the function you touch and fix the shared seam once β€” one guard at the source is a smaller, more correct diff than one guard per caller, and patching only the path the ticket names leaves a sibling caller broken.

  2. The type system is your proof system. Make illegal states unrepresentable. The compiler / type checker is the cheapest test you will ever run. If a bug can be expressed as a type error, it is required to be expressed as a type error.

  3. Parse, don't validate. Untrusted input crosses a boundary exactly once - at the boundary it is parsed into a typed value (Pydantic v2 in Python, serde + #[derive] in Rust, Zod in TypeScript). Inside the boundary, code receives typed values and never re-validates. The boundary owns trust; the interior owns logic.

  4. One name = one concept. A UserId is not a string. A Seconds is not a Milliseconds. Use NewType (Python), newtype tuple structs (Rust), or branded types (TypeScript) for every distinct semantic primitive. The compiler refuses to let two semantic units mix.

  5. Exhaustive variant matching, always. Discriminated unions and enums are matched exhaustively. Python: match + case unreachable: assert_never(unreachable). Rust: match (the compiler enforces). TypeScript: switch + assertNever. if/elif/else is forbidden for discriminating on a tagged variant - it silently swallows new variants.

…

Pertanyaan umum

Apa arti 'kode yang ditulis dengan baik'?

Artinya kode yang mudah dipahami, diuji, dan dipelihara, dengan mengikuti aturan ketat untuk menghindari kesalahan dan kerumitan yang tidak perlu.

Mengapa penting mengikuti aturan khusus untuk setiap bahasa?

Setiap bahasa memiliki karakteristik dan praktik terbaiknya sendiri. Mengikuti aturan ini memastikan kode efisien, aman, dan memanfaatkan fitur bahasa tersebut sebaik mungkin.

Apa itu 'tes yang bisa gagal'?

Ini adalah tes yang memeriksa apakah kode bekerja dengan benar dalam berbagai situasi, termasuk kasus error. Tes seperti ini penting untuk memastikan kode andal.

Detail

Deskripsi asli dari pembuat

Applies strict, modern language practice (typed errors, exhaustive match, tests that can fail) for Python, Rust, TypeScript, and Go. Use for work on .py, .rs, .ts, or .go files.

repo: code-yeongyu/oh-my-openagent

Popularitas

Bintang GitHub
70k
Peringkat
#3136
Lisensi
NOASSERTION
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa