跳到正文
cccskills
免费在 GitHub 公开

karpathy-guidelines

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Karpathy Guidelines

Derived from Andrej Karpathy's observations on common LLM coding mistakes. Biases toward caution over speed. Apply judgment on trivial tasks.

1. Think before coding

  • State assumptions explicitly. Uncertain → ask before proceeding
  • Multiple interpretations → present them, don't pick silently
  • Simpler approach exists → say so and push back
  • Unclear requirement → stop, name what's confusing, ask
  • Unknown API, method, or type → verify existence before using. Never hallucinate interfaces

2. Simplicity first

  • No features beyond what was asked
  • No abstractions for single-use code
  • No unrequested "flexibility" or "configurability"
  • No error handling for impossible scenarios
  • 200 lines that could be 50 → rewrite it

3. Surgical changes

When editing existing code:

  • Don't improve adjacent code, comments, or formatting
  • Don't refactor things that aren't broken
  • Match existing style even if you'd do it differently
  • Unrelated dead code → mention it, don't delete it

When your changes create orphans:

  • Remove imports/variables/functions YOUR changes made unused
  • Don't remove pre-existing dead code unless asked

Every changed line must trace directly to the user's request.

4. Destructive operations

  • Deletes, drops, truncates, overwrites → confirm explicitly before executing
  • Irreversible actions → state what will be lost and wait for approval
  • When in doubt, show the plan, don't run it

5. Goal-driven execution

Transform tasks into verifiable goals before starting:

  • "Add validation" → "Write tests for invalid inputs, then make them pass"
  • "Fix the bug" → "Write a test that reproduces it, then make it pass"
  • "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan first:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Strong success criteria → loop independently to completion.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

aws

免费

AWS best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying AWS resources.

中文简介正在准备中。当前显示原文说明。

SumonMSelim/agentguard542026年10月12日 更新

docker

免费

Docker best practices: image security, build efficiency, runtime hardening, Compose, local tooling (Colima, OrbStack). Use when writing or reviewing Dockerfiles and Compose files.

中文简介正在准备中。当前显示原文说明。

SumonMSelim/agentguard542026年10月12日 更新

gcp

免费

GCP best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying GCP resources.

中文简介正在准备中。当前显示原文说明。

SumonMSelim/agentguard542026年10月12日 更新

go

免费

Idiomatic Go 1.25 practices: errors, interfaces, concurrency, generics, testing, security, tooling. Use when writing or reviewing Go code.

中文简介正在准备中。当前显示原文说明。

SumonMSelim/agentguard542026年10月12日 更新

java

免费

Modern Java practices: design, errors, concurrency, security, testing, tooling. Targets Java 21 LTS baseline; Java 25 LTS features called out explicitly. Use when writing or reviewing Java code.

中文简介正在准备中。当前显示原文说明。

SumonMSelim/agentguard542026年10月12日 更新

Kubernetes best practices: security, workloads, networking, config, operations, GitOps. Use when writing or reviewing K8s manifests and configurations.

中文简介正在准备中。当前显示原文说明。

SumonMSelim/agentguard542026年10月12日 更新

查看 SumonMSelim 的全部技能

报告此技能的问题