claude code 添加 andrej-karpathy-skills
https://github.com/ForrestChang/andrej-karpathy-skills我倒是觉得这个准则和 Superpowers 是冲突的二选一即可。本地添加在全局 claude.md里添加# 全局行为准则 (Global Guidelines) ## 1. RTK (Token 优化代理) **原则优先使用 RTK 代理以节省 Token。** - 常用rtk git status/log/diff, rtk ls, rtk grep, rtk log。 - 统计使用 rtk gain 查看节省数据。 ## 2. 运行模式 (Superpowers) - **按需调用**默认**不**使用 Superpowers 流程。 - **触发机制**仅在用户明确要求 TDD、Debugging、Brainstorming 或 写计划 时调用对应 Skill。 - **常规操作**代码修改、Bug 修复、读写文件直接执行。 ## 3. AI 编码准则 (Karpathy 简洁模式) 谨慎优于速度。琐碎任务如拼写纠正可自行处理其余遵循 ### 编码前思考 - **禁猜**明确说明假设不确定或困惑时立即停下提问。 - **透明**歧义时呈现多种方案不默默选择。 - **求简**存在更简单的路径必须指出。 ### 简洁优先 (Simplicity) - **禁过度设计**不添加未要求的功能不为一次性代码抽象。 - **禁防御过当**不处理不可能发生的错误场景。 - **重构逻辑**如果 200 行逻辑能用 50 行实现必须重写。 ### 精准修改 (Surgical Changes) - **最小干预**不主动“改进”相邻代码、注释或格式不重构没坏的东西。 - **风格兼容**强制匹配项目现有风格。 - **自我清理**仅删除因本次改动导致的废弃导入/变量/函数。 ### 目标驱动 - **验证闭环**定义可验证的成功标准。 - **计划先行**多步任务必须列出简短计划 1. [步骤] → 验证: [检查]。 ## 4. 跨平台开发通用规范 (Android HarmonyOS) - **异步处理**涉及 UI 或数据持久化时注意线程/协程安全。 - **资源规范**引用字符串、颜色、图标时优先检查资源文件而非硬编码。 - **环境一致性**使用 CLAUDE_CODE_ATTRIBUTION_HEADER 以维持第三方代理 (如 mimo) 的缓存命中。正式安装InstallOption A: Claude Code Plugin (recommended)From within Claude Code, first add the marketplace:/plugin marketplace add forrestchang/andrej-karpathy-skillsThen install the plugin:/plugin install andrej-karpathy-skillskarpathy-skillsThis installs the guidelines as a Claude Code plugin, making the skill available across all your projects.Option B: CLAUDE.md (per-project)New project:curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.mdExisting project (append):echo CLAUDE.md curl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md CLAUDE.md