Ashlr Core Efficiency — Development skill for Claude Code
Token-efficiency primitives for Claude Code: genome, compression, provider-aware budgeting.
How to install Ashlr Core Efficiency
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open ashlrai/ashlr-core-efficiency and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Ashlr Core Efficiency does
Token-efficiency primitives for Claude Code: genome, compression, provider-aware budgeting.
Alternatives in Development
- Providers — Multi-Provider Support 1.1k ★
- Puppetmaster — Provider-neutral control plane for durable-state agent swarms: subprocess workers, leases, artifacts, memory 340 ★
- Benjamin Plus Skill — Benjamin-Plus: a measured token-efficiency skill for coding agents (−17.9% cost median, quality unchanged) 272 ★
README
@ashlr/core-efficiency
Token-efficiency primitives for AI coding agents — genome RAG, multi-tier context compression, provider-aware budgeting, and prompt-caching helpers.
Extracted from [ashlrcode](https://github.com/ashlrai/ashlrcode) and shared by the `ashlrcode` CLI and the [ashlr-plugin](https://github.com/ashlrai/ashlr-plugin) for Claude Code.
**Platform support:** macOS / Linux / Windows on Bun >= 1.0 and Node >= 20.
Modules
| Subpath | LOC | Purpose |
|---|---|---|
| `/genome` | ~2,342 | Self-evolving project specs via RAG + scribe protocol. Manifest CRUD, TF-IDF/Ollama retrieval, fitness-based strategy evolution, mutation audit trail. |
| `/compression` | ~470 | 3-tier context compression: autoCompact (LLM summarize old turns), snipCompact (truncate tool results > 2 KB), contextCollapse (drop short/dup). PromptPriority enum. |
| `/budget` | ~50 | Provider-aware prompt budgeting. getProviderContextLimit, systemPromptBudget. |
| `/tokens` | ~50 | Token estimation: estimateTokensFromString, estimateTokensFromMessages. |
| `/anthropic` | ~200 | Anthropic SDK helpers: withGenome, cacheBreakpoints, ashlrMcpConfig. |
| `/session-log` | ~150 | Structured session event log (tool calls, costs, savings). |
| `/local` | ~120 | Context-window manager for small-context local models. |
| `/types` | ~60 | Shared types: Message, ContentBlock, LLMSummarizer, StreamEvent. |
Install
# Bun (primary runtime)
bun add @ashlr/core-efficiency
# npm / pnpm / yarn
npm install @ashlr/core-efficiency
For local development against a checkout:
bun add file:../ashlr-core-efficiency
The package ships TypeScript source in `src/`. Bun runs it directly. For Node.js, compile first with `bun run build` (outputs to `dist/`).
Quickstart
compression
``
Related Skills
Teknesyum Core
Token-aware multi-agent orchestration plugin for Claude Code
Ashlr Doctor
Diagnose an ashlr-plugin install — checks plugin path, version, MCP servers, hooks, stats, genome, and setting
Ashlr Genome Keygen
Generate an X25519 keypair for team-cloud genome v2 encryption and register the public half with Ashlr. Run th
Optimize Ruleset
Analyze and optimize CLAUDE.md ruleset files with project-aware meta-learning, skills analysis, personal/proje
Token Saver Stats
Show token-saver compression statistics and savings
Compression
用 LLMLingua、token pruning 等技术把长 prompt 压到 1/3-1/5,省钱、降延迟、不掉效果——长上下文时代必备的工程手段。
Related Agents
AI Provider Expert
Primary reviewer for AI provider integrations, model routing, embeddings, prompt systems, streaming, token eff
Ashlr Code
Main AshlrCode agent — token-efficient coding, editing, search. Delegates aggressively to ashlr:explore and as
System Critic
Adversarial design-system review with fresh context — hunts premature abstraction, domain leaks into primitive