一键导入
context
Audit auto-loaded context budget, detect redundancy, and recommend optimizations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit auto-loaded context budget, detect redundancy, and recommend optimizations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Write a structured handoff at session end. Preserves context so the next agent can resume without human briefing. Invoke before ending any feature session longer than 30 minutes.
Multi-perspective code review against project standards with P1/P2/P3 severity classification. Works in Claude Code (Agent + optional GitHub MCP) and Cursor (Task subagents + gh/git). Use when the user invokes /review, asks for a PR or diff review, or wants a standards-aligned review with severity tags.
Multi-perspective code review (P1/P2/P3) for Cursor: inline checklists plus three parallel Task subagents (perf-auditor, security-reviewer, simplicity-reviewer with combined data-integrity prompt). Use when the user invokes /review, asks for a PR review, or wants repo-standard findings with severity.
Create well-formatted git commits following conventional commit standards.
Red→green→refactor discipline for new behavior — forces a failing test before implementation and a passing test before any claim of done.
Create or manage a git worktree for isolated parallel development — lets multiple agents work in the repo simultaneously without branch collisions.
基于 SOC 职业分类
| name | context |
| description | Audit auto-loaded context budget, detect redundancy, and recommend optimizations. |
Audit auto-loaded context budget, detect redundancy, and recommend optimizations.
/context [action] [--verbose]
action: audit, redundancy, recommendations, compare (default: audit)--verbose: Show per-line token estimates for each fileWhen this skill is invoked:
Autonomy:
Token Estimation:
/context audit)Measure all auto-loaded files and report token usage:
CLAUDE.md — count characters, estimate tokens.claude/rules/*.md — read each file, estimate tokensrules/ that point to rules-available/Report format:
Context Budget Report
=====================
Auto-loaded files:
CLAUDE.md 1,265 tokens
rules/ai-agent-patterns.md 1,212 tokens
rules/code-quality.md 842 tokens
rules/error-handling.md 534 tokens
rules/git-workflow.md 687 tokens
rules/quality-checks.md 612 tokens
rules/security-core.md 1,705 tokens
rules/task-management.md 786 tokens
─────────────────────────────────────────────
Total: 7,643 tokens (3.8% of 200K)
Platform rules (enabled):
(none active)
Available platform rules (not enabled):
rules-available/android.md ~XXX tokens
rules-available/docker.md ~XXX tokens
rules-available/ios.md ~XXX tokens
rules-available/nextjs.md ~XXX tokens
rules-available/python.md ~XXX tokens
rules-available/security-mobile.md ~XXX tokens
rules-available/security-owasp.md ~XXX tokens
rules-available/security-web.md ~XXX tokens
/context redundancy)Cross-reference auto-loaded files for duplicated content:
{placeholder} references from each auto-loaded fileReport format:
Redundancy Findings
===================
Shared placeholders (appear in 2+ auto-loaded files):
{lint_fix} → CLAUDE.md:48, quality-checks.md:45
{type_check} → CLAUDE.md:49, quality-checks.md:39
{test_with_coverage} → CLAUDE.md:50, quality-checks.md:47
Duplicate guidance:
- CLAUDE.md "Context Recovery" section overlaps with /resume skill
(low priority — CLAUDE.md version is a brief pointer)
Summary: 3 shared placeholders, 0 high-priority duplicates
/context recommendations)Produce prioritized optimization suggestions:
Report format:
Context Optimization Recommendations
=====================================
P1 - High Impact:
- security-core.md (1,705 tokens): Consider moving detailed tables
and checklists to .claude/references/security-checklist.md.
Auto-loaded portion could be a ~400 token summary with
"see references/security-checklist.md for details".
Estimated savings: ~1,200 tokens
P2 - Medium Impact:
- {lint_fix} placeholder appears in 2 auto-loaded files.
CLAUDE.md Commands section duplicates quality-checks.md.
Consider removing command block from one location.
Estimated savings: ~150 tokens
P3 - Low Impact:
- quality-checks.md checklist section could move to references.
Estimated savings: ~80 tokens
Total potential savings: ~1,430 tokens (18.7% of current budget)
/context compare)Show the budget impact of enabling/disabling platform rules:
rules-available/ — estimate tokens for eachrules/)Report format:
Platform Rule Budget Comparison
===============================
Current baseline: 7,643 tokens (3.8% of 200K)
If enabled:
+ python.md +892 tokens → 8,535 (4.3%)
+ security-owasp.md +1,105 tokens → 8,748 (4.4%)
+ nextjs.md +1,340 tokens → 8,983 (4.5%)
+ docker.md +654 tokens → 8,297 (4.1%)
+ ios.md +780 tokens → 8,423 (4.2%)
+ android.md +720 tokens → 8,363 (4.2%)
+ security-web.md +940 tokens → 8,583 (4.3%)
+ security-mobile.md +830 tokens → 8,473 (4.2%)
Common combinations:
make enable-web (nextjs + security-web + security-owasp)
+3,385 tokens → 11,028 (5.5%)
make enable-python (python + security-owasp)
+1,997 tokens → 9,640 (4.8%)
make enable-mobile (security-mobile + security-web + security-owasp)
+2,875 tokens → 10,518 (5.3%)
content.length charactersMath.round(charCount / 4) — acceptable approximationls -la .claude/rules/ via Bash to identify symlinks pointing to rules-available/These mappings come from the Makefile enable-* targets:
| Target | Rules Enabled |
|---|---|
make enable-web | nextjs, security-web, security-owasp |
make enable-python | python, security-owasp |
make enable-api | security-owasp |
make enable-ios | ios, security-owasp |
make enable-android | android, security-owasp |
make enable-mobile | security-mobile, security-web, security-owasp |
make enable-docker | docker, security-owasp |
$ /context
Context Budget Report
=====================
Auto-loaded files:
CLAUDE.md 1,265 tokens
rules/ai-agent-patterns.md 1,212 tokens
rules/code-quality.md 842 tokens
rules/error-handling.md 534 tokens
rules/git-workflow.md 687 tokens
rules/quality-checks.md 612 tokens
rules/security-core.md 1,705 tokens
rules/task-management.md 786 tokens
─────────────────────────────────────────────
Total: 7,643 tokens (3.8% of 200K)
Platform rules (enabled):
(none active)
Redundancy findings:
3 shared placeholders across auto-loaded files
0 high-priority content duplicates
Top recommendation:
P1: Move security-core.md details to references (~1,200 token savings)
Run '/context recommendations' for full optimization plan.
Run '/context compare' to see platform rule budget impact.