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/alphaaiservice/cortex/ai-upgradegit clone --depth 1 https://github.com/alphaaiservice/cortexWhat 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.00036 | $0.04060 |
| Opus 5 | $0.00018 | $0.02030 |
| Sonnet 5 | $0.00007 | $0.00812 |
| Haiku 4.5 | $0.00004 | $0.00406 |
Grade A, and why
ai-upgrade 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 2d 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 — 536 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Upgrade — Add AI Capabilities to an Existing Feature
Upgrade this feature with AI: $ARGUMENTS
This is the implementation command. It takes an existing feature in the codebase and adds AI/ML capabilities to it. Works for ANY stack — Python/FastAPI, Node.js/NestJS, Java/Spring Boot, or any other.
KEY PRINCIPLE: Enhance, do not replace. The existing feature must continue to work. AI adds a layer on top — if the AI service is down, the feature falls back to its original behavior.
Step 1: Identify the Target Feature
1.1: Find the Feature in Codebase
# Search for the feature by name across the codebase
grep -rn "$ARGUMENTS" . --include="*.py" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --include="*.java" --include="*.go" -l 2>/dev/null | head -20
# Search in directory names
find . -type d -iname "*$ARGUMENTS*" -not -path "*/node_modules/*" -not -path "*/.git/*"
# Search in route definitions
grep -rn "/$ARGUMENTS\|$ARGUMENTS" . --include="*route*" --include="*controller*" --include="*handler*" -l 2>/dev/null
1.2: Analyze Current Implementation
Read the feature's files across all layers:
CURRENT IMPLEMENTATION ANALYSIS
════════════════════════════════
Feature: [name]
Description: [what it does now]
Database:
Tables: [list]
Key queries: [types of queries — CRUD, search, aggregation]
Backend:
Models: [files]
Services: [files + key methods]
Controllers: [files + endpoints]
Current logic: [brief description of business logic]
Frontend:
Pages: [files]
Components: [files]
Current UX: [how the user interacts with this feature]
Pain Points (inferred from code):
1. [limitation of current implementation]
2. [missing capability]
3. [poor UX pattern]
Step 2: Design the AI Enhancement
Based on the feature type, select the appropriate AI upgrade pattern:
Search Features → Semantic Search
Enhancement: Semantic Search with Vector Embeddings
Current: SQL LIKE / full-text search
Upgrade: Embed content → vector DB → similarity search → re-rank
Components:
- Embedding pipeline (batch + real-time)
- Vector storage (Qdrant / pgvector / Pinecone)
- Hybrid search (keyword + semantic)
- Result re-ranking with LLM
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.
- 2d ago First seen · 536 lines · 36 tokens per session scan A 9f23a59943d2
ai-upgrade is a command published in the GitHub repository alphaaiservice/cortex (1 stars, last pushed 26d ago), licensed MIT. It adds 36 tokens to every session and 4,060 once invoked, about $0.0002 per session on Opus 5. 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-31.
Other commands, from other repositories
_composicion
Protocolo interno compartido para la composición dinámica del equipo de Alfred según tarea, stack y señales runtime.
alfred
Asistente contextual de Alfred Dev. Enruta automáticamente al flujo o comando operativo correcto.
audit
Auditoría completa del proyecto con 4 agentes en paralelo.
feature
Ciclo completo de desarrollo: producto, arquitectura, desarrollo, QA, docs, entrega.
ajustes
Configura Alfred Dev: autonomía, proyecto, Lucius, memoria y personalidad. Antes /alfred-dev:config.
discuss
Refina una idea o feature antes de abrir un flujo completo de implementación.