generate-ai-rules
Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/*.mdc) — from codebase analysis
Install / Use
npx skills add divar-ir/ai-doc-gen --skill generate-ai-rulesInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Human ResourcesSupported Platforms
Tags
Our assessment of generate-ai-rules
generate-ai-rules scores 84/100 on our quality scale, 42nd of 63 Human Resources skills we index.
Its SKILL.md is 4.7 KB long, well organised into 10 sections with 1 code example: a solid amount of guidance for an agent.
It has 763 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so generate-ai-rules is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
generate-ai-rules compared with similar skills
All 4 of these similar skills score higher than generate-ai-rules; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| generate-ai-rules (this skill)by divar-ir | 84 | 763 | 3mo ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 15d ago | SKILL.md |
Frequently asked questions
- How do I install generate-ai-rules?
- Run
npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules. The install tabs above show the steps for each supported agent. - Which AI agents does generate-ai-rules work with?
- It is written for Claude Code, Cursor and OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is generate-ai-rules safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is generate-ai-rules still maintained?
- The repository was last updated about 3 months ago, so generate-ai-rules is actively maintained.
Skill content
View source on GitHubname: generate-ai-rules description: 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.
Generate AI Rules
Generate configuration files that help AI coding assistants work effectively with a codebase. Three targets, generated from the same analysis so they stay consistent:
- AGENTS.md — the cross-tool standard (agents.md), read by most AI coding tools including Claude Code, Cursor, Codex, and Gemini CLI.
- CLAUDE.md — Claude Code's project instructions file.
- .cursor/rules/*.mdc — Cursor's scoped project rules.
Workflow
1. Determine targets and gather data
- Generate all three targets by default; the user may skip any (e.g., "skip cursor rules", "keep my existing CLAUDE.md").
- If a target file already exists and the user didn't say to regenerate it, ask whether to update it or leave it alone.
- Check
<repo>/.ai/docs/for analysis documents from theanalyze-codebaseskill. If present, use them as the primary source (spot-check against the code — they may be stale). If absent, offer to runanalyze-codebasefirst, or explore the codebase directly for a quicker pass.
2. Generate the files
Shared principles for all targets:
- 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 runvspip). - Actionability: specific, executable instructions beat vague guidance. "Run
uv run ruff format src/" beats "format your code". - Conciseness: these files are loaded into every AI session — every line costs context. Only include what the AI cannot cheaply discover by reading the code: commands, non-obvious conventions, gotchas, things that have gone wrong before. Do not restate what the code structure makes obvious.
- Consistency: same terminology and architecture descriptions across all generated files.
AGENTS.md
The primary file — write it first, and write it best. Target well under 150 lines.
- Project overview (1–2 sentences)
- Build, test, run, lint commands (in backticks, copy-pasteable)
- Architecture overview (3–5 bullets)
- Code style conventions
- Testing instructions
- Git workflow (commit format, PR process)
- Key project-specific conventions and gotchas
CLAUDE.md
Claude Code reads AGENTS.md natively, so avoid duplicating content between the two files. Pick based on what exists and what the user wants:
- If AGENTS.md is generated/present (recommended): make CLAUDE.md a thin complement — a single line
See AGENTS.md for project instructions.plus only Claude-specific additions if any (e.g., skill/subagent usage preferences, permission notes). If there is nothing Claude-specific, ask the user whether they want CLAUDE.md at all. - If the user wants a standalone CLAUDE.md (no AGENTS.md): include the full content — overview, commands, style, architecture, key components, gotchas, known issues. Target under 300 lines; long CLAUDE.md files degrade rather than improve AI performance.
.cursor/rules/*.mdc
Generate 2–3 focused, composable rule files in MDC format (markdown with YAML frontmatter):
---
description: Brief description of what this rule covers
globs:
- "src/**/*.py"
alwaysApply: false
---
# Rule Title
Content...
project-overview.mdc— project context, architecture, conventions (alwaysApply: true, no globs needed)code-patterns.mdc— code style, testing patterns, anti-patterns to avoid (globbed to source files)api-conventions.mdc— only if the project has a significant API surface (globbed to API/handler files)
Keep each file to 50–100 lines. Rules should be prescriptive and project-specific, with short code examples from the actual codebase. Reference files with @path syntax where helpful. If a legacy .cursorrules file exists, migrate its still-valid content into the new files and tell the user the legacy file can be removed.
3. When existing files are provided
When updating rather than creating:
- Preserve the existing structure, tone, and any manually added sections not derivable from analysis (they usually encode hard-won knowledge).
- Refresh outdated information: stale commands, renamed paths, removed components.
- Tell the user specifically what you changed and why.
4. Report
List the files written, their line counts, and anything you left out or couldn't verify. If the repo's docs and reality diverged notably, mention it — that's a signal the team should know.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
