context-engineering

Configure agent context with persistent rules and selective file loading.

9|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/klh/speedy-claude --skill context-engineering-klh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/klh/speedy-claude/tree/main/skills/context-engineering
Command: npx skills add https://github.com/klh/speedy-claude --skill context-engineering-klh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Context engineering prevents agent hallucinations and drift by ensuring the AI sees the right project information at the right time, reducing incorrect code edits and wasted iterations. It addresses both too-little context (missing APIs, invented behavior) and too-much context (loss of focus, stale instructions).

Core Features & Use Cases

  • Persistent Rules Files: Define project-wide conventions, tech stack, commands, and boundaries to keep agents aligned across sessions.
  • Selective Context Loading: Load only the relevant spec sections and source files for a task to maintain focus and reduce noise.
  • Iteration Feedback: Feed targeted error output and test failures back to the agent and compact conversation history to avoid stale context.
  • Use Case: Start a feature task by loading the project's rules file, the authentication spec excerpt, the related source and test files, then ask the agent to propose a plan before executing changes.

Quick Start

Use context-engineering to create or update a project rules file, load the minimal spec section and related source files for the task, and ask the agent to propose a short plan before making edits.

Frequently Asked Questions about context-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my agent output hallucinate APIs and invent behavior during a session?

Agent output hallucinations often stem from too-little context. Context engineering prevents this by selectively loading precise, task-relevant project information like spec excerpts and source files to ground the AI.

How do I set up agent context for a new developer workflow task?

To set up agent context, use context engineering to create a project rules file, load the minimal spec section and related source files for the task, and ask the agent to propose a short plan before making edits.

What is context engineering and when do I need it for prompt engineering?

Context engineering optimizes agent context setup to provide precise project information. You need it when starting new sessions, switching tasks, diagnosing declining agent output quality, or preparing project-specific rules.

How do I manage agent confusion and stale instructions in long sessions?

Manage agent confusion by feeding targeted error output back to the agent and compacting conversation history. This explicit confusion management removes stale instructions and ensures safe decisions.

What's the best way to prevent agent drift across multiple sessions?

Prevent agent drift across sessions by defining persistent rules files. These files establish project-wide conventions, tech stack, commands, and boundaries to keep agents aligned over time.

Can I use context engineering to diagnose declining agent output quality?

Yes, context engineering applies directly to diagnosing declining agent output quality. It addresses too-much context by maintaining focus through selective loading of specs and targeted error-output feeding.