leek

Apply Agent Rules — Design skill for Claude Code

Design community

Apply an agent rules repo (CLAUDE.md, AGENTS.md, .cursorrules, etc.) into a target project tree.

How to install Apply Agent Rules

This entry records only its repository, not the path inside it, so there is no exact command to give. Open leek/apply-agent-rules and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Apply Agent Rules does

Apply an agent rules repo (CLAUDE.md, AGENTS.md, .cursorrules, etc.) into a target project tree. npx-style installer for any agent rules repo.

Alternatives in Design

  • Brand Guidelines — Apply Anthropic's official brand colors and typography to artifacts 94.1k ★
  • Design Expert — Apply expert UX/UI design thinking to design, redesign, enhance, or fix any interface element with meticulous 348 ★
  • Platform Design Skills — 300+ design rules from Apple HIG, Material Design 3, and WCAG 2.2 for cross-platform apps 261 ★

README

apply-agent-rules

[![npm version](https://img.shields.io/npm/v/apply-agent-rules.svg)](https://www.npmjs.com/package/apply-agent-rules) [![npm downloads](https://img.shields.io/npm/dm/apply-agent-rules.svg)](https://www.npmjs.com/package/apply-agent-rules) [![license](https://img.shields.io/npm/l/apply-agent-rules.svg)](./LICENSE)

Install agent rules into a target project, preserving directory structure. Works like `npx skills`: any git repo is a valid source.

What is this? (read me first)

**First, a feature of AI coding agents that a lot of people don't know about.** Most folks assume an agent reads a single rules file at the repo root (one `CLAUDE.md`, one `AGENTS.md`) and that's it. But agents like Claude Code, Codex, and Cursor also read rules files **inside subdirectories** — and a rules file in a folder only applies while the agent is working in that folder.

That means you can put a `CLAUDE.md` in `app/Models/` with rules just for models, another in `database/migrations/` with rules just for migrations, and so on. Localized rules, sitting right next to the code they govern, automatically picked up when the agent touches that part of the tree. It's a powerful feature, and it's the whole reason this tool exists.

The catch: those per-directory files are valuable but painful to share. Each agent reads a *different* filename (Claude Code → `CLAUDE.md`, Codex/others → `AGENTS.md`, Cursor → `.cursorrules`, Windsurf → `.windsurfrules`…), so if you want the same conventions across many repos you end up hand-copying a whole *tree* of files, under every agent's name, in every project. They drift instantly.

`apply-agent-rules` fixes that. You keep one rules repo whose **directory layout mirrors a real project**, then install it into any project. The tool walks the whole tree and drops each rule file at the **same relative path**, rendered to whichever agents that project uses. `update` later re-pulls **without clobbering edits you've made locally**. Think `npx