Tooluck logoTooluck
SKILL.md

generate-ai-rules

Agent skill fromdivar-ir/ai-doc-gen

Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/*.mdc) — from codebase analysis. Use whenever the user wants to create or update CLAUDE.md, AGENTS.md, agent rules, Cursor rules, AI coding assistant configuration, or "onboard AI tools" to a project, even if they only mention one of the file types.

How to install generate-ai-rules

install generate-ai-rules
# install the ai-doc-gen pack with the skills CLI
npx skills add divar-ir/ai-doc-gen

# or add only this skill to Claude Code: copy the folder

skills/generate-ai-rules/

# into

~/.claude/skills/generate-ai-rules/ (all projects)

.claude/skills/generate-ai-rules/ (one project)

skills/generate-ai-rules/SKILL.md

MITFull file
1# Generate AI Rules
2
3Generate configuration files that help AI coding assistants work effectively with a codebase. Three targets, generated from the same analysis so they stay consistent:
4
51. **AGENTS.md** — the cross-tool standard (agents.md), read by most AI coding tools including Claude Code, Cursor, Codex, and Gemini CLI.
62. **CLAUDE.md** — Claude Code's project instructions file.
73. **.cursor/rules/*.mdc** — Cursor's scoped project rules.
8
9## Workflow
10
11### 1. Determine targets and gather data
12
13- Generate all three targets by default; the user may skip any (e.g., "skip cursor rules", "keep my existing CLAUDE.md").
14- If a target file already exists and the user didn't say to regenerate it, ask whether to update it or leave it alone.
15- Check `<repo>/.ai/docs/` for analysis documents from the `analyze-codebase` skill. If present, use them as the primary source (spot-check against the code — they may be stale). If absent, offer to run `analyze-codebase` first, or explore the codebase directly for a quicker pass.
16
17### 2. Generate the files
18
19Shared principles for all targets:
20
21- **Accuracy**: every command, path, and convention must come from the actual project. Test that commands at least look right against the manifest files (e.g., scripts in package.json, tasks in Makefile, `uv run` vs `pip`).
22- **Actionability**: specific, executable instructions beat vague guidance. "Run `uv run ruff format src/`" beats "format your code".
23…

Excerpt shown under the repository's MIT license.

More skills in ai-doc-gen

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates