Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

usage-audit使用审计

Agent Skill

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

总安装

672

周安装

28

GitHub Stars

216

下载量

224
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mathews-tom/armory --skill usage-audit

简介

用于辅助安全审计、权限检查、凭据风险和认证流程排查,适合生成安全复核清单。

  • 适用于梳理敏感配置、检查依赖风险、分析鉴权逻辑等安全相关任务。
  • 通过 npx skills add 命令安装,不能将工具输出直接作为最终结论。
  • 涉及密钥、令牌或用户数据时,应先确认最小权限和操作边界。
  • usage-audit 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Usage Audit

Bloated context costs twice: you burn usage limits faster and output quality drops because models attend most to the start and end of context. This skill finds the waste and tells you what to cut.

Credit: adapted from the context-audit skill in the Claude Code Context Cleanup Guide (2026). Armory port adds package-aware checks and treats the scoring rubric as an overridable reference, not a verdict.

Step 1: Get /context Data

Check the conversation for recent /context output. If the user has not run it in this session, ask:

"Run /context in this terminal and paste the output. I can't run slash commands myself — once I can see the breakdown I'll audit everything it flags."

STOP HERE. Do not proceed to Step 2 until real /context data is available. The breakdown determines what to audit and in what order. Without it, the audit is guessing. Output the message above and wait.

Step 2: Audit What's Bloated

Work the categories from largest to smallest in the /context output. Run independent checks in parallel.

MCP Servers

Each connected server loads full tool definitions into context every turn (~15,000-20,000 tokens each), whether you invoke a tool or not. Under Opus 4.7 this figure can run 1.0–1.35× higher for the same schemas due to a tokenizer update — prefer measured values from /context over these static estimates.

  • Count configured servers in settings.json and ~/.claude/settings.json.
  • Report total MCP overhead from /context.
  • Flag any server with a CLI equivalent (Playwright, GitHub, Google Workspace, Notion, Slack, etc.) — the CLI costs zero tokens when idle.
  • Cross-reference installed armory packages: if mcp-to-skill is installed, recommend it explicitly for the heaviest server.

CLAUDE.md Files

Read every CLAUDE.md in scope (project root, .claude/, ~/.claude/). For each file: count lines, then test every rule against the five filters.

FilterFlag when...
DefaultClaude already does this without being told ("write clean code", "handle errors")
ContradictionConflicts with another rule in the same or a different file
RedundancyRepeats something already covered elsewhere
BandaidAdded to fix one specific bad output, not improve outputs generally
VagueInterpreted differently every time ("be natural", "use good tone")

If a CLAUDE.md exceeds 200 lines, check for progressive-disclosure opportunities: rules that only apply to specific tasks (API conventions, deploy steps, testing) should move to reference files with one-line pointers from the core file. A lean CLAUDE.md under 200 lines with universal context is fine as a single file — do not split for the sake of splitting.

Rules Packages (armory-specific)

Armory rules/ packages load into every session like CLAUDE.md does — they are the real silent base tax. Higher priority than skill bloat.

  • Enumerate installed rules packages via ~/.claude/settings.json or the armory installer registry if present.
  • For each rules package, read its RULE.md body, count lines, apply the same five filters.
  • Flag any rules package over 300 lines. These hit every turn.

Installed Skills

Scan ~/.claude/skills/*/SKILL.md and any project-local skills. For each:

  • Measure SKILL.md body lines only — do NOT count files under references/, scripts/, or evals/. Those load on demand, not on trigger. Penalizing total package LOC misattributes cost.
  • Flag SKILL.md body > 200 lines (warn) or > 500 lines (critical).
  • Run the five filters on skill instructions: restated goals, hedging ("you may want to"), synonymous instructions ("be concise" + "keep it short" + "don't be verbose").
  • Frontmatter description audit: count words in each skill's description field. Flag any over 60 words. Skill descriptions load into the router on every session and should be trigger-focused, not prose.

Settings

Check settings.json for these keys:

SettingFlag ifRecommended
autocompact_percentage_overrideMissing or > 8075
env.BASH_MAX_OUTPUT_LENGTHAt default (30-50K)150000

File Permissions

Check permissions.deny in settings.json. If missing, inspect the project and flag bloat directories that should be denied:

If this exists...Should deny...
package.jsonnode_modules, dist, build, .next, coverage
Cargo.tomltarget
go.modvendor
pyproject.toml / requirements.txt__pycache__, .venv, *.egg-info

Step 3: Score and Report

The rubric below is a reference default, not gospel. A "reference" skill that wraps a large CLI surface (e.g., github, agent-builder) may legitimately exceed line thresholds — judge the body, not the file count. Users can override any deduction in their project CLAUDE.md.

Score starts at 100. Deduct per issue:

IssuePoints
CLAUDE.md > 200 lines-10
CLAUDE.md > 500 lines-20
Rules package > 300 lines (body)-10 each
Per 5 rules flagged by filters-5
Contradictions between files-10
Missing autocompact_percentage_override-10
Missing BASH_MAX_OUTPUT_LENGTH override-5
Skill body > 200 lines-5 each
Skill body > 500 lines-10 each
Skill description > 60 words-2 each
Per connected MCP server with CLI equivalent-5 each
No permissions.deny and bloat dirs exist-10

Floor at 0. Output this format:

# Usage Audit

Score: {N}/100 [{CLEAN|NEEDS WORK|BLOATED|CRITICAL}]

## Context Breakdown (from /context)
{Paste the key numbers}

## Issues Found

### [{CRITICAL|WARNING|INFO}] {Category}
{What's wrong}
Fix: {One-line actionable fix}

### Rules to Cut
{Each flagged rule: quoted text, which filter, one-line reason}

### Conflicts
{Contradictions between files, with paths}

## Top 3 Fixes
1. {Highest-impact fix}
2. {Second}
3. {Third}

Score labels: 90-100 CLEAN, 70-89 NEEDS WORK, 50-69 BLOATED, 0-49 CRITICAL. Severity: CRITICAL > 10pts, WARNING 5-10pts, INFO < 5pts.

Step 4: Offer to Fix

After the report, offer targeted fixes:

"Want me to apply any of these? I can: - Add missing settings.json keys (autocompact_percentage_override, BASH_MAX_OUTPUT_LENGTH) - Add permissions.deny rules for detected bloat directories - Show a cleaned-up CLAUDE.md diff with flagged rules removed - Compress fat skill frontmatter descriptions - Recommend specific MCP servers to disconnect this session"

Auto-apply the settings and permissions changes (safe, reversible). Show a diff and wait for confirmation before modifying any instruction file (CLAUDE.md, RULE.md, SKILL.md) — instruction edits are load-bearing and users need final say.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.15%
按下载量换算79

Claude

30.8%
按下载量换算69

Cursor

20.31%
按下载量换算45

Gemini CLI

10.83%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills