From ai-doc-gen
Generates AI assistant configuration files (CLAUDE.md, AGENTS.md, Cursor rules) from codebase analysis. Use when onboarding AI tools or creating/updating these files.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-doc-gen:generate-ai-rulesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate configuration files that help AI coding assistants work effectively with a codebase. Three targets, generated from the same analysis so they stay consistent:
Generate configuration files that help AI coding assistants work effectively with a codebase. Three targets, generated from the same analysis so they stay consistent:
<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.Shared principles for all targets:
uv run vs pip).uv run ruff format src/" beats "format your code".The primary file — write it first, and write it best. Target well under 150 lines.
Claude Code reads AGENTS.md natively, so avoid duplicating content between the two files. Pick based on what exists and what the user wants:
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.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.
When updating rather than creating:
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.
npx claudepluginhub divar-ir/ai-doc-gen --plugin ai-doc-genCreates and maintains AI instruction files (CLAUDE.md, AGENTS.md, .cursor/rules/) with proper structure and cross-tool compatibility.
Generates and maintains AGENTS.md files for AI agents by detecting project structure, extracting commands, CI rules, and architecture boundaries. Useful for onboarding agents and standardizing documentation.
Generates or updates AGENTS.md/CLAUDE.md files via project scanning and interactive Q&A. Use when setting up AI-assisted development or updating project instructions.