littleblacky/agenticforge/agenticforge-context
Claude Code and agent skill by littleblacky/agenticforge
- community
Checking that the SKILL.md file is still in the repository.
Expert at using AgenticFORGE ContextBuilder to manage LLM token budgets. Use when the user needs to control token usage, prevent context overflow, or build messages that fit within a model window.
Install
npx vskill@latest install littleblacky/agenticforge/agenticforge-contextSKILL.md
AgenticFORGE ContextBuilder Expert
Role
You are an expert in @agenticforge/context. You ensure LLM calls never exceed context windows by building token-aware message arrays.
Constructor
ContextBuilder takes a config object nested inside an options object:
Note: The constructor signature is new ContextBuilder({ config?: ContextBuilderConfig }), not new ContextBuilder({ maxTokens }) directly.
Basic Usage
With RAG context (additionalPackets)
Token budget pattern
ContextBuilderConfig reference
| Option | Default | Notes | |
|---|---|---|---|
maxTokens | 4096 | Total token budget | |
systemTokenBudget | 512 | Max tokens for systemInstructions | |
historyTokenBudget | 1024 | Max tokens for conversationHistory | |
minRelevance | 0 | Min relevanceScore for additionalPackets | |
enableMmr | false | Use MMR diversity selection for packets | |
mmrLambda | 0.5 | MMR relevance/diversity tradeoff | |
recencyWeight | 0.3 | Weight for recency in composite packet score | |
enableStructuredTemplate | false | Render packets into structured sections | |
enableCompression | true | Truncate structured template if over budget |
BuildContextInput reference
| Field | Type | Notes | |
|---|---|---|---|
userQuery | string | Required. Never trimmed. | |
systemInstructions | string? | Optional system prompt. Never trimmed. | |
conversationHistory | Message[]? | Trimmed oldest-first if over budget. | |
additionalPackets | ContextPacket[]? | RAG/tool results, selected by relevance + recency. |
BuiltContext result shape
Model reference
| Model | Window | Safe maxTokens | |
|---|---|---|---|
| gpt-4o | 128k | 100000 | |
| gpt-4o-mini | 128k | 100000 | |
| gpt-3.5-turbo | 16k | 14000 |
Gotchas
- Constructor is
new ContextBuilder({ config: { maxTokens } })— NOTnew ContextBuilder({ maxTokens }) - There are NO
addSystem(),addHistory(),addUser()methods — everything goes intobuild({ ... }) build()is async — alwaysawait ctx.build({ userQuery, ... })systemInstructionsis NEVER trimmed — keep it conciseuserQueryis NEVER trimmed — always included- History is trimmed oldest-first — recent context preserved
- Token counting uses approximation (chars/4) — actual model tokenization may differ
Output Format
- Show ContextBuilder with correct constructor
{ config: { maxTokens } }for target model - Wire
built.messagesinto the LLM call - Warn if system prompt or RAG context risks consuming too many tokens
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agenticforge-context/SKILL.md
Popularity
- Repository stars
- 75
- Repository forks
- 4
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/littleblacky/agenticforge/agenticforge-context)