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 skills add fabioc-aloha/Alex_Skill_Mall --skill early-filter-optimizationgit clone --depth 1 https://github.com/fabioc-aloha/Alex_Skill_MallWrote 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/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization)<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization/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/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization.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.00027 | $0.00866 |
| Opus 5 | $0.00014 | $0.00433 |
| Sonnet 5 | $0.00005 | $0.00173 |
| Haiku 4.5 | $0.00003 | $0.00087 |
Grade A, and why
early-filter-optimization 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 8d 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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Domain Knowledge: Early Filter Optimization
Domain: Cross-Domain Performance Optimization Mastery Level: Applied (Real-world validation) Created: 2026-01-22 Updated: 2026-01-22 Source: Meditation consolidation from SQL optimization + architecture streamlining session
Core Principles
1. Early Filtering
"Don't process what you don't need. Filter early, load lazy, prune aggressively."
This principle emerged from parallel optimization work in data engineering and cognitive architecture, revealing universal applicability.
2. System Readiness (Added 2026-01-22 Evening)
"Don't race the system. Respect its readiness. When in doubt, stage and wait."
Complements Early Filtering by addressing temporal boundaries rather than data boundaries.
| Principle | Focus | Question |
|---|---|---|
| Early Filter | Data boundaries | What to process? |
| System Readiness | Temporal boundaries | When to proceed? |
Pattern: The Early Filter Paradigm
Manifestations Across Domains
| Domain | Anti-Pattern | Optimized Pattern | Improvement |
|---|---|---|---|
| SQL/Data | Full table scan, filter after | CTE pre-filter, join reduced set | 99%+ reduction |
| Spark | Load all data, filter in memory | Predicate pushdown, partition pruning | Order of magnitude |
| API Design | Return all fields, paginate client-side | Field selection, server pagination | Bandwidth + latency |
| AI Context | Load all instruction files always | Scope with applyTo, load on trigger |
Reduced token overhead |
| Human Attention | Try to hold everything in mind | Externalize, reference on demand | Cognitive capacity |
Implementation Strategies
- Push Filters Down: Move WHERE clauses into joins, use partition keys
- Scope Activation: Use patterns/triggers instead of global loading
- Lazy Evaluation: Don't compute until value is actually needed
- Reference vs. Copy: Point to source rather than duplicating content
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.
- 8d ago First seen · 117 lines · 27 tokens per session scan A 7d946c003c5a
early-filter-optimization is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (4 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 866 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
ai-provider-anthropic-sdk
Official Anthropic SDK patterns for TypeScript/Node.js — client setup, Messages API, streaming, tool use, vision, extended thinking, structured outputs, prompt caching, batch API, and production best practices.
ai-infrastructure-huggingface-inference
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation, audio transcription, translation, summarization, and Inference Endpoints.
ai-infrastructure-ollama
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and OpenAI-compatible endpoint.
ai-infrastructure-replicate
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training.
ai-infrastructure-together-ai
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation, fine-tuning, and OpenAI-compatible endpoints.
ai-observability-langfuse
LLM observability with Langfuse — OpenTelemetry-based tracing, evaluations, prompt management, datasets, and production best practices.