惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
美团技术团队
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
博客园 - Franky
罗磊的独立博客
雷峰网
雷峰网
F
Fortinet All Blogs
Stack Overflow Blog
Stack Overflow Blog
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
H
Help Net Security
Vercel News
Vercel News
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
量子位
F
Full Disclosure
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
WordPress大学
WordPress大学
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
D
Docker
T
Tailwind CSS Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
Y
Y Combinator Blog
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
Recent Announcements
Recent Announcements
V
Visual Studio Blog
The Cloudflare Blog
P
Proofpoint News Feed

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Context Engineering for AI Agents: What It Is and Why It Changes Everything
Samuel Rose · 2026-05-11 · via DEV Community

Quick Answer: Context engineering is the practice of designing the right information, tools, and structure around an AI agent so it produces reliable, high-quality output. Unlike prompt engineering (optimizing what you ask), context engineering optimizes the conditions under which the agent works. SKILL.md files are context engineering in portable, reusable form.


Prompt engineering had its moment. You learned to say "think step by step," add few-shot examples, and structure your requests carefully. It worked — for single-turn tasks.

But AI coding agents don't do single-turn tasks. They run in loops. They call tools, read files, make decisions, backtrack, and execute multi-step workflows that can last minutes or hours. In that world, how you phrase your question matters far less than what information the agent has access to when it's making decisions.

That shift — from optimizing the question to optimizing the environment — is what context engineering is about.

What context engineering actually means

Context is every token the model sees when it generates a response: the system prompt, conversation history, tool definitions, retrieved documents, file contents, and any other information that lands in the context window.

Context engineering is the discipline of curating that information so the agent sees the right things, in the right format, at the right time.

In practice, it comes down to four moves:

Context offloading. Moving information out of the main context window and into external systems (files, databases, tool outputs) that the agent can pull from when needed, rather than carrying everything in-band.

Context retrieval. Dynamically fetching relevant information at runtime instead of front-loading everything. This includes RAG, tool calls, and file reads.

Context isolation. Keeping subtasks separate so one thread of work doesn't contaminate another. In multi-agent systems, agents communicate through minimal structured outputs, not shared memory dumps.

Context reduction. Compressing or summarizing history when the context window fills up, while preserving the information the agent will still need for future decisions.

The goal across all four: find the smallest possible set of high-signal tokens that give the agent the highest probability of producing a good outcome.

Why prompt engineering isn't enough anymore

Prompt engineering optimizes a single interaction. Context engineering optimizes a session — the full arc of an agent working through a complex task.

Consider what happens when you ask Claude Code to refactor a payment processing module:

With prompt engineering alone, you write a detailed prompt explaining your codebase architecture, naming conventions, testing requirements, and deployment constraints. Every time. For every task. And if the agent runs for 20 minutes and needs to make a decision at minute 18, your carefully crafted prompt from minute 0 may have been pushed out of the context window by tool outputs and file reads.

With context engineering, that architectural knowledge lives in a structured file that the agent reads before it starts working. Your coding conventions are encoded in a skill that activates when the agent writes code. Your testing requirements are in another skill that activates when it generates tests. The agent retrieves what it needs, when it needs it, without you repeating yourself.

The difference isn't subtle. Teams that invest in context engineering report dramatically more consistent agent output because the agent's environment is deterministic even when its reasoning isn't.

The context engineering stack for AI coding agents

Modern AI coding agents have multiple layers where context gets injected. Understanding these layers is the key to effective context engineering.

Layer 1: Custom instructions (always-on context)

These are persistent instructions that shape the agent's behavior across all tasks. In Claude Code, this is CLAUDE.md. In Cursor, it's the system prompt settings. In Codex CLI, it's AGENTS.md in your home directory.

Best for: coding style preferences, language choices, personality, response format. Keep these short — they consume context on every single interaction.

Layer 2: Project-level context files

These are repository-level files that tell the agent how your specific project works. AGENTS.md at the repo root is the emerging standard. It covers build commands, test procedures, architecture decisions, directory structure, and coding conventions.

Best for: project-specific knowledge that a new team member would need on day one. Think of it as onboarding documentation, but for your AI agent.

Layer 3: Reusable skills (on-demand expertise)

This is where SKILL.md comes in. Skills are portable, reusable context packages that activate when relevant and stay dormant when they're not. A code review skill loads when you ask for a review. A deployment skill loads when you're deploying. A testing skill loads when you're writing tests.

Skills solve the fundamental context engineering problem: you can't fit everything the agent might need into a single context window, so you need a mechanism for loading the right expertise at the right time. That's exactly what skills do.

Best for: specific workflows, repeatable procedures, domain expertise, team playbooks, and any task that benefits from a structured methodology.

Layer 4: Tool access (MCP servers)

Model Context Protocol servers give agents the ability to interact with external systems — databases, APIs, dashboards, deployment platforms. They're the only layer that gives agents new capabilities rather than new instructions.

Best for: connecting agents to live data sources, enabling actions in external systems, replacing manual copy-paste workflows.

Layer 5: Dynamic retrieval (RAG and file reads)

The agent reads files, searches codebases, and retrieves documentation during execution. This layer is largely automatic, but how you organize your codebase and documentation directly impacts retrieval quality.

Best for: large codebases where the agent needs to discover relevant context during execution rather than having it pre-loaded.

SKILL.md is context engineering in portable form

The SKILL.md format was designed, from the ground up, as a context engineering tool. Every design decision maps to a context engineering principle:

YAML frontmatter = metadata for context routing. The structured header tells the agent (and the skill loader) what this skill does, when it should activate, and what it's compatible with. This is context isolation — the skill only loads when relevant, preventing irrelevant instructions from cluttering the context window.

Markdown body = structured instructions. The body contains the actual expertise: procedures, checklists, examples, edge cases. This is context offloading — moving detailed procedural knowledge out of ad-hoc prompts and into a reusable, version-controlled document.

Portability across 20+ agents. A skill written for Claude Code works in Cursor, Codex CLI, Gemini CLI, and other compatible agents without modification. This is the key differentiator from agent-specific formats like .cursorrules or CLAUDE.md — your context engineering investment isn't locked into a single tool.

On-demand activation. Skills load into context when the agent's task matches the skill's domain, and they stay out of context otherwise. This is context reduction by design — instead of cramming every possible instruction into the system prompt, you maintain a library of skills and let the right ones surface at the right time.

Practical example: context engineering a code review workflow

Without context engineering, a code review request looks like this:

"Review this PR. Check for security issues, make sure it follows our coding standards, verify test coverage, check for breaking API changes, and make sure the error handling is consistent with our patterns. We use TypeScript with strict mode, our API responses always use the Result pattern, we never throw in async functions, and tests should use vitest with the arrange-act-assert pattern..."

You're dumping procedural knowledge into a one-off prompt. Next time, you'll need to remember all of this again — or more likely, you'll forget half of it and get an inconsistent review.

With context engineering, the same workflow uses three layers:

AGENTS.md (project context): documents that this is a TypeScript project with strict mode, vitest for testing, and the Result pattern for API responses.

code-review skill (SKILL.md): contains a structured review checklist covering security, test coverage, breaking changes, and error handling patterns. Includes examples of good and bad patterns specific to your codebase.

GitHub MCP server (tool access): gives the agent direct access to the PR diff, commit history, and CI status without you copying and pasting.

The agent reads AGENTS.md for project context, loads the code review skill for procedural expertise, and uses the MCP server to access the PR directly. Every review is consistent. The knowledge is version-controlled. And when your coding standards change, you update the skill once instead of remembering to adjust your prompts.

Getting started with context engineering

If you're using AI coding agents and haven't invested in context engineering yet, start here:

Step 1: Write a short AGENTS.md (or CLAUDE.md) for your main project. Cover build commands, test commands, and your top 5 coding conventions. Keep it under 150 lines.

Step 2: Install 2-3 high-impact skills that match your most common workflows. Code review, commit message generation, and documentation are good starting points. Browse curated, security-scanned skills at agensi.io.

Step 3: Add one MCP server for a service you use daily. If you're constantly copying data from a browser into your chat window, that's the signal.

Step 4: Pay attention to where the agent fails. Each failure is a context engineering opportunity — either the agent lacked information it needed, or it had too much irrelevant information clouding its judgment.

Context engineering isn't a one-time setup. It's an iterative practice. The best context engineering setups grow through real usage, adding skills and refining project context as you discover what the agent needs to perform consistently.

The shift from prompting to engineering

The AI coding agent ecosystem is converging on a clear architecture: project-level context files provide the foundation, portable skills provide reusable expertise, MCP servers provide tool access, and dynamic retrieval fills in the gaps.

This is context engineering. And for developers who invest in it, the payoff is compounding — every skill you install, every project file you refine, and every tool connection you add makes every future agent interaction more reliable.

The era of crafting the perfect prompt for each task is ending. The era of engineering the perfect environment for your agent is here.


For curated, security-scanned skills that work with Claude Code, Cursor, Codex CLI, Gemini CLI, and 20+ AI coding agents, browse the Agensi marketplace. For a deep dive on the SKILL.md format, see What is SKILL.md.