context-engineering

context-engineering is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 46 tokens per session (1,321 once invoked), scanned A, original, MIT.

Guidance for controlling the information an AI agent receives during a task. It covers context-window limits, retrieving relevant information, shortening conversation history, memory, and trimming tool results.

In plain words
What is it for?
Planning context budgets, retrieval, conversation compaction, persistent memory, and tool-output pruning for long-running agents or assistants.
Why use it?
It helps when long conversations, files, or tool outputs make an agent slower, more expensive, or less accurate. The focus is selecting useful information instead of sending everything.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Planning context budgets, retrieval, conversation compaction, persistent memory, and tool-output pruning for long-running agents or assistants.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/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 nimadorostkar/Claude-Skills-collection --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

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/nimadorostkar/claude-skills-collection/context-engineering/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/context-engineering"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/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/nimadorostkar/claude-skills-collection/context-engineering"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/context-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,321 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00046 $0.01321
Opus 5 $0.00023 $0.00660
Sonnet 5 $0.00009 $0.00264
Haiku 4.5 $0.00005 $0.00132

Measured 11d ago against content hash 4d4ba3859330, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 11d 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/ai/context-engineering/SKILL.md · 123 lines

How it starts

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

Context Engineering

Purpose

Decide what an LLM sees, and what it does not. Context is a finite budget with a nonlinear cost curve: more context is not more capability, and past a point it is actively less.

When to Use

  • Building an agent or assistant that runs over many turns.
  • A model that performs worse as the conversation gets longer.
  • Managing tool results, retrieved documents, or long files.
  • Reducing token cost in a long-running system.

Capabilities

  • Context budgeting and allocation.
  • Retrieval: putting the right thing in, not everything.
  • Compaction and summarization of history.
  • Memory: what persists across sessions, and in what form.
  • Tool-result pruning and progressive disclosure.

Inputs

  • The task, and what information it genuinely requires.
  • The context window and its cost.
  • The failure symptom, if the system is degrading over long runs.

Outputs

  • A context budget with an allocation per component.
  • A compaction strategy that preserves what matters.
  • Measurably better performance on long tasks.

Workflow

  1. Budget the window explicitly — System prompt, tools, retrieved context, history, and the response all compete for the same space. Decide the allocation rather than letting history consume everything.
  2. Retrieve narrowly — Ten highly relevant chunks outperform a hundred marginally relevant ones. Irrelevant context does not sit inertly; it distracts.
  3. Compact, do not truncate — Dropping the oldest turns loses the decisions that explain the current state. Summarize the history into the facts and decisions that are still live.
  4. Prune tool results — A tool returning 50 KB of JSON when the agent needs three fields is spending the budget on noise. Filter at the tool boundary.
  5. Disclose progressively — Provide a file listing, not the files. Let the model request what it actually needs. This is how a large codebase fits in a small window.
  6. Externalize memory — Long-lived state belongs in a file or a store the model can read and write, not in a conversation history that grows without bound.

Read the full file on GitHub · 123 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. 11d ago First seen · 123 lines · 46 tokens per session scan A 4d4ba3859330

Subscribe to this mod's changes

context-engineering is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 23d ago), licensed MIT. It adds 46 tokens to every session and 1,321 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

self-improve

Extract lessons from the current session, or sweep the project's past sessions when asked, and route them to the appropriate knowledge layer (project AGENTS.md, auto memory, existing skills, or new skills). Use when the user asks to "self-improve", "distill this session", "distill past sessions", "sweep past…

tobihagemann/turbo · 125 tokens

recall-reasoning

Recall the reasoning behind a past change by locating the Claude Code transcript that produced it. Use when the user asks to "recall reasoning", "find reasoning", "look up reasoning", "recall implementation reasoning", "find the rationale", "why did I do X", "recall from transcripts", or "find the transcript for this…

tobihagemann/turbo · 76 tokens

install-memu

Install or uninstall memU for whatever agent you are — identify your host, print its packaged guide, and follow it to wire (or unwire) both seams (record and inject). Use when the user asks to install, set up, integrate, remove, or uninstall memU.

NevaMind-AI/memU · 61 tokens

agent-wiki

Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.

Dianel555/DSkills · 89 tokens

capability-evolver

Self-evolution workflow for the agent. Before substantive work, recall past outcomes from evolution memory; while editing, detect improvement signals; at task end, record the outcome; when reusable, distill or search the EvoMap network for proven genes/capsules. Use when the user starts non-trivial work (a feature, a…

Dianel555/DSkills · 98 tokens

agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

lingxling/awesome-skills-cn · 26 tokens