context-engineering
/context-engineering
Projektuje strategię składania kontekstu: jakie informacje trafiają do modelu, w jakiej kolejności, z jakim budżetem i jak obsłużyć przepełnienie.
- Autor
- patonkikh ↗
- Repozytorium
- APES ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 03.07.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 03.07.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Projektuje strategię składania kontekstu: jakie informacje trafiają do modelu, w jakiej kolejności, z jakim budżetem i jak obsłużyć przepełnienie.
Oryginalny opis (EN)
Design context assembly strategy: what information enters the model context, in what order, with what budget, and how to handle overflow. Use when working on prompt engineering, AI workflows, agents, context design, or LLM optimization.
Jak działa
- Step 1: Define context budget
- Step 2: Inventory context sources
- Step 3: Design assembly pipeline
- Step 4: Define truncation strategies
- Step 5: Plan caching opportunities
- Step 6: Validate
Podgląd SKILL.md
--- name: context-engineering description: > Design context assembly strategy: what information enters the model context, in what order, with what budget, and how to handle overflow. Use when working on prompt engineering, AI workflows, agents, context design, or LLM optimization. metadata: apes-version: "1.1" category: ai --- # Context Engineering # Purpose Design context assembly strategy: what information enters the model context, in what order, with what budget, and how to handle overflow. **Input:** AI architecture, data sources, prompt template, context window limit **Output:** Context Engineering specification with budget allocation, assembly pipeline, and truncation rules **Examples:** See [examples.md](examples.md) for worked input/output. --- # Workflow ## Step 1: Define context budget | Segment | Token budget | Priority | |---------|--------------|----------| Segments: system instructions, retrieved docs, conversation history, tool results, user query. Total must fit within model context window minus output reserve (typically 20-30%). ## Step 2: Inventory context sources | Source | Type | Typical size | Freshness | Required | |--------|------|--------------|-----------|----------| Sources: RAG chunks, user profile, session history, API tool outputs, documents. ## Step 3: Design assembly pipeline Order of assembly (recommended): 1. System instructions (fixed) 2. Critical constraints 3. Retrieved context (ranked) 4. Recent conversation (truncated) 5. User query Document ranking/scoring for retrieved content. ## Step 4: Define truncation strategies | When overflow | Strategy | |---------------|----------| | History too long | Summarize older turns / sliding window | | RAG too large | Re-rank and top-k truncate | | Document too large | Chunk and select best chunks | | Tool output large | Summarize or extract fields | ## Step 5: Plan caching opportunities | Content | Cacheable | TTL | Savings | |---------|-----------|-----|---------| Static system prompts, frequent retrievals, embeddings. ## Step 6: Validate Run Validation checklist. --- # Decision Rules | Condition | Action | |-----------|--------| | No context window limit specified | Use conservative default; state assumption | | Required source exceeds budget alone | Recommend summarization, RAG, or larger model | | PII in context sources | Apply redaction before assembly | | Conflicting info across sources | Define precedence rules | | No truncation strategy | Block; overflow will cause failures | --- # Validation - [ ] Token budget allocated per segment - [ ] Budget fits within context window minus output reserve - [ ] All context sources inventoried - [ ] Assembly order documented - [ ] Truncation strategy for each overflow scenario - [ ] Ranking method for retrieved content defined - [ ] Caching opportunities identified - [ ] PII handling addressed if applicable --- # Anti-patterns - **Stuff everything** — no budget, no truncation. - **Wrong order** — user query buried under irrelevant context. - **Stale context** — no freshness consideration for dynamic data. - **Duplicate content** — same info from multiple sources wasting tokens. - **No output reserve** — using 100% context for input. --- # Best Practices - Reserve 20-30% of context for model output. - Put most relevant context closest to user query. - Use semantic ranking for RAG chunks. - Summarize long histories rather than drop silently. - Measure context utilization in production metrics. --- # Output Structure ```markdown # Context Engineering: [System Name] ## Model & Budget - **Context window:** [tokens] - **Output reserve:** [tokens] - **Available input:** [tokens] ## Budget Allocation | Segment | Budget | Priority | |---------|--------|----------| ## Sources | Source | Size | Freshness | Required | |--------|------|-----------|----------| ## Assembly Pipeline 1. [Step] ## Truncation Rules | Scenario | Strategy | |----------|----------| ## Caching | Content | TTL | Expected savings | |---------|-----|------------------| ## Metrics | Metric | Target | |--------|--------| | Context utilization | <80% | | Retrieval precision | [target] | ``` --- # Next Skills | Outcome | Recommended Skill | |---------|-------------------| | Design RAG pipeline | `rag/rag-architecture-designer` | | Optimize prompts | `ai/prompt-optimizer` | | Chunking strategy | `rag/chunking-strategy-advisor` | | AI architecture update | `ai/ai-solution-architect` |
Pliki w paczce (3)
- README.md 1 KB
- examples.md 2 KB
- skill.md 4 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · patonkikh/APES | 100 | MIT |
| mvschwarz/openrig | 100 | Apache-2.0 |
| TerminalSkills/skills | 100 | Apache-2.0 |
| FrancoStino/opencode-skills-collection | 100 | MIT |
| drvoss/everything-copilot-cli | 100 | MIT |
| komluk/scaffolding | 100 | MIT |
| kdlbs/kandev | 100 | AGPL-3.0 |
| proxify-dev/agentic-kit | 100 | MIT |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki 3f97b53c9f3d (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100ai-context-engineer
Prowadzi inżynierię kontekstu dla systemów LLM: składanie promptów, budżet tokenów, priorytety źródeł, kompresja historii, cache i diagnozowanie błędów jak utrata instrukcji czy przepełnienie. - 100ai-solution-architect
Projektuje architekturę systemu AI: dobór modelu, potok inferencji, zarządzanie kontekstem, strategia ewaluacji oraz kompromisy kosztu i opóźnień. - 90token-budget
Projektuje budżety tokenów: podział na system, użytkownika i asystenta, obsługa przepełnienia i kompresja kontekstu przy przekroczeniu okna kontekstu. - 100prompt-and-context-engineering
Pomaga układać prompty systemowe, zarządzać budżetem okna kontekstu i decydować, co umieścić w prompcie systemowym, opisie narzędzia, pobranej treści lub historii rozmowy agenta. - 100evaluate-context-engineering
Audytuje context engineering skilli i zawsze ładowanych reguł (C1 do C6), przy odchudzaniu kontekstu, przeglądzie pluginu lub po premierze nowego modelu Claude. - 100context-budget
Zarządza oknem kontekstu agentów AI, optymalizuje jego użycie i zapobiega przepełnieniu przy dużych bazach kodu i długich sesjach.