context-engineering

context-engineering is a skill for Claude Code, Codex from vignesh2027/AI-AGENT-SKILLS. It costs 19 tokens per session (506 once invoked), scanned A, original, MIT.

A method for deciding which information an AI coding agent should receive and how much of it should fit in its limited context window.

In plain words
What is it for?
Selecting relevant files, documents, conversation history, schemas, and instructions when designing agent prompts or working through long tasks.
Why use it?
It reduces irrelevant context that can obscure important code and instructions, while avoiding missing information needed for sound decisions.

Skill for Claude CodeCodex

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

Good fit Selecting relevant files, documents, conversation history, schemas, and instructions when designing agent prompts or working through long tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vignesh2027/ai-agent-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 vignesh2027/AI-AGENT-SKILLS --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/vignesh2027/AI-AGENT-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/vignesh2027/ai-agent-skills/context-engineering.svg)](https://agentmods.dev/skills/vignesh2027/ai-agent-skills/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/vignesh2027/ai-agent-skills/context-engineering"><img src="https://agentmods.dev/badge/skills/vignesh2027/ai-agent-skills/context-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 506 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.00019 $0.00506
Opus 5 $0.00010 $0.00253
Sonnet 5 $0.00004 $0.00101
Haiku 4.5 $0.00002 $0.00051

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

How it starts

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

Overview

Context is finite. What you put in the context window determines what the agent can reason about. Too much noise → the relevant signal is diluted. Too little context → the agent makes uninformed decisions. This skill manages context deliberately.

When to Use

  • When an agent produces low-quality outputs despite correct instructions
  • When designing a system prompt for a production agent
  • When a long conversation is causing quality degradation
  • When context costs are higher than expected

Process

Step 1: Define the context budget

For your model and use case: how many tokens is your budget? Reserve: 20% for the system prompt, 20% for the output, 60% for the dynamic context (documents, history, tools).

Step 2: Prioritize context by relevance

Include in this order:

  1. Task instructions (always)
  2. The most relevant documents or code (retrieved, not full codebase)
  3. Relevant conversation history (not all history)
  4. Supporting context (schemas, type definitions)

Cut: long documents that contain 1 relevant paragraph, full file contents when only a function is needed, conversation history beyond the last N relevant turns.

Step 3: Structure context for retrieval

Agents pay more attention to the beginning and end of context. Put instructions at the top. Put the most relevant context closest to the task.

Step 4: Use explicit context delimiters

Mark different sections clearly:

<system>Your role and constraints</system>
<documents>Retrieved content</documents>
<task>What to do</task>

This prevents the model from confusing instructions with retrieved data.

Step 5: Compress context aggressively

Summarize long histories. Extract the relevant portions of long documents. Use structured data (JSON, tables) instead of prose where possible.

Step 6: Monitor context quality

Track: output quality vs. context length. If longer context is producing worse results, you have a context quality problem, not a context quantity problem.

Read the full file on GitHub · 59 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. 8d ago First seen · 59 lines · 19 tokens per session scan A a1c887834e70

Subscribe to this mod's changes

context-engineering is a skill published in the GitHub repository vignesh2027/AI-AGENT-SKILLS (2 stars, last pushed 10d ago), licensed MIT. It adds 19 tokens to every session and 506 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

knowledge

The owner's knowledge base: a markdown folder that is also a typed graph of people, projects, decisions and terms, via the kb CLI. Use BEFORE answering anything about the owner, who they work with, what a project or term means, or what was decided and why; record durable facts unasked. Not for facts about the code.

intentic/intentic · 0 tokens

session-skill-mining

Use when the user explicitly asks to inspect past Codex or Claude Code sessions, runs, or chats from a specific time range and extract reusable upgrades (skills to codify, memories to pin, or strategy-shaped findings that can be represented as skills or memories). Also invoked by the auto-optimizer scheduler to…

getcrew44/crew44 · 78 tokens

memory

A session-memory tool with three layers: agent notes, requirement memories, and overall project memory. The description does not specify how these memories are stored or managed.

devcodex-labs/devcodex · 34 tokens

summary

A skill that writes a summary of the current conversation to a daily memory file before work ends.

devcodex-labs/devcodex · 39 tokens

toknt-optimize

Tokn't token optimization — recall compressed content and view stats.

shubhransh-gupta/toknt · 16 tokens

docstrata

Project Context System — structured project memory for any project via layered docs and codebase index. Use for: documenting projects, writing PRD/roadmap, generating codebase repo-wiki, capturing requirements/decisions, writing dev notes, building doc navigation index, compacting bloated docs, auto-detecting stale…

linhai0872/docstrata · 80 tokens