Skip to content
Back to skills

Context Engineering

ASecurity

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

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 29, 2026
ai-agentstypescriptpythongojavabashdockergitci/cdsecurity

Works with

  • claude code

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add a5c-ai/babysitter --skill context-engineering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Engineering?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Engineering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-context-engineering/badge)](https://www.skillsdirectory.com/skills/a5c-ai-context-engineering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-engineering
description: Dynamic context injection, mode switching (dev/review/research), selective loading, and strategic compaction for token optimization.
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
---

# 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

Files in this skill

  • README.md230 B
  • SKILL.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.