Skip to content
alyn
jamditis

Context Engineering Fundamentals skill

Manages attention and evidence in long agent sessions. Use for lost instructions, dropped evidence, or large multi-agent contexts.

$npx skills add jamditis/claude-skills-journalism --skill context-engineering-fundamentals
View this skill on GitHubjamditis/claude-skills-journalism/dev-toolkit/skills/context-engineering-fundamentals/SKILL.md
Pack stars
452
Pack installs
21k
Alyn Score
56/99
Updated
6 days ago
License
MIT
– views – installs via Alyn

jamditis

Context Engineering Fundamentals

Install Context Engineering Fundamentals

Pick your agent. Every command is ready to paste.

$npx skills add jamditis/claude-skills-journalism --skill context-engineering-fundamentals

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads context-engineering-fundamentals when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the context-engineering-fundamentals skill”. In Codex, type $context-engineering-fundamentals.

The skill itself

SKILL.md

FolderGitHub

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

Tips for Context Engineering Fundamentals

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Context Engineering Fundamentals

What does the Context Engineering Fundamentals skill do?

Manages attention and evidence in long agent sessions. Use for lost instructions, dropped evidence, or large multi-agent contexts.

How do I install Context Engineering Fundamentals?

Run "npx skills add jamditis/claude-skills-journalism --skill context-engineering-fundamentals" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Context Engineering Fundamentals work in Cursor and Codex?

Yes. Context Engineering Fundamentals uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Context Engineering Fundamentals free?

Context Engineering Fundamentals is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Context Engineering Fundamentals?

Context Engineering Fundamentals is published by jamditis in the jamditis/claude-skills-journalism repository, together with 29 other skills.

Similar skills. From other creators.