본문으로 건너뛰기
Skillpedia
일반 코딩70k · #3136

programming

하는 일

이 에이전트는 Python, Rust, TypeScript, Go로 프로그래밍 코드를 작성하도록 돕습니다. 코드의 품질과 유지 보수성을 높이기 위해 엄격한 원칙을 따릅니다.

사용하는 경우

  • ✓Python, Rust, TypeScript, 또는 Go로 새 스크립트를 작성할 때.
  • ✓기존 코드 파일(.py, .rs, .ts, .go)의 버그를 고칠 때.
  • ✓코드가 최신 프로그래밍 모범 사례를 따르도록 하고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/programming/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“숫자 목록의 평균을 계산하는 Python 함수를 작성해 주세요. 목록이 비어 있지 않은지도 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 먼저 파일의 프로그래밍 언어를 확인합니다. 그다음 해당 언어의 규칙을 읽고, 깔끔하고 효율적인 코드를 쓰는 일반 원칙을 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

…

자주 묻는 질문

‘잘 작성된 코드’는 무슨 뜻인가요?

이해하기 쉽고, 테스트하기 쉽고, 유지 보수하기 쉬운 코드를 뜻합니다. 오류와 불필요한 복잡성을 피하기 위해 엄격한 규칙을 따릅니다.

언어마다 특정 규칙을 따라야 하는 이유는 무엇인가요?

각 언어에는 고유한 특징과 모범 사례가 있습니다. 이 규칙을 따르면 코드가 효율적이고 안전하며, 해당 언어의 기능을 최대한 활용할 수 있습니다.

‘실패할 수 있는 테스트’란 무엇인가요?

오류 상황을 포함해 여러 상황에서 코드가 올바르게 동작하는지 확인하는 테스트입니다. 코드가 신뢰할 수 있는지 확인하는 데 꼭 필요합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
70k
순위
#3136
라이선스
NOASSERTION
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬