Tooluck logoTooluck
SKILL.md

context-engineering

Agent skill fromaddyosmani/agent-skills

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

How to install context-engineering

install context-engineering
# install the agent-skills pack with the skills CLI
npx skills add addyosmani/agent-skills

# or add only this skill to Claude Code: copy the folder

skills/context-engineering/

# into

~/.claude/skills/context-engineering/ (all projects)

.claude/skills/context-engineering/ (one project)

skills/context-engineering/SKILL.md

MITFull file
1# Context Engineering
2
3## Overview
4
5Feed agents the right information at the right time. Context is the single biggest lever for agent output quality — too little and the agent hallucinates, too much and it loses focus. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it's structured.
6
7## When to Use
8
9- Starting a new coding session
10- Agent output quality is declining (wrong patterns, hallucinated APIs, ignoring conventions)
11- Switching between different parts of a codebase
12- Setting up a new project for AI-assisted development
13- The agent is not following project conventions
14
15## The Context Hierarchy
16
17Structure context from most persistent to most transient:
18
19```
20┌─────────────────────────────────────┐
21│ 1. Rules Files (CLAUDE.md, etc.) │ ← Always loaded, project-wide
22├─────────────────────────────────────┤
23│ 2. Spec / Architecture Docs │ ← Loaded per feature/session
24├─────────────────────────────────────┤
25│ 3. Relevant Source Files │ ← Loaded per task
26├─────────────────────────────────────┤
27│ 4. Error Output / Test Results │ ← Loaded per iteration
28├─────────────────────────────────────┤
29│ 5. Conversation History │ ← Accumulates, compacts
30└─────────────────────────────────────┘
31```
32
33### Level 1: Rules Files
34
35Create a rules file that persists across sessions. This is the highest-leverage context you can provide.
36
37**CLAUDE.md** (for Claude Code):
38```markdown
39# Project: [Name]
40…

Excerpt shown under the repository's MIT license.

More skills in agent-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates