Agent skill

context-engineering

Dynamic context injection, mode switching (dev/review/research), selective loading, and strategic compaction for token optimization.

Stars 514
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/a5c-ai/babysitter/tree/main/library/methodologies/everything-claude-code/skills/context-engineering

SKILL.md

Context Engineering

Overview

Context management methodology adapted from the Everything Claude Code project. Optimizes context window usage through dynamic injection, mode switching, selective loading, and strategic compaction.

Context Modes

Dev Mode

  • Load: architecture docs, active code files, test files, recent changes
  • Skip: historical discussions, completed milestones, research notes
  • Priority: implementation speed

Review Mode

  • Load: code diff, coding standards, security rules, test coverage
  • Skip: architecture docs, planning notes, research
  • Priority: thoroughness and accuracy

Research Mode

  • Load: requirements, existing patterns, external research, alternatives
  • Skip: implementation details, test files, CI configs
  • Priority: breadth of information

Dynamic Injection

  • Detect project context automatically (language, framework, tools)
  • Load relevant skills based on detected context
  • Inject domain-specific patterns and conventions
  • Adjust tool allowlists per context mode

Selective Loading

  • Load only files relevant to the current task
  • Use glob patterns to scope file reading
  • Prioritize recently modified files
  • Skip binary files and generated code

Strategic Compaction

  • Monitor context token usage
  • Suggest compression for resolved/completed items
  • Archive to memory files (activeContext, patterns, progress)
  • Pre-compaction state preservation
  • Automated compaction triggers at token thresholds

Cross-Platform Detection

  • Package manager: npm (package-lock.json), pnpm (pnpm-lock.yaml), yarn (yarn.lock), bun (bun.lockb)
  • Language: TypeScript (tsconfig.json), Go (go.mod), Python (pyproject.toml), Java (pom.xml)
  • Test runner: vitest, jest, pytest, go test
  • CI/CD: GitHub Actions, Dockerfile, docker-compose

When to Use

  • Session initialization (detect context)
  • Before each phase (inject relevant context)
  • Token budget warnings (strategic compaction)
  • Mode transitions (dev to review to research)

Agents Used

  • Used by all agents indirectly through context detection
  • context-engineering agent for explicit compaction analysis

Expand your agent's capabilities with these related and highly-rated skills.

a5c-ai/babysitter

gsd-tools

Central utility skill for GSD operations. Provides config parsing, slug generation, timestamps, path operations, and orchestrates calls to other specialized skills. Acts as the unified entry point that the original gsd-tools.cjs provided via its lib/ modules (commands, config, core, init).

514 31
Explore
a5c-ai/babysitter

model-profile-resolution

Resolve model profile (quality/balanced/budget) at orchestration start and map agents to specific models. Enables cost/quality tradeoffs by selecting appropriate AI models for each agent role.

514 31
Explore
a5c-ai/babysitter

verification-suite

Plan structure validation, phase completeness checks, reference integrity verification, and artifact existence confirmation. Provides the structured verification layer ensuring GSD artifacts are well-formed and complete.

514 31
Explore
a5c-ai/babysitter

state-management

STATE.md reading, writing, and field-level updates. Provides cross-session state persistence via .planning/STATE.md with structured fields for current task, completed phases, blockers, decisions, and quick tasks.

514 31
Explore
a5c-ai/babysitter

git-integration

Git commit patterns, formats, and conventions for GSD methodology. Provides atomic commits per task, structured commit messages, planning file commits, branch management, and milestone tag operations.

514 31
Explore
a5c-ai/babysitter

frontmatter-parsing

YAML frontmatter parsing and manipulation for .planning/ documents. Provides read, write, update, query, and validation operations on frontmatter blocks in GSD markdown artifacts.

514 31
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results