Prompt Layering Agent instructions stack across four layers — system prompt, project instructions such as AGENTS.md and CLAUDE.md, skill content such as SKILL.md, and the user message — with specificity generally determining precedence when layers conflict, according to an Agent Patterns guide on prompt layering. The guide notes the ordering is a behavioral tendency rather than a formal rule enforced by the model, and that contradictions between layers produce unpredictable outputs. It also warns that subagents do not inherit the parent agent's context, starting fresh with their own system prompt unless constraints are explicitly passed, and cites Purpura et al., 2026 in reporting that constraints near the start of a prompt are followed more reliably than those buried in the middle. context-engineering ../../tags/ tag:context-engineering instructions ../../tags/ tag:instructions tool-agnostic ../../tags/ tag:tool-agnostic Prompt Layering: How Instructions Stack and Override ¶ prompt-layering-how-instructions-stack-and-override Prompt layering stacks agent instructions across four sources — system prompt, project instructions, skill content, user message — where specificity determines precedence on conflicts. Learn it hands-on with The Layer Stack https://learn.agentpatterns.ai/context-engineering/prompt-layering/ , a guided lesson with quizzes. The layer stack ¶ the-layer-stack Instructions reach an agent from several sources, each loaded at a different point in the session lifecycle: php graph TD A System Prompt