跳到主要内容
知仓学习社ZHICANG

context-engineering

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

不碰外部(只输出文字)无严重或高危命中a5c-ai/babysitter

它会碰到什么

扫了多少2 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

  • 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

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 1,796
本站分层T1
该仓技能数2115
原文件路径library/methodologies/everything-claude-code/skills/context-engineering/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 2115 个技能

同名技能的其他版本

有 2 个不同仓库或目录里都有叫 context-engineering 的技能。它们内容并不相同,别混用:

  • a5c-ai/babysitter — Context window monitoring and budget management. Keeps orchestrator at 15-30% context usag