# How to Integrate Karpathy-Guidelines as a Claude Code Plugin: Complete Setup Guide

> Learn how to integrate karpathy-guidelines as a Claude Code plugin. Follow this guide for a complete setup, choosing marketplace installation or direct file placement.

- Repository: [Jiayuan Zhang/andrej-karpathy-skills](https://github.com/forrestchang/andrej-karpathy-skills)
- Tags: how-to-guide
- Published: 2026-04-08

---

**You can integrate the karpathy-guidelines as a Claude Code plugin by either installing it via the marketplace using `/plugin install` commands or by placing the raw [`CLAUDE.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md) file directly into your project repository.**

The `forrestchang/andrej-karpathy-skills` repository packages Andrej Karpathy's coding principles as a Claude Code plugin, making the guidelines available globally across projects or portable for specific repositories. This implementation follows Claude Code's standardized plugin conventions using a skill-based architecture with dedicated manifest files.

## Understanding the Plugin Architecture

The repository structures the karpathy-guidelines following Claude Code's plugin specification across four core components.

### Skill Definition File

At [`skills/karpathy-guidelines/SKILL.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md), the repository stores the complete guideline text including the behavioral principles and licensing information. This Markdown-based skill file declares the guideline name, description, and usage instructions that Claude Code reads when loading the plugin.

### Plugin Manifest

The [`.claude-plugin/plugin.json`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/.claude-plugin/plugin.json) file serves as the registration entry point, declaring the plugin name, version, author metadata, and the path to the skill directory. Claude Code uses this manifest to locate and initialize the skill during startup.

### Marketplace Metadata

For distribution through the Claude Code marketplace, [`.claude-plugin/marketplace.json`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/.claude-plugin/marketplace.json) provides the required publication metadata including the plugin ID, owner information, display description, and category classification.

### Standalone Guidelines

The [`README.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/README.md) documents installation procedures and links to [`CLAUDE.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md), which contains the same guideline content formatted for direct inclusion in project repositories when the plugin route isn't preferred.

## Installation Methods

You have two primary methods to integrate these guidelines, depending on whether you want global availability or project-specific enforcement.

### Via Claude Code Marketplace (Recommended)

For global access across all your Claude Code sessions, install through the marketplace:

```text
/plugin marketplace add forrestchang/andrej-karpathy-skills
/plugin install andrej-karpathy-skills@karpathy-skills

```

These commands register the plugin in your Claude Code environment, making the karpathy-guidelines available automatically in every conversation according to the source configuration.

### Direct Project Integration

To embed the guidelines directly into a specific repository without using the plugin system, fetch the raw [`CLAUDE.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md) file:

```bash

# For new projects

curl -o CLAUDE.md https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md

# For existing projects (append to existing CLAUDE.md)

echo "" >> CLAUDE.md
curl https://raw.githubusercontent.com/forrestchang/andrej-karpathy-skills/main/CLAUDE.md >> CLAUDE.md

```

This method stores the guidelines in your project's version control, ensuring all team members follow the same principles without requiring individual plugin installation.

## Applying the Guidelines in Practice

Once integrated, reference the principles in your code comments to maintain consistency with the Karpathy methodology:

```python

# Follow the "Think Before Coding" principle:

# – State assumptions explicitly

# – Ask clarifying questions when ambiguous

```

## Summary

- The `forrestchang/andrej-karpathy-skills` repository implements Andrej Karpathy's coding guidelines as a Claude Code plugin using the standard skill-based architecture.
- **Skill definition** resides in [`skills/karpathy-guidelines/SKILL.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md), while **plugin registration** occurs through [`.claude-plugin/plugin.json`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/.claude-plugin/plugin.json).
- **Global installation** uses `/plugin install andrej-karpathy-skills@karpathy-skills` via the Claude Code marketplace.
- **Per-project installation** involves downloading [`CLAUDE.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md) directly into your repository root.
- The [`.claude-plugin/marketplace.json`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/.claude-plugin/marketplace.json) file handles publication metadata for marketplace distribution.

## Frequently Asked Questions

### What files are required to create a Claude Code plugin?

A Claude Code plugin requires at minimum a [`.claude-plugin/plugin.json`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/.claude-plugin/plugin.json) manifest file pointing to a skill directory, and a skill definition file (typically [`SKILL.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/SKILL.md)) containing the actual instructions. The `forrestchang/andrej-karpathy-skills` repository demonstrates this with [`skills/karpathy-guidelines/SKILL.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md) defining the content and [`.claude-plugin/plugin.json`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/.claude-plugin/plugin.json) handling registration.

### Can I use the karpathy-guidelines without installing the plugin?

Yes. You can download the raw [`CLAUDE.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md) file directly from the repository and place it in your project root. Claude Code automatically reads [`CLAUDE.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md) files in the working directory, applying the guidelines to that specific project without requiring marketplace installation.

### How do I update the plugin once installed?

Updates are handled through the Claude Code marketplace interface. Run `/plugin update andrej-karpathy-skills@karpathy-skills` to fetch the latest version from the registry, or reinstall using `/plugin install` if newer guidelines are published to the repository.

### What coding principles does the plugin enforce?

The plugin implements Andrej Karpathy's behavioral guidelines focusing on systematic thinking before implementation, as evidenced by the "Think Before Coding" principle that encourages stating assumptions explicitly and asking clarifying questions. The complete set of principles is defined in [`skills/karpathy-guidelines/SKILL.md`](https://github.com/forrestchang/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md) and includes four core tenets covering thought process, abstraction, understanding, and iteration.