← 返回 Skills 市场
zhaobod1

Huo15 Karpathy Guidelines

作者 Job Zhao · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ✓ 安全检测通过
194
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install huo15-karpathy-guidelines
功能描述
将 Andrej Karpathy 的 LLM 编程四大行为规范打包为 OpenClaw Skill
使用说明 (SKILL.md)

SKILL.md — huo15-karpathy-guidelines

Name

huo15-karpathy-guidelines

Description

Karpathy 行为准则技能 — 将 Andrej Karpathy 的 LLM 编程四大行为规范(71K⭐)打包为 OpenClaw Skill,帮助 AI 在编程时避免常见陷阱,输出更高质量的代码。

Triggers

  • karpathy
  • 卡帕西准则
  • 行为规范
  • LLM陷阱
  • karpathy guidelines
  • 编程规范

Version

1.0.0


核心准则

1. Think Before Coding(三思而后行)

"The models make wrong assumptions on your behalf and just run along with them without checking."

核心原则:

  • 不确定就先问,别猜。 有歧义时呈现多个选项,而不是选一个闷头做。
  • 停下来的勇气。 遇到困惑就命名清楚、请求澄清,不假装懂。
  • 呈现权衡。 有 tradeoffs 就说出来,不假装只有一个正确答案。

常见陷阱:

  • 看到模糊的需求,不确认就按自己理解的做
  • 遇到不确定的 API 参数,瞎猜一个
  • 跳过代码审查环节直接交付

正确做法:

❌ "这个参数应该是xxx,我直接用了"
✅ "这个参数有两种可能的含义,您指的是哪种?A. xxx  B. xxx"

2. Simplicity First(简洁优先)

"They really like to overcomplicate code and APIs, bloat abstractions, don't clean up dead code."

核心原则:

  • 能用三行解决就别写三十行。 做完回头看能不能更短。
  • 不做额外功能。 只实现用户要求的,不加"灵活性"和"可扩展性"。
  • 删除无用代码。 自己造成的孤儿代码要清理,但不顺手删别人的。

常见陷阱:

  • 引入不必要的抽象层(Factory、Strategy、Visitor...)
  • 为"将来可能的需求"写提前量
  • 用设计模式证明代码复杂度的合理性

正确做法:

❌ "为了以后的扩展性,我加个接口层"
✅ 先写最简单的实现,等真正需要时再重构

3. Surgical Changes(精准手术)

"They still sometimes change/remove comments and code they don't sufficiently understand as side effects."

核心原则:

  • 只改该改的。 每个改动的行都要能追溯到用户的原始请求。
  • 不顺手重构。 旁边的代码没问题就别碰,哪怕你觉得可以更好。
  • 匹配现有风格。 即便自己的风格更好,也要服从已有的。

常见陷阱:

  • 改了 A 功能,顺手把 B 功能的代码也优化了
  • 删除"无用"的注释,结果那些注释是业务逻辑的关键
  • 重命名变量以符合自己的命名规范

正确做法:

❌ "这段代码不规范,我顺手改一下"
✅ 只改用户要求的部分,其他一律不动

4. Goal-Driven Execution(目标驱动)

"They don't manage their confusion, don't seek clarifications, don't surface inconsistencies, don't present tradeoffs, don't push back when they should."

核心原则:

  • 先定义成功标准。 动手前说清楚怎么算"完成了"。
  • 用机械验证。 不说"看起来不错"——用数字和测试证明。
  • 失败自动回滚。 改坏了立即还原,不留烂摊子。

常见陷阱:

  • 做完才发现和用户想要的不一样(没有确认目标)
  • "应该没问题吧"就交付,没有验证
  • 改坏了继续改,越改越乱

正确做法:

❌ "完成了,应该没问题"
✅ "我会验证以下几点:1) xxx 2) xxx,全部通过才算完成"

Usage

触发后,Agent 会自动遵循这四条准则进行编程工作。 也可通过 scripts/karpathy.sh 输出速查表。

Credits

Inspired by forrestchang/andrej-karpathy-skills (71K⭐)

安全使用建议
This skill appears to be a harmless packaging of coding guidelines. Before installing: confirm you trust the publisher (source/homepage is unknown), and understand that the skill provides behavioral instructions to your agent but does not enforce them programmatically. The included script is static and only prints a checklist; it makes no network calls and asks for no credentials. If you rely on provenance, consider requesting a link to the original repository or author for verification.
功能分析
Type: OpenClaw Skill Name: huo15-karpathy-guidelines Version: 1.0.3 The skill bundle provides behavioral guidelines for AI programming based on Andrej Karpathy's principles. It consists of a markdown file (SKILL.md) outlining best practices and a simple shell script (scripts/karpathy.sh) that prints a summary of these guidelines to the console. No malicious code, data exfiltration, or suspicious instructions were found.
能力评估
Purpose & Capability
Name and description match the contents: the SKILL.md contains the four Karpathy guidelines and a simple helper script is provided to print a checklist. Nothing requested (no env vars, no binaries) is unrelated to this purpose.
Instruction Scope
Runtime instructions are limited to describing behavior the agent should adopt when coding (ask clarifying questions, prefer simplicity, make surgical changes, define success). They do not instruct reading arbitrary files, accessing credentials, or sending data to external endpoints.
Install Mechanism
No install specification — instruction-only skill. The included scripts/karpathy.sh is a harmless static shell script that prints a heredoc; nothing is downloaded or executed beyond that when invoked.
Credentials
The skill requests no environment variables, no credentials, and references no config paths. There are no secrets or keys required that would be disproportionate to the declared purpose.
Persistence & Privilege
always:false and standard user-invocable/autonomous invocation defaults. The skill does not attempt to modify other skills or system configuration and does not require permanent presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install huo15-karpathy-guidelines
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /huo15-karpathy-guidelines 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
- No file changes detected in this version. - Functionality, features, and documentation remain unchanged from the previous release.
v1.0.2
v1.0.2 把本地工作态同步到 clawhub(之前本地版本号落后于 clawhub)
v1.0.1
- Added a frontmatter block with name, version, description, and aliases to SKILL.md for improved metadata. - No changes to functionality or guideline content; documentation only.
v1.0.0
- Initial release packaging Karpathy's four key LLM coding guidelines as an OpenClaw Skill. - Helps improve code quality and avoid common LLM coding pitfalls. - Supports multiple triggers including “karpathy”, “行为规范”, and more. - Summarizes best practices: ask before guessing, prioritize simplicity, make targeted changes, and execute with clear goals. - Includes ready-to-use usage instructions and a quick reference script.
元数据
Slug huo15-karpathy-guidelines
版本 1.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Huo15 Karpathy Guidelines 是什么?

将 Andrej Karpathy 的 LLM 编程四大行为规范打包为 OpenClaw Skill. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 194 次。

如何安装 Huo15 Karpathy Guidelines?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install huo15-karpathy-guidelines」即可一键安装,无需额外配置。

Huo15 Karpathy Guidelines 是免费的吗?

是的,Huo15 Karpathy Guidelines 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Huo15 Karpathy Guidelines 支持哪些平台?

Huo15 Karpathy Guidelines 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Huo15 Karpathy Guidelines?

由 Job Zhao(@zhaobod1)开发并维护,当前版本 v1.0.3。

💬 留言讨论