early-filter-optimization

early-filter-optimization is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 27 tokens per session (866 once invoked), scanned A, original, MIT.

A general method for reducing work in data pipelines, AI context, and human attention by filtering early, loading only what is needed, and removing unnecessary items. It also describes waiting until a system is ready before proceeding.

In plain words
What is it for?
Use it to design earlier data filters, smaller joins, lazy loading, trimmed AI context, and staged workflows that wait for system readiness.
Why use it?
It helps avoid processing irrelevant data or acting before required resources are ready. This can reduce wasted computation and attention in workflows such as database queries and AI tasks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design earlier data filters, smaller joins, lazy loading, trimmed AI context, and staged workflows that wait for system readiness.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fabioc-aloha/alex_skill_mall/early-filter-optimization
Install

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.

Any agent
npx skills add fabioc-aloha/Alex_Skill_Mall --skill early-filter-optimization
Clone the repo
git clone --depth 1 https://github.com/fabioc-aloha/Alex_Skill_Mall

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for early-filter-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization/github.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/early-filter-optimization)
Your own site
<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.

agentmods 80×15 button for early-filter-optimization

Your own site · 80×15
<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>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash 7d946c003c5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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.

plugins/architecture-patterns/early-filter-optimization/skills/early-filter-optimization/SKILL.md · 117 lines

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

  1. Push Filters Down: Move WHERE clauses into joins, use partition keys
  2. Scope Activation: Use patterns/triggers instead of global loading
  3. Lazy Evaluation: Don't compute until value is actually needed
  4. Reference vs. Copy: Point to source rather than duplicating content

Read the full file on GitHub · 117 lines

Changes

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.

  1. 8d ago First seen · 117 lines · 27 tokens per session scan A 7d946c003c5a

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories