Agent skill

Context Engineering

by a5c-ai in a5c-ai/babysitter

Context window monitoring and budget management. An agent skill from a5c-ai/babysitter.

MITAuto-check: notesAgent Workflows

Install Context Engineering

skills CLI
$ npx skills add a5c-ai/babysitter --skill context-engineering -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install a5c-ai/babysitter context-engineering --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/a5c-ai/babysitter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/library/methodologies/gsd/skills/context-engineering .claude/skills/context-engineering && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-engineering
GitHub stars
1.8k
Token cost
~1.8k tokens
SKILL.md length
527 words
Files
2
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Context window monitoring and budget management. An agent skill from a5c-ai/babysitter.

  • Works in 7 steps: Context Usage Estimation → Threshold Warnings → Orchestrator Budget Enforcement → …
  • Tasks that involve Context engineering
  • SKILL.md covers Capabilities, Tool Use Instructions, Process Integration and Output Format, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Context Engineering is an agent skill from a5c-ai/babysitter. Context window monitoring and budget management. Keeps orchestrator at 15-30% context usage while subagents get full 200k tokens. Provides warnings at thresholds, context-aware summarization triggers, and wave-level budget planning.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `README.md`).

It sits in Agent Workflows, covering Context engineering, Summarization and Budgeting and forecasting. The repository describes itself as: Babysitter enforces obedience on agentic workforces and enables them to manage extremely complex tasks and workflows through deterministic, hallucination-free self-orchestration. The licence is MIT.

When your agent uses it

  • Tasks that involve Context engineering
  • Tasks that involve Summarization
  • Tasks that involve Budgeting and forecasting

Example prompts

  • “/context-engineering”

Requirements

  • Pre-approved tools (allowed-tools): Read, Bash(*)

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Context Usage Estimation
  2. Threshold Warnings
  3. Orchestrator Budget Enforcement
  4. Subagent Context Allocation
  5. Context-Aware Summarization
  6. Stale Context Detection
  7. Wave-Level Budget Planning

What it can do on your machine

Read from SKILL.md and the folder at commit feb68ab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash(*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context Engineering loads about 1.8k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 527 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Bash(*)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from a5c-ai/babysitter at commit feb68ab, republished under its MIT licence (© a5c-ai). 527 words, ~1,812 tokens.

Download SKILL.mdSave it as .claude/skills/context-engineering/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
context-engineering
description
Context window monitoring and budget management. Keeps orchestrator at 15-30% context usage while subagents get full 200k tokens. Provides warnings at thresholds, context-aware summarization triggers, and wave-level budget planning.
allowed-tools
Read, Bash(*)
metadata.author
babysitter-sdk
metadata.version
1.0.0
metadata.category
gsd-core
metadata.backlog-id
SK-GSD-003
graph.domains
domain:software-engineering
graph.skillAreas
skill-area:agentic-loops, skill-area:orchestration-loop
graph.workflows
workflow:feature-development
graph.topics
topic:developer-experience
graph.roles
role:tech-lead, role:backend-engineer
  • Subagents: Get full 200k tokens of fresh context per spawn.
  • Context budget: Plan how much context each wave of execution will consume.

This skill provides:

  • Context window usage estimation for the current session
  • Warning injection at configurable thresholds (70%, 85%, 95%)
  • Orchestrator budget enforcement
  • Subagent context allocation recommendations
  • Context-aware summarization triggers
  • Stale context detection and pruning suggestions
  • Wave-level context budget planning

Capabilities

1. Context Usage Estimation

Estimate current context window usage based on conversation history size:

Tokens used:     ~45,000 / 200,000
Usage:           22.5%
Status:          HEALTHY
Next threshold:  70% (warning) at ~140,000 tokens

Estimation methods:

  • Character count / 4 (rough approximation)
  • Tool output tracking (each tool call adds to context)
  • File read accumulation tracking
2. Threshold Warnings

Inject warnings at configurable thresholds:

[CONTEXT 70%] Warning: Context window at 70%. Consider summarizing completed work.
[CONTEXT 85%] Critical: Context window at 85%. Spawn new subagent for remaining work.
[CONTEXT 95%] Emergency: Context window at 95%. Wrap up immediately. Write state and exit.

Actions per threshold:

  • 70%: Suggest summarizing completed work, pruning stale context
  • 85%: Strongly recommend spawning new subagent with fresh context
  • 95%: Emergency wrap-up: write STATE.md, commit, create continue-here.md
3. Orchestrator Budget Enforcement

Monitor orchestrator-specific budget:

Target orchestrator usage: 15-30%
Current orchestrator usage: 18%
Remaining budget: 12% (~24,000 tokens)

Budget allocation:
- Phase context loading: 5% (PROJECT, ROADMAP, STATE)
- Agent spawn overhead: 3% per agent
- Result processing: 2% per agent result
- State updates: 1%
4. Subagent Context Allocation

Recommend context allocation for subagent spawns:

Agent: gsd-executor
Available context: 200,000 tokens (fresh)
Recommended loading:
- Plan file: ~2,000 tokens
- Relevant source files: ~15,000 tokens
- Project context: ~3,000 tokens
- Remaining for execution: ~180,000 tokens
5. Context-Aware Summarization

Trigger summarization when context is filling:

Summarization triggers:
- Tool output > 10,000 characters: summarize before continuing
- File read > 5,000 lines: extract relevant sections only
- Agent result > 20,000 characters: summarize key outcomes

Summarization strategies:

  • Completed work: Replace detailed execution logs with summary
  • File contents: Replace full file reads with relevant excerpts
  • Agent results: Extract key outcomes, discard detailed reasoning
6. Stale Context Detection

Identify context that is no longer relevant:

Stale context candidates:
- File contents read 10+ interactions ago
- Agent results from completed (not current) phases
- Tool outputs that were informational only
- Research documents already synthesized into plans
7. Wave-Level Budget Planning

Plan context budget across execution waves:

Wave 1 (3 parallel agents):
  Spawn cost: 3 * 3% = 9%
  Result processing: 3 * 2% = 6%
  Wave total: 15%

Wave 2 (2 parallel agents):
  Spawn cost: 2 * 3% = 6%
  Result processing: 2 * 2% = 4%
  Wave total: 10%

Total orchestrator budget needed: 25%
Target: 30% -> Sufficient with 5% margin

Tool Use Instructions

Checking Context Usage
  1. Use Bash to estimate current session token count if available
  2. Track cumulative tool output sizes during the session
  3. Calculate percentage against 200,000 token window
  4. Return usage report with threshold proximity
Injecting Warnings
  1. Compare current usage against configured thresholds
  2. If threshold exceeded, format appropriate warning message
  3. Include recommended action based on threshold level
  4. For 95%: include emergency state-save instructions
Planning Wave Budgets
  1. Use Read to load plan files for the phase
  2. Count agents needed per wave
  3. Estimate per-agent spawn and result cost
  4. Sum wave costs and compare to orchestrator budget target
  5. Recommend wave splitting if budget exceeded
Show full SKILL.md (206 more words)Show less

Process Integration

  • execute-phase.js - Monitor context during multi-wave execution, trigger summarization between waves
  • iterative-convergence.js - Track context across convergence iterations, spawn fresh agents when context fills
  • new-project.js - Budget context for parallel research agents (4 spawns + synthesis)

Output Format

json
{
  "operation": "check|warn|plan|summarize",
  "status": "healthy|warning|critical|emergency",
  "usage": {
    "estimatedTokens": 45000,
    "maxTokens": 200000,
    "percentage": 22.5,
    "nextThreshold": 70
  },
  "recommendation": "Continue normally|Summarize completed work|Spawn new agent|Emergency wrap-up",
  "waveBudget": {
    "totalWaves": 2,
    "estimatedOrchestratorUsage": 25,
    "withinBudget": true
  }
}

Configuration

SettingDefaultDescription
contextWarningThreshold70Warning threshold percentage
contextCriticalThreshold85Critical threshold percentage
contextEmergencyThreshold95Emergency threshold percentage
orchestratorBudgetTarget30Target max orchestrator context %
agentSpawnCost3Estimated % per agent spawn overhead
agentResultCost2Estimated % per agent result processing
autoSummarizetrueAuto-trigger summarization at thresholds

Error Handling

ErrorCauseResolution
Token estimation inaccurateApproximation driftUse conservative estimates (overestimate usage)
Budget exceeded mid-waveUnderestimated agent costsDefer remaining agents to next session with continue-here.md
Emergency threshold hitOrchestrator doing too much work inlineImmediately write state, commit, create handoff document
Stale context false positiveContext still neededMaintain a "pinned context" list that is never pruned

Constraints

  • Token estimates are approximations (character/4 heuristic); always err on the side of caution
  • Never discard context that has not been persisted to disk (STATE.md, summaries, etc.)
  • Orchestrator should never exceed 30% context usage
  • Emergency wrap-up at 95% is non-negotiable; quality degrades severely above this
  • Wave budget planning must account for worst-case agent result sizes
  • Context monitoring is advisory; it cannot forcibly stop execution

© a5c-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in library/methodologies/gsd/skills/context-engineering of a5c-ai/babysitter.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit feb68ab

Compare with similar skills

Context Engineering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context Engineering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context Engineering this skilla5c-ai/babysitter1.8k—~1.8kAutomated safety check: NotesMIT
Claude Statusbarleeguooooo/claude-code-usage-bar377—~2.5kAutomated safety check: PassMIT
Badstephenleo/bmad-autonomous-development107—~7.7kAutomated safety check: PassMIT
Analyze Trajectoryyologdev/yoyo-evolve1.9k—~3.6kAutomated safety check: PassMIT
Code Context Slicingtrailofbits/skills7.4k—~2.1kAutomated safety check: PassCC-BY-SA-4.0
MoAI Foundation Coremodu-ai/moai-adk1.2k—~5kAutomated safety check: PassApache-2.0

Similar skills

  • Claude Statusbar

    leeguooooo/claude-code-usage-bar

    Manage cs (claude-statusbar) — switch theme/style/density, override severity colors, preview combinations, run doctor, reset config, install, upgrade (cs upgrade — the only supported upgrade path)…

    377 GitHub stars~2.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Bad

    stephenleo/bmad-autonomous-development

    BMad Autonomous Development — orchestrates parallel story implementation pipelines.

    107 GitHub stars~7.7k tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed
  • Analyze Trajectory

    yologdev/yoyo-evolve

    Diagnoses a recurring failure such as a stuck task, repeated CI error or frequent reverts by sending sub-agents through the logs and returning one root-cause diagnosis.

    1.9k GitHub stars~3.6k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Code Context Slicing

    trailofbits/skills

    Official

    Picks a small, graph-based slice of source with Trailmark and hands a focused code task to a smaller or local model without exposing the whole repository.

    7.4k GitHub stars~2.1k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed
  • MoAI Foundation Core

    modu-ai/moai-adk

    Reference for MoAI-ADK's core development principles: TRUST 5 quality gates, SPEC-first domain-driven workflow, agent delegation and token budgeting.

    1.2k GitHub stars~5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Cc Dev Agent

    sangrokjung/claude-forge

    A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.

    849 GitHub stars~771 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from a5c-ai/babysitter

All 14 skills in this repo
  • Creates and edits AWS architecture diagrams as DrawIO XML, converting a text description or an image and reading existing files back into shapes.

    1.8k GitHub stars~4.2k tokensUpdated 20 days ago
    Auto-check passed
  • Creates DrawIO XML diagrams of Google Cloud architectures from text or images, and analyzes existing .drawio files to list their GCP components.

    1.8k GitHub stars~3.7k tokensUpdated 20 days ago
    Auto-check passed
  • Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter…

    1.8k GitHub starsUsed in 1 repo~514 tokens
    Auto-check passed
  • Babysitter Process Runner

    a5c-ai/babysitter

    Execute via @babysitter. Use this skill when asked to babysit a task, do anything that is structured process-driven (even a loop) or whenever it is called…

    1.8k GitHub starsUsed in 1 repo~726 tokens
    Auto-check: notes
  • This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns"…

    1.8k GitHub stars~8.5k tokensUpdated 20 days ago
    Auto-check passed
  • Babysit Babysitter Issues

    a5c-ai/babysitter

    This skill should be used when the user asks to "babysit issues", "work on assigned issues", "check a5c-agent issues", "process babysitter issues", or wants to find and work on open GitHub issues…

    1.8k GitHub stars~590 tokensUpdated 20 days ago
    Auto-check passed

Categories

Questions about Context Engineering

What does Context Engineering do?

Context window monitoring and budget management. An agent skill from a5c-ai/babysitter. Context Engineering is an agent skill from a5c-ai/babysitter. Context window monitoring and budget management.

When should I use Context Engineering?

Context Engineering fits situations like: tasks that involve Context engineering; tasks that involve Summarization; tasks that involve Budgeting and forecasting.

How do I install Context Engineering in Claude Code?

Run `npx skills add a5c-ai/babysitter --skill context-engineering -a claude-code`. Or copy the skill folder (library/methodologies/gsd/skills/context-engineering in a5c-ai/babysitter) into .claude/skills/context-engineering in your project. Claude Code loads it when a task matches its description.

How do I install Context Engineering in Codex?

Run `npx skills add a5c-ai/babysitter --skill context-engineering -a codex`. Or copy the skill folder (library/methodologies/gsd/skills/context-engineering in a5c-ai/babysitter) into .agents/skills/context-engineering in your project. Codex loads it when a task matches its description.

Can I use Context Engineering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add a5c-ai/babysitter --skill context-engineering -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-engineering, .gemini/skills/context-engineering, .github/skills/context-engineering and .opencode/skills/context-engineering in your project.

What does Context Engineering need to run?

SKILL.md names no scripts, command-line tools or credentials: Context Engineering is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Bash(*).

Does Context Engineering access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Context Engineering safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Context Engineering use?

Context Engineering is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Context Engineering use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Context Engineering?

Skills that share tags, products or a category with Context Engineering: Claude Statusbar (leeguooooo/claude-code-usage-bar, 377 stars), Bad (stephenleo/bmad-autonomous-development, 107 stars), Analyze Trajectory (yologdev/yoyo-evolve, 1.9k stars) and Code Context Slicing (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context Engineering?

a5c-ai (a GitHub organization) maintains it in a5c-ai/babysitter, which has 1,833 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on September 16, 2026.

Source: a5c-ai/babysitter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.