cost-aware-llm-pipeline

cost-aware-llm-pipeline is a skill for Claude Code, Codex from hashgraph-online/awesome-codex-plugins. It costs 42 tokens per session (925 once invoked), scanned A, original, Apache-2.0.

A planning guide for choosing language models and managing the amount of conversation context used by an AI coding workflow. It groups tasks by complexity and gives rules for avoiding context overflow during long sessions.

In plain words
What is it for?
Use it to match simple, normal, complex, or deep tasks with an appropriate model, keep context within budget, compress long sessions, and batch related edits.
Why use it?
It helps prevent using an expensive model for simple work and reduces the chance that a large refactor loses important information near the end of a long conversation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to match simple, normal, complex, or deep tasks with an appropriate model, keep context within budget, compress long sessions, and batch related edits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline
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 hashgraph-online/awesome-codex-plugins --skill cost-aware-llm-pipeline
Clone the repo
git clone --depth 1 https://github.com/hashgraph-online/awesome-codex-plugins

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 cost-aware-llm-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline/github.svg)](https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline)
Your own site
<a href="https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline"><img src="https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline/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 cost-aware-llm-pipeline

Your own site · 80×15
<a href="https://agentmods.dev/skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline"><img src="https://agentmods.dev/badge/skills/hashgraph-online/awesome-codex-plugins/cost-aware-llm-pipeline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 925 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 pass 7 Sept 2026
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.00042 $0.00925
Opus 5 $0.00021 $0.00463
Sonnet 5 $0.00008 $0.00185
Haiku 4.5 $0.00004 $0.00093

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

Security

Grade A, and why

cost-aware-llm-pipeline 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 4d 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/Colin4k1024/tsp/skills/cost-aware-llm-pipeline/SKILL.md · 139 lines

What it actually says

Cost-Aware LLM Pipeline Skill

成本感知 LLM 管道,根据任务复杂度选择合适模型,管理上下文预算。

何时激活

  • 需要优化模型选择以控制成本
  • 需要管理上下文使用预算
  • 需要为不同复杂度任务选择合适模型
  • 需要在长会话中避免上下文溢出

模型选择策略

Haiku (轻量级)

使用场景:

  • 简单任务:语法修正、格式化、小改动
  • 频繁调用:grep、glob、文件探索
  • 工具调用规划

成本: ~$0.001/1K tokens

Sonnet (主开发)

使用场景:

  • 主要开发工作
  • 复杂编码任务
  • 多文件重构
  • 代码审查

成本: ~$0.01/1K tokens

Opus (深度推理)

使用场景:

  • 复杂架构决策
  • 深度推理任务
  • 新技术调研
  • 关键问题调试

成本: ~$0.05/1K tokens

上下文预算管理

预算规则

上下文位置 可用空间 建议
前 20% 宽松 探索、研究、讨论
中间 60% 谨慎 核心实现、详细代码
最后 20% 压缩 整理、总结、收尾

避免的错误

  • ❌ 在上下文最后 10% 做大型重构
  • ❌ 在低上下文空间启动复杂任务
  • ❌ 用 Opus 处理 Haiku 就能完成的任务

正确做法

  • ✅ 在上下文中间启动复杂任务
  • ✅ 在低空间使用 Haiku 做简单任务
  • ✅ 定期压缩上下文避免溢出

任务复杂度分级

L1: 简单(用 Haiku)

  • 语法修正
  • 文件格式化
  • 简单搜索替换
  • README 更新

L2: 中等(用 Sonnet)

  • 函数实现
  • 单元测试编写
  • 代码审查
  • Bug 修复

L3: 复杂(用 Sonnet 或 Opus)

  • 多文件重构
  • 架构设计
  • 复杂调试
  • 新模块设计

L4: 深度(用 Opus)

  • ADR 编写
  • 架构决策
  • 性能优化
  • 跨系统设计

成本优化技巧

1. 批处理相似任务

# 不好:多次调用,每次都加载上下文
/edit file1.ts
/edit file2.ts
/edit file3.ts

# 好:一次调用处理多个文件
/multi-edit file1.ts file2.ts file3.ts

2. 使用上下文压缩

长会话后运行: /compact
保留决策和结论,丢弃中间追踪

3. 选择正确模型

# 不好的做法
用 Opus 写 README

# 好的做法
用 Haiku 写 README
用 Sonnet 实现核心逻辑
用 Opus 做架构决策

与其他 Skills 的关系

Skill 关系
Strategic Compact 提供上下文压缩以保持低使用率
Continuous Learning 从成本数据中学习优化模型选择
Memory Persistence 保存会话摘要以支持上下文重建

命令接入

  • /cost-estimate <task> - 估算任务成本
  • /model-select <complexity> - 建议模型选择
  • /context-budget - 显示当前上下文预算
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. 4d ago First seen · 139 lines · 42 tokens per session scan A 79932d01581b

Subscribe to this mod's changes

cost-aware-llm-pipeline is a skill published in the GitHub repository hashgraph-online/awesome-codex-plugins (968 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 925 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-09-05.

Related

Other skills, from other repositories

search

Search 2500+ curated ChatGPT and LLM open-source repositories. Use when the user asks to find tools, libraries, or repos related to ChatGPT, LLMs, RAG, agents, langchain, NLP, AI development, or any open-source AI tooling.

taishi-i/awesome-ChatGPT-repositories · 57 tokens

ai-wrapper-product-v2

AI Wrapper Product workflow skill. Use this skill when the user needs Expert in building products that wrap AI APIs (OpenAI, Anthropic, and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 55 tokens

kling-prompter

A prompt-writing guide for Kling 3.0, a video-generation model. It covers short videos, story-driven videos with dialogue or sound, and animating an existing reference image.

cclank/lanshu-awesome-ai-video-kit · 162 tokens

happyhorse-prompter

A tool for writing short prompts for HappyHorse 1.0, an AI video generator that can create video with sound. Its prompts put the main subject first, specify the camera, and describe audible sound when needed.

cclank/lanshu-awesome-ai-video-kit · 116 tokens

seedance-prompter

A prompt-writing guide for Doubao Seedance 2.0, an AI model that generates videos from written instructions.

cclank/lanshu-awesome-ai-video-kit · 142 tokens

ask-short-answer-first

Master the Bottom Line Up Front (BLUF) prompting pattern to get the direct 2-line answer immediately, eliminating preamble fluff and saving reading time.

alivirgo/Major-AI-Skills · 36 tokens