trinhhaox/ag-kit/context-engineering
Claude Code and agent skill by trinhhaox/ag-kit
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
LLM context window optimization - budget allocation, compression, progressive loading, RAG retrieval patterns for efficient AI interactions.
Install
npx vskill@latest install trinhhaox/ag-kit/context-engineeringSKILL.md
Context Engineering
Optimize how information is fed to LLMs for maximum output quality.
Context Budget Model
5-Zone Allocation
Token Budgeting
Compression Techniques
Code Compression
Document Compression
Conversation Compression
Progressive Loading Strategy
Level 1: Structural Overview
Level 2: Targeted Detail
Level 3: Deep Context
Decision Rule
Load the minimum context needed to make a correct decision.If uncertain, load one more level, not everything.
RAG (Retrieval-Augmented Generation)
Retrieval Strategy (Priority Order)
- Exact match — function name, error message, file path
- Semantic search — vector embedding similarity
- Keyword search — BM25 / full-text search
- Structural search — AST-based code search
Document Ranking
Chunking Strategies
| Strategy | Chunk Size | Overlap | Use When | |
|---|---|---|---|---|
| Fixed-size | 500-1000 tokens | 100 tokens | General text | |
| Semantic | By paragraph/section | None | Structured docs | |
| Code-aware | By function/class | Include imports | Source code | |
| Recursive | Split by headers, then paragraphs | Minimal | Long documents |
Context Quality Signals
Include (High Value)
- Type definitions and interfaces
- Function signatures with JSDoc
- Error messages and stack traces
- Test cases (show expected behavior)
- Recent git diff (shows intent)
Exclude (Low Value)
- Lock files (package-lock.json)
- Generated code (dist/, .next/)
- Binary files
- Redundant imports across files
- Unchanged boilerplate
Anti-Patterns
| Anti-Pattern | Problem | Fix | |
|---|---|---|---|
| Dump entire file | Wastes context, dilutes signal | Extract relevant functions only | |
| No context | Hallucination, incorrect assumptions | Provide minimum viable context | |
| Stale context | Outdated info causes wrong decisions | Refresh before each major step | |
| Repeated context | Same info in system + task + reference | Deduplicate across zones | |
| Over-retrieval | Too many RAG results overwhelm | Top-k=5, re-rank, filter by score threshold |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/context-engineering/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
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/trinhhaox/ag-kit/context-engineering)