Token导航 LogoToken导航

Agent Skill · 研究检索

universal-context-auditor(通用上下文审计员)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

universal-context-auditor 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 66,030。

总安装 269周安装 11GitHub Stars 2下载 87核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:universal-context-auditor(通用上下文审计员)
来源仓库:https://github.com/artblue/ai-toolkit
仓库路径:skills/universal-context-auditor
安装命令:
npx skills add https://github.com/artblue/ai-toolkit --skill universal-context-auditor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/artblue/ai-toolkit --skill universal-context-auditor

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

universal-context-auditor 用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查,适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。适用于系统安全审计、权限管理和风险控制等场景。

通过 GitHub 仓库安装,使用 npx skills add 命令添加指定技能。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/universal-context-auditor

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/artblue/ai-toolkit --skill universal-context-a…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

universal-context-auditor 怎么安装?

在终端执行 npx skills add https://github.com/artblue/ai-toolkit --skill universal-context-auditor。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

universal-context-auditor 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

universal-context-auditor 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

universal-context-auditor 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

universal-context-auditor 用的人多吗?

公开数据是累计安装 269 次,近一周安装 11 次,下载 87 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

universal-context-auditor 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
universal-context-auditor

通用上下文审计员 · 本页

2692调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Universal Context Auditor

The "Context Auditor" - evaluates AI configuration files against research-backed principles to maximize task success rate while minimizing cost and attention decay.

What This Does

Audits your existing AI configuration files (CLAUDE.md,.cursorrules, instructions.md, etc.) and provides:

  • Structural analysis against LLM research (Stanford, UC Berkeley, Anthropic)
  • Fidelity scoring - Will the AI reliably follow your rules?
  • Cache efficiency - Is your config optimized for prompt caching?
  • Attention architecture - Are critical rules in the right cognitive zones?
  • Actionable refactoring - Concrete improvements using YOUR existing examples

Prerequisites

You need: An existing AI configuration file with your project-specific conventions already documented.

You don't need: Tech stack detection, framework templates, or setup wizards.

This skill audits structure and cognitive architecture, not content specifics. It works with any tech stack because the underlying principles are universal.

Core Principle

Prioritize fidelity over aesthetics. A verbose, redundant config that is 90% cached and 100% accurate is superior to a "clean" compressed config. The goal is not minimal tokens—it's maximal task success rate.

The Audit Criteria

When auditing a file, evaluate against these four priorities:

1. Fidelity Score (Priority 1)

Will the AI reliably follow these rules?

  • ✅ Critical constraints in primacy zone - First 2,000 tokens exploit the Primacy Effect (Liu et al., 2024 - "Lost in the Middle")
  • ✅ XML encapsulation for Claude - Wrapping rules in <architecture_rules>, <correctness_guards> creates structural boundaries preventing context bleeding (Anthropic-optimized)
  • ✅ Correctness Guards present - Version-specific syntax examples prevent hallucination to training data
  • ❌ Avoid indirection layers - External references land in weak attention zone (middle of context)
  • ❌ No vague commands - "Be thorough" triggers infinite tool loops (Thoroughness Anti-Pattern)

2. Cache Efficiency (Priority 2)

Will this stay static and cacheable?

  • ✅ Layer 1 (Anchor) is stable - System prompt content should be prefix-anchored and rarely change
  • ✅ Under 2,000 tokens for cache activation - This is the threshold for Anthropic's prompt caching, not a compression target
  • ❌ Frequent churn invalidates cache - Don't put session-specific or rapidly-changing data in config files
  • ❌ Dynamic references break caching - Importing frequently-updated files kills cache benefits

3. Attention Architecture (Priority 3)

Where do instructions land in the context hierarchy?

The Stratified Stack:

  • Layer 1 (Anchor / System Prompt): Identity, safety rails, core project standards → CLAUDE.md (primacy zone)
  • Layer 2 (Skills): Specialized procedures invoked occasionally (e.g., "Security Audit", release workflow) →.claude/skills/ (dynamic injection)
  • Layer 3 (MCP Tools): Live data connections (Jira, GitHub) → Tool outputs (filtered/distilled)
  • Layer 4 (Use-Time Prompts): Ad-hoc session-specific instructions → User messages (recency bias)

Critical Rule: Frequently-referenced material (used >50% of sessions) should stay in Layer 1, NOT be extracted to Layer 2.

4. Task Success Rate (Priority 4)

Does this reduce errors and improve output quality?

  • ✅ Redundancy improves comprehension - "Write Everything Twice" (WET) is optimal for LLMs
  • ✅ Having same rule in 3 files > AI missing it once
  • ✅ Verbose examples prevent version confusion - Don't assume AI will browse URLs to verify syntax
  • ❌ DRY is wrong for LLMs - Human code principles don't apply to probabilistic inference engines

Refactoring Recommendations

The auditor suggests improvements based on these research-backed patterns:

1. XML Encapsulation (Claude-specific)

Wrap non-negotiable rules in XML tags for structural enforcement:

<architecture_rules>
Core architectural constraints that must never be violated
</architecture_rules>

<correctness_guards>
Version-specific syntax examples (YOUR frameworks, YOUR versions)
</correctness_guards>

<agent_constraints>
Workflow boundaries: what the AI must never do and must always do before marking work complete
</agent_constraints>

Note: GPT and Gemini prefer Markdown hierarchy. Only use XML for Claude. Don't mix formats.

2. Topological Prefix-Anchoring

Structure for the Primacy Effect:

[TOP - First 2,000 tokens]
- Identity & agent constraints
- Architecture rules (non-negotiable)
- Correctness Guards (version-specific syntax)

[MIDDLE]
- Component patterns (reference to existing examples, not full documentation)
- Non-discoverable conventions only (syntax, APIs, framework differences)
- Testing requirements (what's mandatory, not how to structure)

[BOTTOM]
- Repository metadata
- PR checklist
- Skills/commands references

3. Don't Extract for Aesthetics

Test before extracting to skills:

  • ❌ DON'T extract: Frequently-referenced material (npm commands used every session)
  • ✅ DO extract: Specialized procedures invoked occasionally (release workflow, security audit)
  • Test: "Will this be read on 50%+ of turns?" → Keep inline

Why: Indirection layers break caching, land instructions in weak attention zone, and cause "instruction fatigue."

4. Correctness Guards Over Links

Use "Golden Snippets" for version-specific syntax. The auditor will identify YOUR existing examples and suggest structural improvements:

Example transformation:

<!-- Before: Buried in middle of file -->
We use React 19, so don't use forwardRef anymore.

<!-- After: Suggested placement -->
<correctness_guards>
**Version-Specific Syntax (Prevents Training Data Hallucination):**
- **React 19:** Use native `ref` prop NOT `React.forwardRef` wrapper
- **TypeScript 5.5:** Use `satisfies` operator for type narrowing NOT type assertions
</correctness_guards>

The auditor uses your frameworks and your examples - it just suggests better placement and emphasis.

5. Prioritize Fidelity Over DRY

Key principles:

  • Verbose, redundant configs are GOOD if fully cached
  • "Write Everything Twice" (WET) prevents attention decay
  • A well-cached 2,000-token config > a compressed 800-token "clean" config
  • If clean code habits make AI dumber, they're technical debt

6. Discovery-First Architecture

LLMs have powerful file exploration tools (Glob, Grep, Read). Optimize for signal-to-noise:

Discoverable vs Non-Discoverable Material:

  • ❌ DON'T include: File structures, directory layouts, naming patterns visible via file exploration
  • ✅ DO include: Non-obvious conventions, version-specific syntax, framework API differences
  • Test: "Could an AI discover this with Read/Glob/Grep in 1-2 files?" → If yes, replace with reference to example
  • Exception: Brief pointers to example locations are good ("See src/components/Button.tsx for patterns")

Pattern Documentation Strategy:

  • Point, don't duplicate - "Reference existing patterns at X" not ASCII file trees
  • Signal over noise - Every token should prevent an error or clarify non-obvious behavior
  • Examples over documentation - "See how Button component handles this" > full explanation

Test questions:

  1. Is this pattern visible in file structure? → Reference the file, don't duplicate
  2. Is this non-obvious or version-specific? → Include explicitly
  3. Could AI infer this from 1-2 examples? → Point to examples
  4. Does this prevent training data hallucination? → Include with emphasis

Audit Modes

Single-File Mode (Default)

Audit the root /CLAUDE.md file only.

Repo-Wide Mode

Audit all CLAUDE.md files in the repository (root + nested in subfolders). Use this when:

  • User requests "audit all CLAUDE.md files"
  • User mentions "nested" or "subfolder" CLAUDE.md files
  • User asks about combined token budget

Combined Token Budget: All CLAUDE.md files together must stay under 2,000 tokens for optimal caching.

Expected Workflow

Single-File Mode

1. Read the Target File

Use Read tool to examine the current CLAUDE.md or config file.

2. Calculate Metrics

Provide:

  • Token count (estimate: ~4 chars per token for English)
  • Fidelity Score (1-100): Will AI reliably follow rules?
  • Cache Efficiency (1-100): Is it static and under 2,000 tokens?
  • Attention Architecture (1-100): Are critical rules in primacy zone?
  • Task Success Projection (1-100): Will this reduce errors?
  • Overall Score (average of above)

Repo-Wide Mode

1. Discover All CLAUDE.md Files

Use Glob to find all CLAUDE.md files:

**/CLAUDE\.md
2. Read All Files

Use Read tool for each discovered file.

3. Calculate Aggregate Metrics

Provide:

  • Per-file token counts (estimate)
  • Combined total tokens (all files)
  • Budget status: ✅ Under 2,000 tokens OR ⚠️ Exceeds threshold
  • Hierarchy check: Do nested files extend or contradict root?
  • Redundancy check: Flag excessive duplication (not beneficial WET)
  • Individual scores for each file
  • Aggregate recommendations

Identify Issues — Single-File

Anti-Patterns to Flag:

  • Frequently-used material extracted to skills (breaks caching)
  • Critical rules buried mid-file (lost in the middle)
  • No XML encapsulation for Claude (context bleeding)
  • Missing Correctness Guards (version hallucination risk)
  • Vague commands like "be thorough" (tool loop trigger)
  • Over-compression sacrificing fidelity (Clean Code Tax)
  • File structure ASCII art (discoverable via exploration)
  • Documenting patterns instead of referencing examples
  • Including obvious information in comments (e.g., "# Exports + types")
  • Using generic examples not from the actual project tech stack

Good Patterns to Recognize:

  • Verbose, redundant critical rules (WET is good)
  • Static, prefix-anchored content <2,000 tokens
  • XML-wrapped guardrails for Claude
  • Version-specific syntax examples inline
  • Frequently-used reference material kept inline
  • "Reference existing patterns" guidance over full documentation
  • Critical API differences prominently labeled (CRITICAL, prevents hallucination)
  • Focus on non-discoverable, version-specific rules
  • Examples from the actual project tech stack
  • Token efficiency through discovery-first approach

Identify Issues — Repo-Wide (Additional)

Additional Anti-Patterns for Multi-File:

  • Combined budget exceeded: Total >2,000 tokens across all files
  • Contradictory rules: Child file overrides parent constraints
  • Wasteful duplication: Entire sections copy-pasted (not beneficial redundancy)
  • Hierarchy violations: Child files redefine core architecture/identity
  • Orphaned context: Nested file with no clear parent relationship

Good Patterns for Multi-File:

  • Root file (~1,200-1,500 tokens): Core rules, architecture, identity
  • Nested files (~100-300 tokens each): Package/domain-specific extensions
  • Clear hierarchy: Child extends parent, doesn't contradict
  • Targeted redundancy: Critical rules repeated where needed (WET)
  • Combined total <2,000 tokens: Maintains cache efficiency

Propose Refactored Version

Single-File Structure:

  1. Summary of changes with justification
  2. Before/After token counts
  3. Projected improvement in metrics
  4. Refactored content (if significant changes needed)

Repo-Wide Structure:

  1. Executive Summary: Combined token budget status
  2. Per-File Analysis: Token counts, scores, issues
  3. Hierarchy Report: Parent-child relationships, conflicts
  4. Redundancy Map: Beneficial vs wasteful duplication
  5. Recommendations: Which files to trim, what to consolidate
  6. Projected Outcomes: Before/After total tokens, cache efficiency

Critical: Don't optimize for "looks clean to humans" - optimize for "AI follows rules and stays cached."

Token Budget Strategy (Repo-Wide):

  • Root CLAUDE.md: ~1,200-1,500 tokens (core rules, architecture, identity)
  • Package-level nested files: ~100-300 tokens each (domain-specific extensions)
  • Combined total: <2,000 tokens for cache activation
  • Headroom target: 30-40% under threshold for future growth

Final Checklist

Single-File Mode

Before finalizing recommendations:

  • Fidelity > Token count (verbose is OK if cached)
  • Critical rules in first 2,000 tokens (primacy zone)
  • XML encapsulation for Claude (structural boundaries)
  • Correctness Guards for version-specific syntax
  • No extraction of frequently-used reference material
  • Static content for cache efficiency
  • WET over DRY (redundancy is good for LLMs)

Repo-Wide Mode

Additional checks:

  • Combined token budget <2,000 tokens
  • No contradictory rules between parent/child files
  • Clear hierarchy (child extends, doesn't override)
  • Beneficial redundancy only (not wasteful duplication)
  • Nested files focused on domain-specific extensions
  • Root file contains core architecture/identity (~1,200-1,500 tokens)
  • Package files are lightweight supplements (~100-300 tokens each)

Research Foundation

This auditor is built on 25+ primary sources including:

LLM Cognitive Architecture:

  • Liu et al. (2024) - "Lost in the Middle: How Language Models Use Long Contexts"
  • Anthropic - Attention distribution in transformer models
  • UC Berkeley - Context window utilization patterns

Prompt Engineering:

  • Anthropic - Prompt caching optimization
  • Anthropic - XML tag effectiveness for Claude
  • OpenAI - GPT-4 system message best practices

Software Engineering for AI:

  • Microsoft Research - Code generation fidelity studies
  • Google DeepMind - Agent reliability patterns
  • Clean Code Tax principle (Khachatryan, 2025)

Customization (Optional)

While this skill works out of the box, teams can customize it for deeper domain knowledge:

1. Add Framework-Specific Anti-Patterns

Edit the skill to recognize your recurring issues:

**Additional Anti-Patterns for [Your Framework]:**
- [Specific pattern that causes issues in your codebase]
- [Common mistake with your tech stack]

2. Adjust Scoring Weights

If certain metrics matter more for your use case:

**Custom Scoring:**
- Fidelity Score: 40% (default: 25%)
- Cache Efficiency: 30% (default: 25%)
- Attention Architecture: 20% (default: 25%)
- Task Success Rate: 10% (default: 25%)

3. Add Tech-Stack Specific Checks

For specialized frameworks:

**[Your Framework] Specific Checks:**
- [ ] [Framework-specific requirement]
- [ ] [Version-specific validation]

Example Transformations

Before Audit

# My Project

We use React 19 and TypeScript 5.5.

## File Structure
- src/
  - components/
    - Button/
    - Input/
  - utils/
  - hooks/

## Rules
- Use modern React patterns
- Write good tests
- Don't use forwardRef anymore
- Be thorough with error handling

After Audit (Suggested)

<architecture_rules>
React 19 + TypeScript 5.5 component library
</architecture_rules>

<correctness_guards>
**Version-Specific Syntax (Prevents Training Data Hallucination):**
- **React 19:** Use native `ref` prop NOT `React.forwardRef` wrapper
- **TypeScript 5.5:** Use `satisfies` operator NOT type assertions
</correctness_guards>

## Component Patterns

Follow existing structures:
- Button component: `src/components/Button/` (ref forwarding, variants)
- Form inputs: `src/components/Input/` (validation, accessibility)
- Custom hooks: `src/hooks/` (TypeScript generics, return type inference)

## Error Handling

- Use error boundaries for all async data-fetching components
- Return `Result<T, E>` types for fallible operations — do NOT swallow errors with empty catch blocks

## Testing Requirements

- All components require unit tests (Vitest + @testing-library/react)
- Visual regression via Chromatic for UI changes
- Integration tests for multi-component interactions

## Repository Metadata
[Discoverable file structure removed - use Glob to explore]

Improvements:

  • ✅ XML encapsulation for critical rules
  • ✅ Version-specific syntax in Correctness Guards (primacy zone)
  • ✅ Removed discoverable file tree (reduces noise)
  • ✅ Replaced vague "be thorough" with specific requirements
  • ✅ Added concrete examples with file references
  • ✅ Moved from generic to specific ("modern patterns" → actual syntax)

Token count: ~70 → ~236 tokens (intentionally larger — the "after" adds fidelity, not compression; see Core Principle)

Usage

# Audit root CLAUDE.md
/universal-context-auditor

# Audit all CLAUDE.md files in repo
/universal-context-auditor --repo-wide

# Audit a specific file
/universal-context-auditor --file path/to/instructions.md

Distribution

This skill is designed for:

  • Internal teams - Standardize AI config quality across organization
  • Open source projects - Improve contributor AI experience
  • Individual developers - Optimize personal AI workflows
  • Tool builders - Foundation for custom linters

License: MIT (See LICENSE file) Source: Based on production use at eBay's evo-web monorepo Article: "The Clean Code Tax: Why Your AI Context Files Are Wasting Tokens and Money"


Made with ❤️ by engineers who learned the hard way that clean code principles don't apply to LLMs.

平台分布

Codex

34.91%
按下载量换算30

Claude

29.96%
按下载量换算26

Cursor

19.87%
按下载量换算17

Gemini CLI

9.37%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills