From codeindex
This skill should be used when the user asks to "index this project", "generate code index", "scan codebase", "create AI documentation", or wants README_AI.md files generated for a codebase so it becomes searchable by AI agents. Wraps the codeindex CLI.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codeindex:indexThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate AI-friendly index files (`README_AI.md`) for codebases using the codeindex CLI.
Generate AI-friendly index files (README_AI.md) for codebases using the codeindex CLI.
Prereq:
codeindexCLI must be on PATH. If not, install withpipx install ai-codeindex(plugin SessionStart hook surfaces this).
Before initializing, enumerate what codeindex init will mutate so the user can confirm:
ls .codeindex.yaml 2>/dev/null || echo "(no .codeindex.yaml — will be created)"
ls README_AI.md 2>/dev/null || echo "(no README_AI.md — will be created at repo root)"
grep -l codeindex CLAUDE.md 2>/dev/null || echo "(no codeindex section in CLAUDE.md — will be injected)"
grep README_AI.md .gitignore 2>/dev/null || echo "(.gitignore will get README_AI.md added)"
codeindex init creates / modifies up to 4 files:
.codeindex.yaml (configuration).gitignore (adds README_AI.md)CLAUDE.md (injects ## codeindex section)README_AI.md (empty stub at repo root)If any of those matter to the user, ask before proceeding (e.g. user already has a hand-maintained CLAUDE.md, or wants README_AI.md git-tracked). Only skip the confirmation if the repo is clearly fresh or the user has explicitly consented.
codeindex init --yes
--yes for non-interactive default config (CI-friendly). Only run after Step 0 surfaces the mutation set and the user has consented.
cat .codeindex.yaml
Key settings to verify:
languages — Detected programming languages (python, java, php, swift, etc.)include — Directories to scanexclude — Patterns to skipai_command — AI CLI for --ai mode (defaults to claude haiku)codeindex list-dirs
# Structural-only (fast, no AI calls):
codeindex scan-all
# Structural + AI-enriched blockquote descriptions (cache-aware):
codeindex scan-all --ai
# Force re-enrich every dir, ignoring cache:
codeindex scan-all --ai --retry-all
# Single dir:
codeindex scan ./src/module
codeindex scan ./src/module --ai
codeindex scan ./src/module --ai --dry-run # preview prompt only
codeindex status
If user wants README_AI.md to stay in sync on commit, hand off to the codeindex:hooks skill:
"Want READMEs to auto-update when you commit code? Use the
codeindex:hooksskill to set up the post-commit hook."
| Mode | Command | When |
|---|---|---|
| Auto (default) | codeindex scan-all | Structural + AI enrichment if ai_command configured |
| Structural-only | codeindex scan-all --no-ai | Zero AI cost; fastest |
| Re-enrich all | codeindex scan-all --ai --retry-all | After prompt or model changes |
| Single dir | codeindex scan ./dir --ai | Deep AI README for one directory |
| Problem | Solution |
|---|---|
AI CLI timeout | codeindex scan ./dir --ai --timeout 180 |
AI not configured | Use codeindex scan-all (structural mode) — ai_command is optional |
| Want to inspect AI prompt | codeindex scan ./dir --ai --dry-run |
| Missing language parser | pipx inject ai-codeindex tree-sitter-<lang> |
| Rate limit hit mid-scan | Just re-run codeindex scan-all --ai — Phase 2 is idempotent, only failed dirs hit AI again |
README_AI.md files for team/AI sharing (or add to .gitignore if you regenerate them per developer — codeindex init auto-adds this).codeindex:hooks skill).CLAUDE.md: "Read README_AI.md before modifying code."npx claudepluginhub dreamlx/codeindex-claudeFetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.