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.

概览

The Karpathy Guidelines skill, hosted in the popular mxyhi/ok-skills repository which has earned over 400 stars, provides a structured behavioral framework for AI agents to minimize common programming errors. This coding-focused skill is designed for compatibility with agents like Claude, Cursor, and Codex. It instructs the AI to prioritize surgical code modifications over broad rewrites, helping to prevent unnecessary complexity in software projects. By surfacing underlying technical assumptions and establishing verifiable success criteria, the guidelines ensure that refactoring and writing tasks remain focused and accurate. This resource serves as a practical implementation of best practices for developers using LLM-based tools to maintain high code quality and logic consistency.

使用场景

Refactoring legacy codebases using surgical changes to minimize regression risks.
Conducting automated code reviews to identify and eliminate overcomplicated logic.
Defining clear success criteria and surfacing hidden assumptions before generating new functions.

安装说明

# Review source first
open https://github.com/mxyhi/ok-skills/blob/main/karpathy-guidelines/SKILL.md

Copy or clone the skill folder into your agent skills directory after reviewing its instructions and scripts.

安全提示

This skill consists of behavioral instructions and does not require specific system permissions or external dependencies. Users should review the guidelines within the mxyhi/ok-skills repository to ensure the logic aligns with their organization's internal coding standards and security policies before deployment.

相关 Skills

Skill Creator

anthropics/skills

编程开发

创建新技能、修改和改进现有技能,并衡量技能性能。适用于用户希望从零开始创建技能、编辑或优化现有技能、运行评估以测试技能、通过方差分析对技能性能进行基准测试,或优化技能描述以提高触发准确性的场景。

Claude CodeClaude
pythondesign
165,880 StarsApache-2.0

Claude API

anthropics/skills

编程开发

Claude API / Anthropic SDK 参考指南 — 包含模型 ID、定价、参数、流式传输、工具使用、MCP、智能体、缓存、Token 计数、模型迁移。 TRIGGER — 阅读 BEFORE 并打开目标文件;不要因为其“看起来像单行代码”而跳过 — 适用场景:提示词以任何形式提及 Claude/Anthropic(Claude、Anthropic、Fable、Opus、Sonnet、Haiku、`anthropic`、`@anthropic-ai`、`claude-*`、`us.anthropic.*`、`[1m]`);用户询问关于 LLM(定价/模型选择/限制/缓存) — 绝不回答

Claude CodeClaude
typescriptpython
165,880 StarsApache-2.0

MCP Builder

anthropics/skills

编程开发

创建高质量 MCP (Model Context Protocol) 服务器的指南,使 LLM 能够通过设计良好的工具与外部服务进行交互。在构建 MCP 服务器以集成外部 API 或服务时使用,无论是使用 Python (FastMCP) 还是 Node/TypeScript (MCP SDK)。

CodexClaude
typescriptpython
165,880 StarsApache-2.0

API And Interface Design

addyosmani/agent-skills

编程开发

指导稳定的 API 和接口设计。在设计 API、模块边界或任何公共接口时使用。在创建 REST 或 GraphQL 端点、定义模块间的类型契约或建立前后端边界时使用。

typescriptfrontend
81,373 StarsMIT

Browser Testing With Devtools

addyosmani/agent-skills

编程开发

通过 Chrome DevTools MCP 在真实浏览器中进行测试。在构建或调试任何在浏览器中运行的内容时使用。当你需要检查 DOM、捕获控制台错误、分析网络请求、分析性能或使用真实运行时数据验证视觉输出时使用。需要配置 chrome-devtools MCP 服务器。

Claude CodeClaude
javascriptreact
81,373 StarsMIT

Gh Address Comments

openai/plugins

编程开发

处理可操作的 GitHub 合并请求(PR)评审反馈。当用户想要检查未解决的评审线程、请求的更改或 PR 上的行内评审评论并实施选定的修复时使用。使用 GitHub 应用获取 PR 元数据和扁平化评论读取,并在涉及线程级状态、解决状态或行内评审上下文时,通过 `gh` 使用捆绑的 GraphQL 脚本。

Codex
reviewdata
4,888 StarsApache-2.0