From codeindex
This skill should be used when the user asks to "set up auto-update", "install codeindex hooks", "auto-update README_AI.md", "keep docs in sync", or wants Git hooks that automatically refresh codeindex README_AI.md files when code changes are committed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codeindex:hooksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Set up Git hooks so `README_AI.md` files automatically refresh when code changes are committed.
Set up Git hooks so README_AI.md files automatically refresh when code changes are committed.
Prereq:
codeindexCLI must be on PATH. If not, install withpipx install ai-codeindex.
Architecture: Thin wrapper shell script → Python logic in the installed codeindex package (auto-upgradeable via pipx upgrade ai-codeindex).
When a developer commits code changes:
codeindex hooks run post-commit (Python entry point)codeindex affected --json analyzes the change scopecodeindex scan regenerates structural README_AI.md for affected directoriesKey: Hook only updates structural content. AI blockquote descriptions
(module purpose) are not regenerated per-commit — run codeindex scan-all --ai
to refresh those.
Upgrade: pipx upgrade ai-codeindex auto-updates hook logic.
No need to reinstall hooks after package upgrade.
# 1. codeindex must be installed
which codeindex || echo "Not installed. Run: pipx install ai-codeindex"
# 2. Project must be a git repository
git rev-parse --is-inside-work-tree
# 3. Project must have codeindex config
cat .codeindex.yaml 2>/dev/null || codeindex init --yes
codeindex hooks status
Shows which hooks are installed (pre-commit, post-commit, pre-push).
codeindex hooks install post-commit # recommended
# or:
codeindex hooks install --all # post-commit + pre-commit + pre-push
If a custom post-commit hook already exists, it's backed up automatically.
Edit .codeindex.yaml:
hooks:
post_commit:
enabled: true
mode: auto # auto | sync | async | prompt | disabled
max_dirs_sync: 2 # Threshold for sync vs async in auto mode
Modes:
| Mode | Behavior |
|---|---|
auto | Smart: sync for small changes (≤ max_dirs_sync), async otherwise |
sync | Always wait for update to complete before returning |
async | Always run in background (non-blocking) |
prompt | Show notification but don't auto-update; user runs codeindex affected --update manually |
disabled | Hook installed but inactive |
codeindex hooks status
# Test it:
echo "# test" >> some_file.py
git add some_file.py && git commit -m "test: verify auto-update hook"
git log --oneline -2 # should show "docs: auto-update README_AI.md for <hash>"
Hook only updates existing README_AI.md files. Generate the initial index first:
codeindex scan-all
git add -A && git commit -m "docs: initial README_AI.md generation"
codeindex hooks uninstall post-commit # restores any backup
codeindex hooks uninstall --all
Usually not needed — pipx upgrade ai-codeindex updates the Python logic the shell wrapper invokes.
Only if release notes say "reinstall hooks":
codeindex hooks install post-commit --force
| Problem | Solution |
|---|---|
| Hook not triggering | codeindex hooks status — must show "installed" |
| Infinite commit loop | Shouldn't happen (wrapper skips doc-only commits). If it does, codeindex hooks uninstall post-commit |
| Hook too slow | mode: async in .codeindex.yaml |
| Want manual control | mode: prompt — notification only, run codeindex affected --update yourself |
| Virtual env not found | Ensure .venv/ or venv/ exists at project root, or hook will still try codeindex from PATH |
| Old hook style | codeindex hooks install post-commit --force upgrades to thin wrapper |
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.