Skip to content
Back to skills

Session Optimizer

ASecurity

Use when a long agent session has high token cost, context bloat, repeated noisy commands, slow turns, or an upcoming unrelated task transition.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agents

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add CFcon-CH/kherep --skill session-optimizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Optimizer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Session Optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cfcon-ch-session-optimizer/badge)](https://www.skillsdirectory.com/skills/cfcon-ch-session-optimizer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: session-optimizer
description: Use when a long agent session has high token cost, context bloat, repeated noisy commands, slow turns, or an upcoming unrelated task transition.
---

# Session Optimizer

Reduce avoidable context and tool output while preserving the evidence and decisions needed to finish the task.

## Discover runtime controls

Inspect only the session-management commands and usage information exposed by the active runtime. Do not assume command names, cache durations, pricing, context limits, model families, or effort levels. Verify current product behavior before making cost claims.

## Priorities

1. Keep one substantial topic per session.
2. Preserve the objective, accepted constraints, decisions, changed files, verification evidence, and open risks.
3. Filter routine command output at the source with supported quiet flags or narrow queries.
4. Use a bounded worker for high-volume independent reading when delegation is available and useful.
5. Compact or checkpoint only through the active runtime's supported mechanism.

## During work

- Prefer targeted tests and searches before broader commands.
- Summarize passing output; retain exact failure evidence needed for diagnosis.
- Avoid repeatedly attaching or reading unchanged large files.
- Reuse current context for related follow-up work.
- When a recurring job needs separate context, define a worker by capability and cost budget from current configuration. Do not require a particular provider or model.

## Transitions

For an unrelated task, use the runtime's new-session or clear-context mechanism after saving a concise checkpoint if continuity matters. For a long continuing task, compact only when the retained-state contract is clear. Do not discard active approvals, privacy classification, unresolved failures, or uncommitted file ownership.

Skip this skill for a short, focused exchange where optimization overhead would exceed the benefit.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.