Automatically suggests optimal files to preload based on the user's task description and historical context patterns.

MITAuto-check passed

Install Smart Loader

skills CLI
$ npx skills add egorfedorov/claude-context-optimizer --skill smart-loader -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install egorfedorov/claude-context-optimizer smart-loader --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/egorfedorov/claude-context-optimizer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/smart-loader .claude/skills/smart-loader && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
smart-loader
GitHub stars
114
Token cost
~530 tokens
SKILL.md length
269 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Automatically suggests optimal files to preload based on the user's task description and historical context patterns.

  • Works in 3 steps: Check for existing templates matching… → Check historical patterns for the… → Based on the task description and…
  • Starts a new task
  • SKILL.md covers When to Activate, How to Use, Auto-Optimization Tips and Important
  • Calls node

What it does

Smart Loader is an agent skill from egorfedorov/claude-context-optimizer. Automatically suggests optimal files to preload based on the user's task description and historical context patterns. Activates when the user starts a new task, mentions reading files, or when session context is being set up.

Its SKILL.md is about 530 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Claude Code plugin that tracks token usage, identifies wasted context, and saves 30-50% on API costs. Heatmaps, ROI reports, budget alerts, efficiency scores, git-aware… The licence is MIT.

When your agent uses it

  • Starts a new task
  • Mentions reading files
  • Session context is being set up

Example prompts

  • “/smart-loader”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Check for existing templates matching the task type: Glob
  2. Check historical patterns for the current directory
  3. Based on the task description and historical data

What it can do on your machine

Read from SKILL.md and the folder at commit f6f20ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Smart Loader loads about 530 tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 269 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~530

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from egorfedorov/claude-context-optimizer at commit f6f20ee, republished under its MIT licence (© egorfedorov). 269 words, ~530 tokens.

Download SKILL.mdSave it as .claude/skills/smart-loader/SKILL.md (or your agent's skills folder).
name
smart-loader
description
Automatically suggests optimal files to preload based on the user's task description and historical context patterns. Activates when the user starts a new task, mentions reading files, or when session context is being set up.
license
MIT
disable-model-invocation
false

Smart Context Loader

When a user starts a new task or asks to work on something, check if there are historical patterns that suggest which files they'll need.

When to Activate

  • User describes a new task (bug fix, feature, refactor, review)
  • User says "let's work on..." or "I need to fix..."
  • Session just started and user is describing what they want to do
  • User asks "what files do I need for this?"

How to Use

  1. Check for existing templates matching the task type: Glob ~/.claude-context-optimizer/templates/*.json.

  2. Check historical patterns for the current directory:

bash
node ${CLAUDE_PLUGIN_ROOT}/src/tracker.js suggest "$(pwd)"
  1. Based on the task description and historical data:
    • If a matching template exists, mention it: "I see you have a '{name}' template. Want me to load that context?"
    • If historical patterns suggest files, mention: "Based on previous sessions, you usually need these files for this type of task: ..."
    • If patterns show files to avoid, mention: "Tip: [file] has been consistently unused in past sessions — I'll skip it."
    • If nothing matches, proceed normally

Auto-Optimization Tips

When you detect patterns that waste tokens, proactively suggest improvements:

  • If a large file (300+ lines) is being read fully: "I'll use offset/limit to read only the relevant section"
  • If a file was wasted in 2+ past sessions: skip it silently or mention why
  • If the user's task matches a known template: offer to apply it

Important

  • Do NOT automatically read files without user confirmation
  • Only SUGGEST, don't force context loading
  • Keep suggestions brief (top 3-5 files max)
  • If no tracking data exists yet, skip silently — don't mention the optimizer
  • Be helpful, not annoying — max 1 suggestion per task start

© egorfedorov, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/smart-loader of egorfedorov/claude-context-optimizer.

Open the folder on GitHubat commit f6f20ee

Compare with similar skills

Smart Loader next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Smart Loader compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smart Loader this skillegorfedorov/claude-context-optimizer114—~530Automated safety check: PassMIT
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
Optimization Suggesthoangsonww/Claude-Code-Agent-Monitor1.1k1 repos~831Automated safety check: PassMIT
Agent Performance Optimizerruvnet/ruflo74k2 repos~3.6kAutomated safety check: PassMIT
Database Optimizerdavila7/claude-code-templates32k8 repos~2.5kAutomated safety check: PassMIT
Prompt Optimizeraffaan-m/ECC275k2 repos~2.4kAutomated safety check: PassMIT

Similar skills

  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • Optimization Suggest

    hoangsonww/Claude-Code-Agent-Monitor

    Suggest concrete optimizations for Claude Code usage based on historical session data.

    1.1k GitHub starsUsed in 1 repo~831 tokens
    Auto-check passed
  • Agent skill for performance-optimizer - invoke with $agent-performance-optimizer

    74k GitHub starsUsed in 2 repos~3.6k tokens
    Auto-check passed
  • Database Optimizer

    davila7/claude-code-templates

    Expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

    32k GitHub starsUsed in 8 repos~2.5k tokens
    DatabasesAuto-check passed
  • Prompt Optimizer

    affaan-m/ECC

    分析原始提示,识别意图和差距,匹配ECC组件(技能/命令/代理/钩子),并输出一个可直接粘贴的优化提示。仅提供咨询角色——绝不自行执行任务。触发时机:当用户说“优化提示”、“改进我的提示”、“如何编写提示”、“帮我优化这个指令”或明确要求提高提示质量时。中文等效表达同样触发:“优化prompt”、“改进prompt”、“怎么写prompt”、“帮我优化这个指令”。不触发时机:当用户希望直接执行任…

    275k GitHub starsUsed in 2 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Cost Optimize

    ruvnet/ruflo

    Analyze token usage patterns and recommend cost optimizations with estimated savings

    74k GitHub starsUsed in 1 repo~997 tokens
    AI & LLM EngineeringAuto-check: notes

More from egorfedorov/claude-context-optimizer

All 13 skills in this repo
  • Cco

    egorfedorov/claude-context-optimizer

    Context Control Center — one screen for budget, $ spent, tokens saved, waste, last prompt grade, the active task, and ready-to-run optimization actions

    114 GitHub stars~465 tokensUpdated 8 days ago
    Auto-check passed
  • Cco Budget

    egorfedorov/claude-context-optimizer

    Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

    114 GitHub stars~808 tokensUpdated 8 days ago
    Auto-check passed
  • Cco Config

    egorfedorov/claude-context-optimizer

    View and tune CCO's behavior thresholds — re-read warnings, cache staleness, prompt-coach length bands, and the /cco-pack budget cap

    114 GitHub stars~839 tokensUpdated 8 days ago
    Auto-check passed
  • Cco Patterns

    egorfedorov/claude-context-optimizer

    Share learned file patterns across a team — export an anonymized digest of what's usually waste/useful/co-edited, and import a teammate's so a fresh clone benefits day one

    114 GitHub stars~665 tokensUpdated 8 days ago
    Auto-check passed
  • Cco Shield

    egorfedorov/claude-context-optimizer

    Show ContextShield status and waste protection stats; suggest or apply .contextignore rules from historical waste

    114 GitHub stars~457 tokensUpdated 8 days ago
    Auto-check passed
  • Cco Task

    egorfedorov/claude-context-optimizer

    Organize work by task, track tokens/cost per task, and keep a small patchable execution state that is re-injected after /compact (SKILL.state-style) — start a task, patch its state, list tasks, or…

    114 GitHub stars~866 tokensUpdated 8 days ago
    Auto-check passed

Questions about Smart Loader

What does Smart Loader do?

Automatically suggests optimal files to preload based on the user's task description and historical context patterns. Smart Loader is an agent skill from egorfedorov/claude-context-optimizer. Automatically suggests optimal files to preload based on the user's task description and historical context patterns.

When should I use Smart Loader?

Smart Loader fits situations like: starts a new task; mentions reading files; session context is being set up.

How do I install Smart Loader in Claude Code?

Run `npx skills add egorfedorov/claude-context-optimizer --skill smart-loader -a claude-code`. Or copy the skill folder (skills/smart-loader in egorfedorov/claude-context-optimizer) into .claude/skills/smart-loader in your project. Claude Code loads it when a task matches its description.

How do I install Smart Loader in Codex?

Run `npx skills add egorfedorov/claude-context-optimizer --skill smart-loader -a codex`. Or copy the skill folder (skills/smart-loader in egorfedorov/claude-context-optimizer) into .agents/skills/smart-loader in your project. Codex loads it when a task matches its description.

Can I use Smart Loader in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add egorfedorov/claude-context-optimizer --skill smart-loader -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-loader, .gemini/skills/smart-loader, .github/skills/smart-loader and .opencode/skills/smart-loader in your project.

What does Smart Loader need to run?

Going by SKILL.md and its folder, Smart Loader needs the command-line tools its instructions call (node).

Does Smart Loader access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Smart Loader safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Smart Loader use?

Smart Loader is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Smart Loader use?

About 530 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Smart Loader?

Skills that share tags, products or a category with Smart Loader: SQL Optimization (github/awesome-copilot, 40k stars), Optimization Suggest (hoangsonww/Claude-Code-Agent-Monitor, 1.1k stars), Agent Performance Optimizer (ruvnet/ruflo, 74k stars) and Database Optimizer (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smart Loader?

egorfedorov (a GitHub user) maintains it in egorfedorov/claude-context-optimizer, which has 114 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 30, 2026.

Source: egorfedorov/claude-context-optimizer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.