context-engineering

context-engineering is a skill for Claude Code, Codex from guia-matthieu/clawfu-skills. It costs 51 tokens per session (1,750 once invoked), scanned A, original, MIT.

A guide to managing an AI coding session when its history becomes large or confusing. It explains how to keep important instructions and information available during long or multi-agent work.

In plain words
What is it for?
Use it to summarize and reset a crowded session, organize critical instructions, prepare handoffs, and plan workflows involving multiple agents.
Why use it?
Long conversations can cause instructions to be overlooked, errors to build on earlier errors, and irrelevant details to distract from the task.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to summarize and reset a crowded session, organize critical instructions, prepare handoffs, and plan workflows involving multiple agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guia-matthieu/clawfu-skills/context-engineering
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add guia-matthieu/clawfu-skills --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/guia-matthieu/clawfu-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/guia-matthieu/clawfu-skills/context-engineering/github.svg)](https://agentmods.dev/skills/guia-matthieu/clawfu-skills/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/guia-matthieu/clawfu-skills/context-engineering"><img src="https://agentmods.dev/badge/skills/guia-matthieu/clawfu-skills/context-engineering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-engineering

Your own site · 80×15
<a href="https://agentmods.dev/skills/guia-matthieu/clawfu-skills/context-engineering"><img src="https://agentmods.dev/badge/skills/guia-matthieu/clawfu-skills/context-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.01750
Opus 5 $0.00026 $0.00875
Sonnet 5 $0.00010 $0.00350
Haiku 4.5 $0.00005 $0.00175

Measured 9d ago against content hash 40469fdcf962, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

context-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/meta/context-engineering/SKILL.md · 265 lines

How it starts

The opening of the file, as written. The whole thing — 265 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Engineering

Overview

Core principle: Context is a finite resource with diminishing returns. Find the smallest high-signal token set, not the largest.

200K tokens is shared space: system prompt + conversation history + your processing. As context grows, performance degrades predictably.

When to Use

  • Session > 30 minutes or 50k+ tokens
  • Instructions being ignored or forgotten
  • Repeated clarifications needed
  • Planning multi-agent workflows
  • Preparing handoffs between sessions

Quick Reference

Problem Symptom Fix
Lost-in-middle Mid-conversation instructions ignored Move critical info to start/end
Context poisoning Errors compounding, hallucinations referenced Summarize and reset
Context distraction Irrelevant info degrading performance Prune aggressively
Context confusion Conflicting guidance causing inconsistency Consolidate instructions

Degradation Patterns

1. Lost-in-Middle Effect

Information in context middle gets 10-40% lower recall than edges.

[START - High attention]
  ↓
[MIDDLE - Low attention zone]  ← Instructions here get ignored
  ↓
[END - High attention]

Fix: Strategic placement

  • Critical instructions → START (system prompt, first user message)
  • Recent decisions → END (last few messages)
  • Reference material → MIDDLE (acceptable for lookup, not instructions)

2. Context Poisoning

Early hallucination gets referenced → compounds → becomes "fact".

Symptoms:

  • Confident statements contradicting earlier facts
  • "As we discussed..." referencing things never said
  • Circular reasoning citing own previous errors

Fix: Checkpoint and summarize

Every 10-15 exchanges, create explicit checkpoint:

"Let me summarize what we've established:
1. [Verified fact]
2. [Verified fact]
3. [Decision made]

Continuing from here..."

3. Context Distraction

Irrelevant tokens compete for attention budget.

Symptoms:

  • Responses reference unrelated earlier topics
  • Focus drifts from current task
  • Unnecessary caveats about old context

Read the full file on GitHub · 265 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 265 lines · 51 tokens per session scan A 40469fdcf962

Subscribe to this mod's changes

context-engineering is a skill published in the GitHub repository guia-matthieu/clawfu-skills (149 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 1,750 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

error-log

Apply when learning from a mistake. Central memory of past errors and derived rules; consult before logging a new error to avoid duplicates.

sordi-ai/skill-everything · 29 tokens

skill-everything

Git-versioned agent memory — agents that never make the same mistake twice.

sordi-ai/skill-everything · 20 tokens

ads-creative-development

How to produce ad creative that converts at performance scale. Hook patterns, format selection, video pacing, variation systems, sequential testing methodology, fatigue detection, brand-voice alignment without conversion dilution, and platform-specific creative norms. Triggers on ad creative, ad design, hook patterns…

rampstackco/claude-skills · 124 tokens

ads-performance-analytics

How to read paid media dashboards without fooling yourself. Attribution models, platform reporting quirks, multi-platform reconciliation, ROAS vs LTV horizon traps, statistical noise in performance metrics, incrementality testing, and the failure modes that produce expensive lessons. Triggers on read paid media…

rampstackco/claude-skills · 147 tokens

paid-media-strategy

A discipline for running paid media that does not light money on fire. Hypothesis writing for paid spend, channel selection, budget allocation, audience targeting, bid strategy, campaign types, what NOT to spend on, attribution reality, and the failure modes that produce expensive lessons. Triggers on paid media…

rampstackco/claude-skills · 142 tokens

mem-search

Search past coding sessions using natural language. Finds relevant observations, decisions, and context from previous work.

softspark/ai-toolkit · 23 tokens