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.
git 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00000 | $0.02105 |
| Opus 5.5 | $0.00000 | $0.00842 |
| Sonnet 5.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 3mo 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.
- 3mo 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 (713 stars, last pushed 3d 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.
update-code-index compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| update-code-indexalinaqi/maggy | Command | 713 | 3d ago | MIT | A | 0 | Claude Code |
| python-reviewloulanyue/awesome-claude-notes | Command | 271 | 1mo ago | MIT | A | 31 | Claude Code |
| frappe-backendDkm0315/frappe-agent | Command | 27 | 1mo ago | MIT | A | 0 | Claude Code, Cursor |
| py-structuremathisk2095/jko-claude-plugins | Command | 3 | 1mo ago | MIT | A | 23 | Claude Code |
| py-hardenmathisk2095/jko-claude-plugins | Command | 3 | 1mo ago | MIT | A | 32 | Claude Code |
| skill-fastapi-apidewtech-technologies/dare-method | Command | 5 | 4mo ago | MIT | A | 0 | Claude Code |
| skill-mcp-serverdewtech-technologies/dare-method | Command | 5 | 4mo ago | MIT | A | 0 | Claude Code |