Skip to content
Agentmart
Submit a tool

context-engineering

Optimizes agent context window setup, token budget management, file indexing, and session memory across long-running tasks.

Skill by 8-BitRhyon

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/8-bitrhyon-context-engineering

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Optimizes agent context window setup, token budget management, file indexing, and session memory across long-running tasks.

Use cases: finance, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/context-engineering

What's inside

Skill name
context-engineering
Description
Optimizes agent context window setup, token budget management, file indexing, and session memory across long-running tasks.
License
MIT
Instructions
103 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Context Engineering Skill

> **Scope:** Universal patterns for loading, structuring, and maintaining the right context for any agentic task. Prevents "I didn't know that file existed" and "I assumed X but it was Y".

---

## Context Layers (Load in Order)

### Layer 0: Project Constitution (Always)
- `AGENTS.md` / `CLAUDE.md`  -  agent instructions, rules, pitfalls
- `design.md` / `ARCHITECTURE.md`  -  system design, invariants
- `README.md`  -  project purpose, quickstart
- **Rule:** Read these FIRST. They define what "correct" means.

### Layer 1: Code Map (Per Task)
```bash
glob **/*.js && glob **/*.test.js          # structure
grep -r "theme-changed" --include="*.js"   # relevant area
codebase_search "theme toggle boot guard"
```
**Output:** File list + line numbers + 3-line context snippets.

### Layer 2: Deep Reads (Targeted)
```bash
# Read only what matters
read Website/assets/js/boot.js:1480:1500
read Website/globe-module.js:970:1020
```
**Rule:** Read with purpose  -  "find the theme toggle handler", not "read boot.js".

### Layer 3: Runtime Reality (Verification)
```bash
# Chrome DevTools for live state (see the axi skill for the full CLI surface:
# open <url> | snapshot | eval <js> | console)
npx -y chrome-devtools-axi open https://rhyon.dev
npx -y chrome-devtools-axi eval "window.__bootFinished"
npx -y chrome-devtools-axi snapshot --selector '#threeGlobeContainer'
```
**Rule:** Tests lie. Browser tells truth.

### Layer 4: History (When Stuck)
```bash
# Local session recall
kilo_local_recall search --query "theme toggle guard"
kilo_local_recall read --sessionID <id>

# Git history
git log --oneline -20 -- Website/assets/js/boot.js
git show <commit>:Website/assets/js/boot.js | head -200
```

---

## Context Budget Management

| Layer | Token Cost | When to Load |
|-------|------------|--------------|
| Constitution | ~2k | **Always** (session start) |
| Code Map | ~1k | Per task area |
| Deep Reads | ~500/file | Only files you'll edit |
| Runtime | ~1k | Verification phase |
| History | ~2k | Only when blocked |

**Technique:** Use `Task` agents for parallel context gathering  -  one reads constitution, another searches code, another checks tests.

## Compaction Over Growth (token economics)

Near budget? Compact, don't grow: summarize history into a compact handoff (decisions, unresolved bugs, key state, next step); sub-agents return distilled 1-2k summaries, never raw transcripts; drop old tool results. Keep the prefix byte-stable for provider caches (cache doctrine lives in AGENTS.md).

---

## Anti-Patterns

| Anti-Pattern | Symptom | Fix |
|--------------|---------|-----|
| **Assumption-driven** | "It probably works like X" | Read the file |
| **Context overflow** | 50 files read, none edited | Code map → targeted reads |
| **Stale context** | Fix works locally, breaks prod | Runtime verification mandatory |
| **History amnesia** | Re-solving solved problem | `kilo_local_recall` first |
| **Single-source** | Only tests, no browser | Layer 3 mandatory |

---

## Context Checklist (Per Task)

- [ ] Constitution read (AGENTS.md, design.md)
- [ ] Code map: affected files identified
- [ ] Deep reads: every file to be edited
- [ ] Test patterns: existing tests in area read
- [ ] Runtime baseline: current behavior captured
- [ ] History check: similar fixes attempted?

---

## Invocation

Load when:
- Starting any non-trivial task
- Switching project areas
- Debugging "mysterious" behavior
- Onboarding to new codebase

From 8-BitRhyon/monozen-skills, MIT.

More from 8-BitRhyon/monozen-skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Aug 4, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from 8-BitRhyon

Cite this page

context-engineering skill. Agent Mart. https://agentmart.dev/skills/8-bitrhyon-context-engineering (last updated 2026-10-24)