Discover and explore top open-source AI tools and projects—updated daily.
forrestchangLLM code generation guidelines for enhanced reliability
Top 7.5% on SourcePulse
This repository offers a CLAUDE.md file containing a set of guidelines designed to mitigate common pitfalls observed in Large Language Model (LLM) code generation. Inspired by Andrej Karpathy's analysis, these principles address issues such as LLMs making incorrect assumptions, overcomplicating solutions, performing unverified code modifications, and failing to manage confusion. The primary benefit is enabling users to elicit more reliable, simpler, and verifiable code from LLMs, particularly useful for developers integrating AI assistance into their workflows.
How It Works
The core methodology is built upon four guiding principles: "Think Before Coding," "Simplicity First," "Surgical Changes," and "Goal-Driven Execution." "Think Before Coding" combats hidden confusion and unwarranted assumptions by mandating explicit reasoning, clear articulation of assumptions, presentation of alternative interpretations, and proactive identification of ambiguities. "Simplicity First" counters overengineering by prioritizing minimal, problem-specific code, eschewing speculative features, unnecessary abstractions, and excessive configurability. "Surgical Changes" enforces precision, ensuring that modifications strictly target the requested changes without unintended side effects on adjacent code, comments, or formatting. Lastly, "Goal-Driven Execution" capitalizes on LLMs' iterative capabilities by transforming imperative instructions into declarative, verifiable success criteria, such as tests, enabling autonomous refinement and validation.
Quick Start & Requirements
Installation is straightforward: use the recommended CLI command npx skills add forrestchang/andrej-karpathy-skills. Alternatively, the CLAUDE.md file can be fetched directly using curl for integration into new or existing projects. No specific software prerequisites beyond npx (which comes with Node.js/npm) are detailed for applying these guidelines.
Highlighted Details
CLAUDE.md file for easy integration into LLM prompts.Maintenance & Community
The provided README does not contain specific information regarding maintainers, community channels (such as Discord or Slack), sponsorships, or a public roadmap for the project.
Licensing & Compatibility
This project is distributed under the MIT License. This permissive open-source license generally allows for broad usage, including commercial applications and integration into closed-source software, with minimal restrictions.
Limitations & Caveats
These guidelines intentionally prioritize caution and thoroughness over rapid execution. For exceedingly simple tasks, such as minor typo corrections or straightforward one-line code adjustments, users are encouraged to exercise discretion and apply judgment rather than strictly adhering to every principle, to avoid introducing unnecessary overhead.
1 week ago
Inactive
brennercruvinel
Codium-ai
microsoft