context-engineering

Set up agent context with persistent rules and selective file loading.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/RefractSystems/virtmcu --skill context-engineering-refractsystems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/RefractSystems/virtmcu/tree/main/.gemini/skills/context-engineering
Command: npx skills add https://github.com/RefractSystems/virtmcu --skill context-engineering-refractsystems

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps set up and manage the exact context fed to AI agents so they produce reliable, non-hallucinated outputs and follow project conventions across sessions and tasks.

Core Features & Use Cases

  • Persistent Rules Files: Maintain a project-wide rules file that captures tech stack, commands, conventions, and boundaries to keep agent behavior consistent.
  • Selective Context Loading: Load only the relevant spec sections and source files for the current task to avoid context flooding and loss of focus.
  • Iterative Debugging Inputs: Feed concise error output and test failures back into the agent to drive precise fixes.
  • Conversation Management: Summarize, compact, and rotate session context to prevent stale or contradictory instructions.
  • Use cases include starting a new coding session, switching between features, diagnosing declining agent quality, and onboarding AI-assisted development to a repository.

Quick Start

Provide a concise project rules file, load the minimal relevant spec sections and source files for the task, and instruct the agent to follow those conventions before making changes.

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 coding agent from hallucinating and ignoring project conventions?

To stop agent hallucinations and enforce project conventions, curate the agent context by maintaining persistent rules files, loading only relevant spec sections and source files, and iteratively feeding concise error outputs back into the agent.

What is context engineering for AI-assisted development?

Context engineering for AI-assisted development is the process of optimizing agent context setup through selective loading of spec sections, conversation compaction, and explicit trust-level handling to ensure reliable, non-hallucinated outputs across coding sessions.

How do I set up a rules file for consistent AI code assistance across sessions?

Set up a persistent rules file by capturing your tech stack, commands, conventions, and boundaries, then instruct the agent to follow those conventions before making changes to maintain consistent code assistance across sessions.

Why does my coding agent lose focus and produce degraded output over long sessions?

Coding agents lose focus and produce degraded output due to context flooding from loading too many source files and stale instructions, which you can fix by summarizing, compacting, and rotating the session context.

When should I compact or rotate conversation context when working with a code agent?

Compact or rotate conversation context when switching between features, starting a new coding session, or diagnosing degraded agent output to prevent stale or contradictory instructions from accumulating in the context window.

Can I use selective context loading to prevent context flooding when diagnosing agent errors?

Yes, you can prevent context flooding when diagnosing agent errors by selectively loading only the relevant spec sections and source files, and iteratively including concise error output and test failures to drive precise fixes.