context-engineering

Structures AI agent context hierarchically from persistent rules to transient task-specific data for coding workflows.

4|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/mymx2/foreman --skill context-engineering-mymx2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/mymx2/foreman/tree/main/.agents/skills/context-engineering
Command: npx skills add https://github.com/mymx2/foreman --skill context-engineering-mymx2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the common issue of AI agents hallucinating, losing focus, or ignoring project conventions due to poorly managed or overwhelming context.

Core Features & Use Cases

  • Context Hierarchy Implementation: Provides a structured framework for organizing rules, specs, source files, and error logs to maximize agent output quality.
  • Confusion Management: Offers standardized patterns for handling conflicting requirements or missing information, ensuring the agent asks for clarification rather than guessing.
  • Use Case: When starting a new feature, use this skill to curate a focused context block containing only the relevant spec section, existing patterns, and necessary source files to prevent the agent from drifting.

Quick Start

Apply the context engineering framework to your current session by summarizing the project goals and loading the relevant rules file.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I stop my AI agent from hallucinating and ignoring project conventions?

To stop AI agent hallucinations and ignoring project conventions, structure your context by organizing persistent rules, specs, and source files hierarchically. This prevents overwhelming the agent with unstructured data, ensuring output quality and consistent project adherence.

What is the best way to structure AI context for feature development?

The best way to structure AI context for feature development is to curate a focused context block containing only the relevant spec section, existing patterns, and necessary source files. This framework maximizes agent output quality and prevents focus drift.

How do I manage conflicting requirements and ambiguity in prompt engineering?

Manage conflicting requirements and ambiguity in prompt engineering by applying standardized confusion management patterns. These patterns ensure the agent asks for clarification rather than guessing, resolving missing information during coding sessions.

Does structuring AI context improve token usage efficiency?

Yes, structuring AI context improves token usage efficiency. By organizing information from persistent rules to transient task-specific data, the agent receives only necessary details, reducing token waste and optimizing output quality during debugging workflows.

When do I need to implement a context hierarchy for coding sessions?

You need to implement a context hierarchy for coding sessions when your output quality depends on precise context delivery. It is essential for resolving ambiguity, maintaining consistent project adherence, and preventing the agent from losing focus.

Can I use context engineering for debugging workflows and error logs?

Yes, you can use context engineering for debugging workflows by structuring error logs and source files into a focused context block. This ensures the agent processes the exact errors and relevant code needed to resolve issues efficiently.