context-engineering

Curates rules files, specs, and source context for AI coding agent sessions.

665|3|Updated Sep 12, 2026
One-click install
npx skills add https://github.com/rizqinrr/viserys-agent --skill context-engineering-rizqinrr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/rizqinrr/viserys-agent/tree/main/skills/context-engineering
Command: npx skills add https://github.com/rizqinrr/viserys-agent --skill context-engineering-rizqinrr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents produce inconsistent output when they lack the right context: they hallucinate APIs, ignore project conventions, and degrade in quality as conversations grow. This Skill provides a structured method for deciding what information an agent sees, when it sees it, and how it is structured across a session. ## Core Features & Use Cases - Five-Level Context Hierarchy: Organizes context from persistent rules files (CLAUDE.md, .cursorrules, AGENTS.md) down to transient error output and conversation history. - Context Budget Management: Trims deadweight at 75% window capacity, compresses failed attempts into summaries, and positions task-critical content last to counter the lost-in-the-middle effect. - Confusion Management: Surfaces spec-versus-code conflicts and missing requirements as explicit options instead of silently guessing. - Use Case: When starting a new feature, you create a rules file with your tech stack and conventions, load only the relevant spec section and source files, and restart cleanly at task boundaries with a recorded handoff state. ## Quick Start Set up a CLAUDE.md rules file for my project and show me how to structure context for the current task.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I set up a CLAUDE.md rules file for my project?

Create a CLAUDE.md at the project root covering tech stack, build and test commands, code conventions, boundaries, and one example pattern. Equivalent files exist for other tools: .cursorrules for Cursor, .windsurfrules for Windsurf, and AGENTS.md for OpenAI Codex.

How much context should I give an AI coding agent per task?

Include only files relevant to the current task, aiming for under 2,000 lines of focused context. Loading more than roughly 5,000 lines of non-task-specific material causes the agent to lose focus rather than improve.

Why does AI agent output quality degrade during long sessions?

Conversation history accumulates failed attempts, verbose tool output, and replaced drafts that fragment the model's attention. Start trimming at 75% context capacity, compress old exploration into one-sentence summaries, and keep the active error and task definition last in context.

When should I start a fresh AI coding session?

Start fresh at completed task boundaries, not arbitrary token counts. Before leaving, persist the accepted scope, current task status, changed files, verification results, and open questions so the new session can resume from artifacts and git status.

What should an AI agent do when the spec conflicts with existing code?

It should surface the conflict explicitly with options rather than silently picking one interpretation. The same applies to missing requirements: check for precedent in the codebase, and if none exists, stop and ask instead of inventing behavior.