# slm-agent

Scans your codebase for AI API calls and maps out where smaller ScaleDown models can take over. Useful when token spend keeps climbing.

- plugin · `type=plugin` · Claude Code · ★ 38
- Author: scaledown-team
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/scaledown-team/SLM_Agent
- Updated: 2026-10-15
- HTML: https://affpapa.org/en/nevibecode/plugins/slm-agent

## What it does

The plugin walks your project looking for calls into OpenAI, Anthropic, LangChain, LlamaIndex, Cohere and other AI APIs. It then writes a migration plan: which call sites fit `sd_classify`, `sd_extract`, `sd_summarize` or `sd_compress`. Calls scoring 3+/5 get broken into sub-tasks, with a note on what still needs a frontier model.

Scanning happens on your machine. Nothing from the codebase is uploaded; network traffic only starts at runtime, when your own app hits ScaleDown endpoints using the `SCALEDOWN_API_KEY` you supply. Output lands in `scaledown-report.md` at the project root — a summary table, a complexity breakdown, a section per opportunity, and the HTTP API shapes for the four endpoints.

A second skill, `/slm-agent:optimize`, tunes the prompt you send to a ScaleDown model against your own samples and benchmarks it against the frontier output it replaced. The eval metric follows the task: Macro-F1 for classification, per-field precision and recall for extraction, ROUGE for summarization. Once a call is migrated, your app needs that ScaleDown key to run.

## Install

### Claude Code (native platform)

**Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add anthropics/claude-plugins-community
```
In the agent chat (not a shell):
```text
/plugin install slm-agent@claude-community
```

## When to use it
- locate every LLM call in a project, including less common providers
- decide which calls a small model can handle without losing quality
- cut spend on classification and entity extraction
- shrink long context before it reaches the model
- test a prompt on real samples and compare it to the old output

## Example prompts
- Run `/slm-agent:evaluate` on this repo and show me where ScaleDown SLMs fit
- Apply the migration for the classification calls you found
- Run `/slm-agent:optimize` and tune the prompt against my `samples.jsonl`

## Similar
- [cost-aware-llm-pipeline](https://affpapa.org/en/nevibecode/skills/cost-aware-llm-pipeline.md) — skill · 4600 installs
- [openrouter](https://affpapa.org/en/nevibecode/skills/openrouter.md) — skill · 403 installs
- [llm-cost-optimization](https://affpapa.org/en/nevibecode/skills/llm-cost-optimization.md) — skill · 334 installs
- [llm-cost-optimizer](https://affpapa.org/en/nevibecode/skills/llm-cost-optimizer.md) — skill · 73 installs
- [cloud-architect](https://affpapa.org/en/nevibecode/skills/httpsgithubcomjeffallan-cloud-architect.md) — skill · 4700 installs
- [migrate](https://affpapa.org/en/nevibecode/skills/launchdarkly-migrate.md) — skill · 1800 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
