agentleFS
HotakusHotakus/hotakus-useful-skills/karpathy-guidelines/SKILL.md

karpathy-guidelines

Skill2 starsChanged 4 months agoMITView on GitHub

减少常见 LLM 编码错误的行为准则。在编写、审查或重构代码时使用,以避免过度复杂化、进行外科手术式修改、明确假设并定义可验证的成功标准。

126 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use huashu-design, github-cli and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • XIYBHKSkill

    huashu-design

    花叔Design(Huashu-Design)——用HTML做高保真原型、交互Demo、幻灯片、动画、设计变体探索+设计方向顾问+专家评审的一体化设计能力。HTML是工具不是媒介,根据任务embody不同专家(UX设计师/动画师/幻灯片设计师/原型师),避免web design tropes。触发词:做原型、设计Demo、交互原型、HTML演示、动画Demo、设计变体、hi-fi设计、UI mockup、prototype、设计探索、做个HTML页面、做个可视化、app原型、iOS原型、移动应用mockup、导出MP4、导出GIF、60fps视频、设计风格、设计方向、设计哲学、配色方案、视觉风格、推荐风格、选个风格、做个好看的、评审、好不好看、review this design。**主干能力**:Junior Designer工作流(先给假设+reasoning+placeholder再迭代)、反AI slop清单、React+Babel最佳实践、Tweaks变体切换、Speaker Notes演示、Starter Components(幻灯片外壳/变体画布/动画引擎/设备边框)、App原型专属守则(默认从Wikimedia/Met/Unsplash取真图、每台iPhone包AppPhone状态管理器可交互、交付前跑Playwright点击测试)、Playwright验证、HTML动画→MP4/GIF视频导出(25fps基础 + 60fps插帧 + palette优化GIF + 6首场景化BGM + 自动fade)。**需求模糊时的Fallback**:设计方向顾问模式——从5流派×20种设计哲学(Pentagram信息建筑/Field.io运动诗学/Kenya Hara东方极简/Sagmeister实验先锋等)推荐3个差异化方向,展示24个预制showcase(8场景×3风格),并行生成3个视觉Demo让用户选。**交付后可选**:专家级5维度评审(哲学一致性/视觉层级/细节执行/功能性/创新性各打10分+修复清单)。

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    github-cli

    GitHub CLI authentication and workflow configuration. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `github-cli` work when listed in TEAM.yaml or explicitly requested.

    Also in 3 projects that use this

  • seikaikyoSkill

    banner-design

    Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with optional generated or supplied visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage.

    Also in 4 projects that use this

  • OpenAISkill

    using-superpowers

    Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions

    Also in 9 projects that use this

  • GoogleSkill

    ponytail

    Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen everything: question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni", "do less", or "shortest path", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).

    Also in 9 projects that use this

  • LLl0k0laDSkill

    idea-refine

    Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.

    Also in 4 projects that use this

The file

Files
SKILL.md

Karpathy 编码准则

减少常见 LLM 编码错误的行为准则,源自 Andrej Karpathy 对 LLM 编码陷阱的观察。

权衡取舍: 这些准则偏向谨慎而非速度。对于简单任务,请自行判断。

1. 先思考再编码

不要假设。不要隐藏困惑。明确权衡取舍。

在实现之前:

  • 明确陈述你的假设。如果不确定,请提问。
  • 如果存在多种解释,请列出它们——不要默默选择一种。
  • 如果存在更简单的方案,请说出来。在有充分理由时提出反对意见。
  • 如果某件事不清楚,停下来。指出困惑之处。提问。

2. 简单优先

用最少的代码解决问题。不要做投机性工作。

  • 不添加超出需求的功能。
  • 不为只使用一次的代码创建抽象。
  • 不添加未被要求的"灵活性"或"可配置性"。
  • 不为不可能发生的场景添加错误处理。
  • 如果你写了 200 行代码而 50 行就能解决,重写它。

扪心自问:"资深工程师会不会说这过度复杂了?"如果是,那就简化。

3. 外科手术式修改

只触碰必须改的。只清理你自己造成的混乱。

在编辑现有代码时:

  • 不要"改进"相邻的代码、注释或格式。
  • 不要重构没有坏的东西。
  • 匹配现有风格,即使你会有不同的写法。
  • 如果你注意到无关的死代码,提出来——但不要删除它。

当你的改动产生了孤立代码时:

  • 删除因你的改动而不再使用的导入/变量/函数。
  • 不要删除预先存在的死代码,除非被明确要求。

检验标准:每一行改动都应该能直接追溯到用户的请求。

4. 目标驱动执行

定义成功标准。循环执行直至验证通过。

将任务转化为可验证的目标:

  • "添加验证" → "为无效输入编写测试,然后让它们通过"
  • "修复 bug" → "编写一个能复现 bug 的测试,然后让它通过"
  • "重构 X" → "确保重构前后测试都通过"

对于多步骤任务,给出简要计划:

1. [步骤] → 验证: [检查项]
2. [步骤] → 验证: [检查项]
3. [步骤] → 验证: [检查项]

强有力的成功标准能让你独立循环推进。薄弱的成功标准("让它能跑")则需要不断澄清。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.