Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

audit-docs审计文件

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

238

周安装

10

GitHub Stars

公开资料未说明

下载量

83
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/nayuta/agent-skills --skill audit-docs

简介

用于静态验证 CLAUDE.md 和 AGENTS.md 文档文件的准确性和规范性,确保反映真实代码结构。

  • 检查标记对完整性、表格结构和链接有效性,防止文档与实际代码脱节造成误导。
  • 适用于项目初始化或文档更新后的合规性检查,提升团队协作效率和知识传递质量。
  • 安装方式:通过 npx skills add 命令从指定 GitHub 仓库添加,支持 Codex、Claude、Cursor 等宿主环境。
  • 发现缺失或错误时提供具体修复建议,如补充标记对或修正表格格式,避免模糊描述。

SKILL.md

Audit Documentation Files

Purpose

This skill provides static validation of CLAUDE.md and AGENTS.md documentation files to ensure they accurately reflect the actual codebase structure and follow proper conventions.

What It Validates

1. Marker Format (MARKER_MISSING)

Required comment marker pairs must exist:

  • <!-- AVAILABLE_SKILLS_START --> / <!-- AVAILABLE_SKILLS_END -->
  • <!-- AVAILABLE_AGENTS_START --> / <!-- AVAILABLE_AGENTS_END -->

2. Table Structure (TABLE_MALFORMED)

Tables must have:

  • Exactly 3 columns: Name | Description | Link
  • Proper separator row with :--- alignment
  • Non-empty, well-formed markdown table syntax

3. Link Validity (LINK_BROKEN)

All file links in tables must:

  • Resolve to existing files in the repository
  • Use correct relative paths

4. Skill Completeness (SKILL_UNLISTED)

All skills in .claude/skills/ and skills/ must:

  • Be listed in the Available Skills table
  • Both directories are scanned: .claude/skills/ (project skills) and skills/ (distributed skills installed via npx skills add)
  • Exception: Skills with unlisted: true in frontmatter are ignored

5. Agent Completeness (AGENT_UNLISTED)

All agents in .claude/agents/ must:

  • Be listed in the Available Agents table
  • Exception: Agents with unlisted: true in frontmatter are ignored

6. Synchronization (AGENTS_DESYNC)

AGENTS.md must:

  • Have identical body content to CLAUDE.md (excluding first line)
  • The first line of AGENTS.md is # AGENTS.md while CLAUDE.md is # CLAUDE.md

7. File Length (FILE_TOO_LONG)

CLAUDE.md should not exceed 200 lines (official Claude Code recommendation):

  • Severity: WARN
  • Counts total lines in the file

8. Import Resolution (IMPORT_BROKEN)

@path imports in CLAUDE.md text must resolve to existing files:

  • Regex-based detection of @path references outside fenced code blocks
  • Excludes email addresses (e.g., user@example.com)
  • Severity: ERROR

9. Sensitive Imports (IMPORT_SENSITIVE)

@path imports should not reference sensitive files:

  • Checks for patterns: .env, .pem, .key, credentials, secret, password, token
  • Only checked for valid (existing) imports
  • Severity: WARN

10. Description Accuracy (DESCRIPTION_MISMATCH)

Table descriptions must match frontmatter descriptions:

  • Compares description column in skills/agents tables with description field in SKILL.md or agent frontmatter
  • Skips if either description is empty
  • Severity: WARN

11. Name Accuracy (NAME_MISMATCH)

Table names must match frontmatter names:

  • Compares name column in skills/agents tables with name field in frontmatter
  • Severity: ERROR

12. AGENTS.md Import (AGENTS_NO_IMPORT)

CLAUDE.md should import AGENTS.md when it exists and bodies differ:

  • Warns when AGENTS.md exists, no @AGENTS.md import is present, and bodies are not synchronized
  • No warning if bodies are already in sync (content is already there)
  • Severity: WARN

13. Rules Glob Patterns (RULES_INVALID_PATHS)

Glob patterns in .claude/rules/*.md frontmatter must be valid:

  • Validates globs field in each rule file's frontmatter
  • Checks bracket balance and uses fnmatch to verify pattern validity
  • Graceful no-op when .claude/rules/ doesn't exist
  • Severity: WARN

14. Rules Links (RULES_BROKEN_LINK)

Markdown links in .claude/rules/*.md files must resolve:

  • Checks [text](path) links in rule file bodies
  • Excludes external links (http://, https://, #, mailto:)
  • Resolves paths relative to repository root
  • Graceful no-op when .claude/rules/ doesn't exist
  • Severity: ERROR

15. Body Sensitive Content (BODY_SENSITIVE)

CLAUDE.md body text must not contain hardcoded secrets:

  • Scans text outside fenced code blocks for secret patterns
  • Detects: AWS access keys, Bearer tokens, API key assignments, password assignments, secret/token assignments, database connection strings
  • Complements IMPORT_SENSITIVE (which only checks @path import targets)
  • Only scans CLAUDE.md (AGENTS.md is intentionally excluded)
  • Severity: WARN

Usage

Basic Validation

# Validate current repository
uv run .claude/skills/audit-docs/scripts/audit_docs.py .

# Validate specific repository
uv run .claude/skills/audit-docs/scripts/audit_docs.py /path/to/repo

Via Makefile

make audit-docs

Exit Codes

  • 0 - All checks passed
  • 1 - Issues found (validation errors)
  • 2 - Fatal error (invalid arguments, invalid repository path)

Output Format

Human-readable plain text listing all findings:

[ERROR] MARKER_MISSING @ /path/to/CLAUDE.md :: Missing marker pair: AVAILABLE_SKILLS_START / AVAILABLE_SKILLS_END
[ERROR] SKILL_UNLISTED @ /path/to/.claude/skills/example/SKILL.md :: Skill 'example' not listed in CLAUDE.md table
[ERROR] LINK_BROKEN @ /path/to/CLAUDE.md :: Broken link: .claude/skills/missing/SKILL.md

Edge Cases

  • Missing CLAUDE.md: Reports FILE_MISSING error
  • Empty skills directory: Passes (no findings)
  • Skill directory without SKILL.md: Ignored (not validated)
  • Skills with unlisted: true: Excluded from completeness check
  • No AGENTS.md: Skips synchronization check
  • Multi-line table cells: Not supported; rows are validated line-by-line
  • Email addresses: user@example.com is not treated as an @import
  • Code blocks: @path references inside fenced code blocks are ignored
  • No .claude/rules/ directory: Skips rules validation (no findings)

Implementation Details

  • Zero dependencies: Uses only Python 3.11+ standard library
  • PEP 723 compliant: Inline script metadata for uv run
  • Simple frontmatter parser: Manual YAML parsing for basic key: value pairs
  • Pattern: Follows skill_audit.py architecture (dataclasses, Finding/Report)

Testing

Run test suite:

uv run pytest .claude/skills/audit-docs/test/test_audit_docs.py -v

49 test functions covering:

  1. Valid CLAUDE.md passes
  2. Missing markers fail
  3. Invalid table format fails
  4. Broken links fail
  5. Orphan skills fail
  6. Unlisted frontmatter ignored
  7. AGENTS.md desync fails
  8. Exit code 0 for clean
  9. Exit code 1 for issues
  10. Unlisted agents fail
  11. Root skills/ unlisted triggers SKILL_UNLISTED
  12. Root skills/ with unlisted: true ignored
  13. Skills in both directories pass when all listed
  14. FILE_TOO_LONG warns on 201+ lines
  15. File under 200 lines passes
  16. IMPORT_BROKEN on nonexistent @path
  17. Valid @import passes
  18. @path in code block ignored
  19. @path in code block with backticks ignored
  20. IMPORT_SENSITIVE on.env/@secrets.key
  21. Non-sensitive import passes
  22. DESCRIPTION_MISMATCH warns
  23. Matching description passes
  24. NAME_MISMATCH on differing names
  25. Matching name passes
  26. AGENTS_NO_IMPORT warns when bodies differ
  27. @AGENTS.md import present passes
  28. Synced bodies produce no warning
  29. Invalid glob pattern warns
  30. Valid glob pattern passes
  31. Broken link in rules fails
  32. Valid link in rules passes
  33. Email not treated as import
  34. No rules directory passes
  35. @path in inline code ignored
  36. IMPORT_SENSITIVE on sensitive directories
  37. BODY_SENSITIVE on API key assignment
  38. BODY_SENSITIVE on database connection string
  39. Clean CLAUDE.md produces no BODY_SENSITIVE
  40. Secrets in code blocks ignored by BODY_SENSITIVE
  41. BODY_SENSITIVE on Bearer token
  42. BODY_SENSITIVE on AWS access key
  43. Underscore-joined placeholder values not flagged
  44. Placeholder with trailing digits not flagged
  45. Underscore-joined replace_this_value not flagged
  46. sample_token_value placeholder not flagged
  47. Placeholder with example between underscores not flagged
  48. Real-looking secrets still flagged (no regression)
  49. Secrets inside 4+ tilde fences ignored by strip_code_blocks

Integration

This skill is designed to be:

  • Run in CI/CD pipelines to catch documentation drift
  • Integrated into pre-commit hooks
  • Used by documentation maintenance agents
  • Part of the mend-docs skill workflow

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.2%
按下载量换算30

Claude

31.14%
按下载量换算26

Cursor

16.46%
按下载量换算14

Gemini CLI

9.93%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills