lenserfight: Skill for Claude Code

.agents/skills/ai-cost-manager-reducer/SKILL.md

ai-cost-manager-reducer is a skill for Claude Code, Codex from conectlens/lenserfight. It costs 98 tokens per session (2,543 once invoked), scanned A, original, MIT.

A review guide for finding wasted work in AI-powered software, such as repeated model calls, oversized prompts, unnecessary retries, and inefficient agent workflows.

In plain words
What is it for?
Use it to inspect model and embedding calls, tool loops, vector searches, background jobs, caching, logs, and model choices, then rank waste and suggest tested improvements.
Why use it?
It helps reduce AI usage costs while checking that an optimization does not remove reasoning or outputs the system still needs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is conectlens/lenserfight's own configuration. It tells Claude Code and Codex how to work on lenserfight itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lenserfight configures →

Reuse

Borrowing it

Nothing to install: this file belongs to conectlens/lenserfight. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/conectlens/lenserfight/main/.agents/skills/ai-cost-manager-reducer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/conectlens/lenserfight

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 ai-cost-manager-reducer

README.md
[![agentmods](https://agentmods.dev/badge/skills/conectlens/lenserfight/ai-cost-manager-reducer/github.svg)](https://agentmods.dev/skills/conectlens/lenserfight/ai-cost-manager-reducer)
Your own site
<a href="https://agentmods.dev/skills/conectlens/lenserfight/ai-cost-manager-reducer"><img src="https://agentmods.dev/badge/skills/conectlens/lenserfight/ai-cost-manager-reducer/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 ai-cost-manager-reducer

Your own site · 80×15
<a href="https://agentmods.dev/skills/conectlens/lenserfight/ai-cost-manager-reducer"><img src="https://agentmods.dev/badge/skills/conectlens/lenserfight/ai-cost-manager-reducer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,543 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Output Handling · line 46
    Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
    Fix: Set explicit limits on output length, generation count, and rate. Use max_tokens and truncation to prevent unbounded output.
How audits are shown
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.00098 $0.02543
Opus 5 $0.00049 $0.01272
Sonnet 5 $0.00020 $0.00509
Haiku 4.5 $0.00010 $0.00254

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

Security

Grade A, and why

ai-cost-manager-reducer 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 10d 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.

.agents/skills/ai-cost-manager-reducer/SKILL.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI Cost Manager & Reducer

Audit as an efficiency engineer, not a summarizer. Every finding must name a concrete waste pattern, its cost risk, and a safe optimization strategy that preserves reasoning quality and chain correctness.

Quick Start

  1. Identify all AI call sites: LLM API calls, embedding generation, vector search, tool dispatch, agent loops.
  2. Trace each call's purpose, frequency, input size, output size, and model selection.
  3. Detect waste patterns (see catalogue below).
  4. Rank findings by severity and estimated cost impact.
  5. Propose safe optimizations with validation steps.

Never recommend removing a reasoning step unless you have verified the step is truly redundant or its output is unused downstream.


Audit Scope

AI Call Sites to Inspect

  • LLM completions: openai, @anthropic-ai/sdk, Supabase Edge Functions calling AI APIs, server actions, background workers, cron jobs
  • Embedding generation: embeddings.create(), embed(), pgvector insert paths, semantic search pipelines
  • Vector search: cosine similarity queries, <=> operator, HNSW/IVFFlat index queries
  • Tool/function calls: agent tool dispatch loops, multi-step orchestration, MCP tool invocations
  • Streaming flows: streamed completions feeding downstream parsers or UI
  • Retry logic: exponential backoff, retry-on-failure wrappers, queue consumers
  • Caching layers: Redis/KV caches keyed on prompts, memoization wrappers, CDN-cached AI responses
  • Classification / extraction calls: sentiment, category, entity extraction, intent detection
  • Summarization pipelines: document chunking, recursive summarization, context compression
  • Model selection logic: environment switches, tier routing, fallback chains

Waste Pattern Catalogue

Token Waste

ID Pattern Signal
TW-1 Oversized system prompt injected on every call System prompt > 500 tokens with mostly static content
TW-2 Full conversation history resent without truncation Context grows unboundedly per session
TW-3 Redundant context injection Same DB rows / user profile fetched and embedded in prompt on every request
TW-4 Verbose output without max_tokens cap Responses regularly exceed task requirements
TW-5 Unstructured output where JSON/schema would halve tokens Free-text response parsed by regex downstream
TW-6 Recursive summarization without memoization Same document re-summarized on every call

Read the full file on GitHub · 238 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. 10d ago First seen · 238 lines · 98 tokens per session scan A dc7cbd1d9534

Subscribe to this mod's changes

ai-cost-manager-reducer is a skill published in the GitHub repository conectlens/lenserfight (18 stars, last pushed 1mo ago), licensed MIT. It adds 98 tokens to every session and 2,543 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

ai-ml-development

AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.

travisjneuman/.claude · 43 tokens

ai-policy-generator

AI governance policy creation for nonprofits and enterprises with frameworks, risk assessment, ethical guidelines, and compliance templates. Use when drafting AI usage policies, responsible AI frameworks, or organizational AI governance documents.

travisjneuman/.claude · 42 tokens

data-science

Data science and analytics expertise for statistical analysis, machine learning pipelines, data governance, business intelligence, predictive modeling, and analytics strategy. Use when building ML models, analyzing data, creating dashboards, or designing data architectures.

travisjneuman/.claude · 47 tokens

data-engineering

ETL/ELT pipelines, data warehousing (BigQuery, Snowflake, Redshift), stream processing (Kafka, Spark Streaming), orchestration (Airflow, Dagster, Prefect), dbt transformations, and data lake architecture. Use when building data pipelines, designing warehouse schemas, or implementing real-time data processing.

travisjneuman/.claude · 70 tokens

langchain_patterns

Implement Retrieval-Augmented Generation (RAG) systems with LangChain4j. Build document ingestion pipelines, embedding stores, vector search strategies, and knowledge-enhanced AI applications. Use when creating question-answering systems over document collections or AI assistants with external knowledge bases.

vuralserhat86/antigravity-agentic-skills · 57 tokens

langchain_patterns

Implement Retrieval-Augmented Generation (RAG) systems with LangChain4j. Build document ingestion pipelines, embedding stores, vector search strategies, and knowledge-enhanced AI applications. Use when creating question-answering systems over document collections or AI assistants with external knowledge bases.

DonggangChen/antigravity-agentic-skills · 57 tokens