Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/alinaqi/maggy/update-code-indexgit clone --depth 1 https://github.com/alinaqi/maggyWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/alinaqi/maggy/update-code-index)<a href="https://agentmods.dev/commands/alinaqi/maggy/update-code-index"><img src="https://agentmods.dev/badge/commands/alinaqi/maggy/update-code-index.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02105 |
| Opus 5 | $0.00000 | $0.01052 |
| Sonnet 5 | $0.00000 | $0.00421 |
| Haiku 4.5 | $0.00000 | $0.00211 |
Grade A, and why
update-code-index scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Update Code Index
Regenerates CODE_INDEX.md by scanning the codebase for all functions, classes, hooks, and components. Organizes by capability to prevent semantic duplication.
What This Command Does
- Scans source files - Finds all exported functions, classes, hooks, components
- Extracts docstrings - Gets descriptions from JSDoc/docstrings
- Categorizes by capability - Groups by what things DO, not where they live
- Generates CODE_INDEX.md - Creates/updates the semantic index
Phase 1: Detect Project Type
# Check language
ls package.json pyproject.toml 2>/dev/null
# Check source directories
ls -d src/ lib/ app/ 2>/dev/null
Phase 2: Scan Codebase
For TypeScript/JavaScript
Scan for exports:
# Find all exported functions
grep -rn "export function\|export const\|export class\|export default" src/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx"
# Find React hooks
grep -rn "export function use[A-Z]\|export const use[A-Z]" src/ --include="*.ts" --include="*.tsx"
# Find React components (PascalCase exports)
grep -rn "export function [A-Z]\|export const [A-Z].*=.*=>" src/ --include="*.tsx" --include="*.jsx"
For Python
# Find all function definitions
grep -rn "^def \|^async def \|^class " src/ --include="*.py"
# Check __all__ exports
grep -rn "__all__" src/ --include="*.py"
Phase 3: Extract Documentation
For each found export, extract:
- Name - Function/class name
- Location - File path and line number
- Description - From JSDoc
@descriptionor first line of docstring - Parameters - Function signature
- Returns - Return type if available
TypeScript Example
/**
* Formats a date into a human-readable relative string.
* @param date - The date to format
* @returns Relative time string like "2 days ago"
*/
export function formatRelative(date: Date): string {
Extract:
- Name:
formatRelative - Description: "Formats a date into a human-readable relative string"
- Params:
(date: Date) - Returns:
string
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 348 lines · 0 tokens per session scan A c66776076808
update-code-index is a command published in the GitHub repository alinaqi/maggy (705 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,105 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
review-branch
Review the current branch's diff against base by dispatching atomic-reviewer. No orchestration loop, no spec required — pre-flight before /commit pr or /commit merge.
go-review
Go code review for idiomatic patterns.
crear-skill
Crear, probar y mejorar skills de forma iterativa. Usa cuando el usuario dice "crear skill", "crear habilidad", "build skill", "create a skill", "skill development", "desarrollar skill", "nueva habilidad". Usa el workflow: draft → test → review → improve → repeat con evaluación cuantitativa y qualitative review.
dispatcher
Pick the next-best repo to work on across the portfolio — rank free repos, recommend one, claim its lease atomically, and route to the entry command.
cost-tracker
Track session costs, understand token spend, and get optimization tips.
workpm
PM 모드로 오케스트레이터 시작. 팀을 구성하고 5단계 워크플로우로 작업을 완수합니다.