跳到正文
cccskills
免费在 GitHub 公开

ck:context-engineering

Check context usage limits, monitor time remaining, optimize token consumption, debug context failures. Use when asking about context percentage, rate limits, usage warnings, context optimization, agent architectures, memory systems.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(14)

  • SKILL.md4.5 KB
  • references/context-compression.md2.3 KB
  • references/context-degradation.md3.0 KB
  • references/context-fundamentals.md2.7 KB
  • references/context-optimization.md2.3 KB
  • references/evaluation.md2.2 KB
  • references/memory-systems.md2.5 KB
  • references/multi-agent-patterns.md2.3 KB
  • references/project-development.md2.1 KB
  • references/runtime-awareness.md4.8 KB
  • references/tool-design.md2.0 KB
  • scripts/compression_evaluator.py11.5 KB
  • scripts/context_analyzer.py10.9 KB
  • scripts/tests/test_edge_cases.py9.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Context Engineering

Context engineering curates the smallest high-signal token set for LLM tasks. The goal: maximize reasoning quality while minimizing token usage.

When to Activate

  • Designing/debugging agent systems
  • Context limits constrain performance
  • Optimizing cost/latency
  • Building multi-agent coordination
  • Implementing memory systems
  • Evaluating agent performance
  • Developing LLM-powered pipelines

Core Principles

  1. Context quality > quantity - High-signal tokens beat exhaustive content
  2. Attention is finite - U-shaped curve favors beginning/end positions
  3. Progressive disclosure - Load information just-in-time
  4. Isolation prevents degradation - Partition work across sub-agents
  5. Measure before optimizing - Know your baseline

IMPORTANT:

  • Sacrifice grammar for the sake of concision.
  • Ensure token efficiency while maintaining high quality.
  • Pass these rules to subagents.

Quick Reference

TopicWhen to UseReference
FundamentalsUnderstanding context anatomy, attention mechanicscontext-fundamentals.md
DegradationDebugging failures, lost-in-middle, poisoningcontext-degradation.md
OptimizationCompaction, masking, caching, partitioningcontext-optimization.md
CompressionLong sessions, summarization strategiescontext-compression.md
MemoryCross-session persistence, knowledge graphsmemory-systems.md
Multi-AgentCoordination patterns, context isolationmulti-agent-patterns.md
EvaluationTesting agents, LLM-as-Judge, metricsevaluation.md
Tool DesignTool consolidation, description engineeringtool-design.md
PipelinesProject development, batch processingproject-development.md
Runtime AwarenessUsage limits, context window monitoringruntime-awareness.md

Key Metrics

  • Token utilization: Warning at 70%, trigger optimization at 80%
  • Token variance: Explains 80% of agent performance variance
  • Multi-agent cost: ~15x single agent baseline
  • Compaction target: 50-70% reduction, <5% quality loss
  • Cache hit target: 70%+ for stable workloads

Four-Bucket Strategy

  1. Write: Save context externally (scratchpads, files)
  2. Select: Pull only relevant context (retrieval, filtering)
  3. Compress: Reduce tokens while preserving info (summarization)
  4. Isolate: Split across sub-agents (partitioning)

Anti-Patterns

  • Exhaustive context over curated context
  • Critical info in middle positions
  • No compaction triggers before limits
  • Single agent for parallelizable tasks
  • Tools without clear descriptions

Guidelines

  1. Place critical info at beginning/end of context
  2. Implement compaction at 70-80% utilization
  3. Use sub-agents for context isolation, not role-play
  4. Design tools with 4-question framework (what, when, inputs, returns)
  5. Optimize for tokens-per-task, not tokens-per-request
  6. Validate with probe-based evaluation
  7. Monitor KV-cache hit rates in production
  8. Start minimal, add complexity only when proven necessary

Runtime Awareness

The system automatically injects usage awareness via PostToolUse hook:

<usage-awareness>
Codex Usage Limits: 5h=45%, 7d=32%
Context Window Usage: 67%
</usage-awareness>

Thresholds:

  • 70%: WARNING - consider optimization/compaction
  • 90%: CRITICAL - immediate action needed

Data Sources:

  • Usage limits: OpenAI OAuth API (https://api.openai.com/api/oauth/usage)
  • Context window: Statusline temp file (/tmp/ck-context-{session_id}.json)

Scripts

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

AI-optimized browser automation CLI with context-efficient snapshots. Use for long autonomous sessions, self-verifying workflows, video recording, and cloud browser testing (Browserbase).

中文简介正在准备中。当前显示原文说明。

manhvann/codexkit892026年8月29日 更新

Generate images via Nano Banana with 129 curated prompts. Mandatory validation interview refines style/mood/colors (use --skip to bypass). 3 modes: search, creative, wild. Styles: Ukiyo-e, Bento grid, cyberpunk, cinematic, vintage patent.

中文简介正在准备中。当前显示原文说明。

manhvann/codexkit892026年8月29日 更新

Analyze images/audio/video with Gemini API (better vision than Codex). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

中文简介正在准备中。当前显示原文说明。

manhvann/codexkit892026年8月29日 更新

ck:ask

免费

Answer technical and architectural questions with expert consultation.

中文简介正在准备中。当前显示原文说明。

manhvann/codexkit892026年8月29日 更新

Build backends with Node.js, Python, Go (NestJS, FastAPI, Django). Use for REST/GraphQL/gRPC APIs, auth (OAuth, JWT), databases, microservices, security (OWASP), Docker/K8s.

中文简介正在准备中。当前显示原文说明。

manhvann/codexkit892026年8月29日 更新

Add authentication with Better Auth (TypeScript). Use for email/password, OAuth providers (Google, GitHub), 2FA/MFA, passkeys/WebAuthn, sessions, RBAC, rate limiting.

中文简介正在准备中。当前显示原文说明。

manhvann/codexkit892026年8月29日 更新

查看 manhvann 的全部技能

报告此技能的问题