context-engineering-fundamentals
/context-engineering-fundamentals
Zarządza uwagą i dowodami w długich sesjach agentów, gdy giną instrukcje, gubią się dowody lub kontekst wieloagentowy jest duży.
- Autor
- jamditis ↗
- Repozytorium
- claude-skills-journalism ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 24.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 24.10.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
Zarządza uwagą i dowodami w długich sesjach agentów, gdy giną instrukcje, gubią się dowody lub kontekst wieloagentowy jest duży.
Oryginalny opis (EN)
Manages attention and evidence in long agent sessions. Use for lost instructions, dropped evidence, or large multi-agent contexts.
Jak działa
- Core concept
- The lost-in-middle effect
- Context degradation patterns
- Measure before compressing
- Mitigation strategies
- Signs of context degradation
- References
Podgląd SKILL.md
--- name: context-engineering-fundamentals description: Manages attention and evidence in long agent sessions. Use for lost instructions, dropped evidence, or large multi-agent contexts. --- # Context engineering fundamentals Context engineering is the practice of managing an LLM's limited attention budget. Use this skill to keep instructions, evidence, and state available during long work. ## Core concept **Context windows are constrained by attention mechanics, not only token capacity.** A large context limit does not guarantee equal use of every item. ## The lost-in-middle effect The "Lost in the Middle" experiments show that retrieval quality can change with information position. The result depends on the model, task, context length, and number of documents. | Position | Common test result | |----------|--------------------| | Beginning | Often easier to retrieve | | Middle | Can be harder to retrieve | | End | Often benefits from recency | **Implication:** Keep critical constraints easy to find and repeat them near the decision that uses them. Do not assume position alone predicts recall. ## Context degradation patterns ### 1. Lost-in-middle Information in the middle of long context gets lower attention weight. **Mitigation:** Structure with explicit sections. Put critical constraints at start AND end. ### 2. Context poisoning Errors compound when incorrect information enters context (from tool outputs, summaries, or earlier mistakes). **Mitigation:** Validate intermediate outputs. Don't blindly trust previous responses. ### 3. Context distraction Irrelevant information forces attention allocation away from relevant content. Models can't "skip" irrelevant context. **Mitigation:** Be selective about what goes into context. More isn't better. ### 4. Context confusion Multiple task types or conflicting instructions create ambiguous responses. **Mitigation:** One task per interaction when possible. Clear task boundaries. ### 5. Context clash Contradictory information from multiple sources causes derailing conflicts. **Mitigation:** Resolve contradictions explicitly before asking Claude to use the information. ## Measure before compressing Do not use a fixed token threshold to decide when context is reliable. Measure retrieval and reasoning quality on your own model and task. Test representative evidence at several positions, then compare the result before and after summarization. Compress only when the measured result or the agent's behavior shows a problem. Preserve exact constraints, decisions, source links, unresolved questions, and verification evidence. ## Mitigation strategies ### Write externally Do not rely on the agent to remember across turns. Write important state to files, but agree the path with the user first. Prefer a gitignored workspace so you never overwrite project-owned content: ``` With the user's approval, after each major step write progress to an agreed scratch file (for example a gitignored PROGRESS.md or a path they choose) Before starting, read that file back to restore context ``` ### Select carefully Filter irrelevant context before loading: ``` Instead of: "Here are all 50 files, find the bug" Do: "Here are the 3 files involved in the error" ``` ### Compress strategically Summarize while maintaining signal: ``` Instead of: Full 1000-line file Do: Key functions and their signatures, with context on the specific area ``` ### Isolate contexts For complex tasks, use subagents with focused contexts rather than one agent with everything. ## Signs of context degradation | Symptom | Likely cause | |---------|--------------| | Ignores earlier instructions | Lost-in-middle or context too long | | Contradicts itself | Context confusion or clash | | Repeats information you gave | Attention not reaching that content | | Misses obvious details | Context distraction | | Gets progressively worse | Context poisoning from errors | ## References - "Lost in the Middle" (Liu et al., 2023) - Position effects in long context - "Needle in a Haystack" benchmark - Context retrieval testing - RULER benchmark - Multi-hop reasoning over long context
Pliki w paczce (2)
- SKILL.md 4 KB
- agents/openai.yaml 1 KB
Wersje
W bazie nie ma innych skilli o nazwie context-engineering-fundamentals.
Migawka bazy z 28.10.2026 · wersja paczki 1f8a37098d69 (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
- 100context-fundamentals
Przedstawia teorię context engineeringu: czym jest kontekst, jak działa uwaga, zasady stopniowego ujawniania i podstawy budżetowania kontekstu. - 100context-fundamentals
Dostarcza podstaw context engineeringu dla systemów agentów AI: okna kontekstu, komponenty, mechanikę uwagi, stopniowe ujawnianie i budżetowanie kontekstu. - 100context-fundamentals
Dostarcza podstaw context engineeringu dla systemów agentów AI: okna kontekstu, komponenty, mechanikę uwagi, stopniowe ujawnianie i budżetowanie kontekstu. - 100context-engineering-pipeline
Prowadzi diagnostykę i naprawę kontekstu agenta, łącząc podstawy kontekstu, optymalizację KV-cache, kompresję, diagnozę degradacji i kontekst oparty na systemie plików. - 100hatch3r-context-health
Monitoruje i utrzymuje zdrowie kontekstu rozmowy w długich sesjach, gdy kontekst może się degradować, po wielu turach lub przy powtarzających się błędach. - 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.