- Home
- Skills
- Basedhardware
- Omi
- Context Optimization
context-optimization_skill
7.6k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill basedhardware/omi --skill context-optimization- SKILL.md1.6 KB
Overview
This skill teaches efficient context management using @ mentions, context window optimization, and semantic search strategies. It helps agents provide targeted references, minimize redundant data in prompts, and maintain focus when working with large codebases or long transcripts. The goal is to preserve relevant context while staying within token limits.
How this skill works
The skill inspects available files, code sections, and documents and converts them into targeted references via @ mentions rather than embedding full content. It uses semantic search to locate relevant passages with natural-language queries and recommends chunking or Plan Mode for complex or large tasks. The result is concise, incremental context delivery that reduces noise and speeds up retrieval.
When to use it
- Working with large projects or long transcripts where full-copying exceeds context limits
- Referencing specific code snippets, configuration files, or documentation without pasting entire files
- Designing agents that must synthesize incremental findings or iterate on partial results
- Searching for patterns, related examples, or implementation variants across a codebase
- When you need targeted, high-relevance evidence for responses or summaries
Best practices
- Prefer @Files, @Code, and @Docs references over copying full content into the prompt
- Use semantic search for natural-language lookups and incremental discovery
- Limit @ mentions to the smallest relevant scope (file sections, functions, paragraphs)
- Chunk large artifacts and process sequentially to avoid hitting context window limits
- Enable agent-driven search when the task requires exploration or broad discovery
Example use cases
- Summarizing a day of wearable-device voice transcriptions by referencing only relevant segments
- Finding related code patterns across a Flutter project using semantic queries and @Code references
- Explaining a hardware interface in a BCI or smartglasses repo by linking targeted docs instead of pasting them
- Iteratively refining a feature plan by letting the agent gather context and propose focused next steps
- Debugging configuration issues by pointing the agent to specific config files and error snippets
FAQ
Use semantic search for broad, natural-language queries or discovery tasks. Use selective @ mentions when you know the exact file or code region to reference.
How do I avoid exceeding the context window with long transcripts?
Chunk transcripts into smaller segments, reference only segments with relevant content, and use semantic search to surface the most pertinent parts before feeding them to the agent.