SkillsBench is a benchmark for measuring how effectively AI agents use modular skills—folders containing instructions, scripts, and resources—to complete specialized tasks. It helps researchers and developers evaluate both skill quality and agent behavior, including tasks that require combining multiple skills. The catalogue’s skills and instructions are evaluated as part of this workflow.
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 skills/benchflow-ai/skillsbench/memory-optimizationnpx skills add benchflow-ai/skillsbench --skill memory-optimizationgit clone --depth 1 https://github.com/benchflow-ai/skillsbenchWrote 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/benchflow-ai/skillsbench/memory-optimization)<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/memory-optimization"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/memory-optimization.svg" alt="Measured on agentmods" 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.00060 | $0.01432 |
| Opus 5 | $0.00030 | $0.00716 |
| Sonnet 5 | $0.00012 | $0.00286 |
| Haiku 4.5 | $0.00006 | $0.00143 |
Grade A, and why
memory-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 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- memory-optimization — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Optimization Skill
Transform Python code to minimize memory usage while maintaining functionality.
Workflow
- Profile to identify memory bottlenecks (largest allocations, leak patterns)
- Analyze data structures and object lifecycles
- Select optimization strategies based on access patterns
- Transform code with memory-efficient alternatives
- Verify memory reduction without correctness loss
Memory Optimization Decision Tree
What's consuming memory?
Large collections:
├── List of objects → __slots__, namedtuple, or dataclass(slots=True)
├── List built all at once → Generator/iterator pattern
├── Storing strings → String interning, categorical encoding
└── Numeric data → NumPy arrays instead of lists
Data processing:
├── Loading full file → Chunked reading, memory-mapped files
├── Intermediate copies → In-place operations, views
├── Keeping processed data → Process-and-discard pattern
└── DataFrame operations → Downcast dtypes, sparse arrays
Object lifecycle:
├── Objects never freed → Check circular refs, use weakref
├── Cache growing unbounded → LRU cache with maxsize
├── Global accumulation → Explicit cleanup, context managers
└── Large temporary objects → Delete explicitly, gc.collect()
Transformation Patterns
Pattern 1: Class to slots
Reduces per-instance memory by 40-60%:
Before:
class Point:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
After:
class Point:
__slots__ = ('x', 'y', 'z')
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
Pattern 2: List to Generator
Avoid materializing entire sequences:
Before:
def get_all_records(files):
records = []
for f in files:
records.extend(parse_file(f))
return records
all_data = get_all_records(files)
for record in all_data:
process(record)
After:
def get_all_records(files):
for f in files:
yield from parse_file(f)
for record in get_all_records(files):
process(record)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 226 lines · 60 tokens per session scan A cc56c4b81192
memory-optimization is a skill published in the GitHub repository benchflow-ai/skillsbench (1,747 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,432 once invoked, about $0.0003 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
plate-tectonics-geospatial
Analyze plate tectonics data using GeoPandas, identify points within plates, and calculate distances to boundaries.
python-csv-generation
Generate structured CSV files from Python data using the csv module for tabular data export.
python-pillow-graphics
Create technical graphics, diagrams, and posters using Python Pillow library with precise color control and typography.
geopandas-projections
Use GeoPandas with coordinate projections to perform accurate spatial calculations and transformations.
pillow-technical-diagrams
Create technical poster and diagram images using Pillow (PIL), including shapes, text, lines, and layered composition.
excel-openpyxl-formulas
Editing Excel files with openpyxl to insert formulas while preserving all existing formatting, styles, colors, and structure.