Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计提醒

ln-634-test-coverage-auditorln 634 测试覆盖率审核员

Agent Skill

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

总安装

6,933

周安装

286

GitHub Stars

437

下载量

2,265
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:ln-634-test-coverage-auditor(ln 634 测试覆盖率审核员)
来源仓库:https://github.com/levnikolaevich/claude-code-skills
仓库路径:skills/ln-634-test-coverage-auditor
安装命令:
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-634-test-coverage-auditor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-634-test-coverage-auditor

简介

用于安全审计、权限检查和常见漏洞排查,适合梳理敏感配置和鉴权逻辑。

  • 适用于需要分析凭据风险或生成安全复核清单的场景。
  • 使用时不能把工具输出直接当最终结论,需先确认最小权限和操作边界。
  • 涉及密钥、令牌或用户数据时应脱敏处理,避免影响生产系统。
  • 安装前建议确认权限范围和维护状态,确保不会触发不必要的网络或文件操作。

SKILL.md

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. If shared/ is missing, fetch files via WebFetch from https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.

Coverage Gaps Auditor (L3 Worker)

Type: L3 Worker

Specialized worker identifying missing tests for critical business logic.

Purpose & Scope

  • Audit Coverage Gaps (Category 4: High Priority)
  • Identify untested critical paths
  • Classify by category (Money, Security, Data, Core Flows)
  • Calculate compliance score (X/10)

Inputs

MANDATORY READ: Load shared/references/audit_worker_core_contract.md. MANDATORY READ: Load shared/references/mcp_tool_preferences.md and shared/references/mcp_integration_patterns.md

Receives contextStore with: tech_stack, testFilesMetadata, codebase_root, output_dir.

Domain-aware: Supports domain_mode + current_domain (see audit_output_schema.md#domain-aware-worker-output).

Use hex-graph first when hotspots materially improve coverage-gap discovery. Use hex-line first for local code and test reads when available. If MCP is unavailable, unsupported, or not indexed, continue with built-in Read/Grep/Glob/Bash and state the fallback in the report.

Workflow

MANDATORY READ: Load shared/references/two_layer_detection.md for detection methodology.

  1. Parse context -- extract fields, determine scan_path (domain-aware if specified) ELSE: scan_path = codebase_root domain_name = null ``
  2. Identify critical paths in scan_path (not entire codebase)

- Scan production code in scan_path for money/security/data keywords - All Grep/Glob patterns use scan_path (not codebase_root) - Example: Grep(pattern="payment|refund|discount", path=scan_path)

  1. Check test coverage for each critical path (Layer 1)

- Search ALL test files for coverage (tests may be in different location than production code) - Match by function name, module name, or test description 3b) Context Analysis (Layer 2 -- MANDATORY): For each gap candidate, ask: - Is this function already covered by E2E/integration test? -> downgrade to LOW - Is this a helper function with <10 lines called from tested code? -> skip - Is keyword match a false positive (e.g., paymentIcon() is UI, not payment logic)? -> skip

  1. Collect missing tests

- Tag each finding with domain: domain_name (if domain-aware)

  1. Calculate Score: Count violations by severity, calculate compliance score (X/10)
  2. Write Report: Build full markdown report in memory per shared/templates/audit_worker_report_template.md, write to {output_dir}/ln-634--{identifier}.md (or {output_dir}/ln-634--{identifier}.md if domain-aware) in single Write call
  3. Return Summary: Return minimal summary to coordinator (see Output Format)

Critical Paths Classification

1. Money Flows (Priority 20+)

What: Any code handling financial transactions

Examples:

  • Payment processing (/payment, processPayment())
  • Discounts/promotions (calculateDiscount(), applyPromoCode())
  • Tax calculations (calculateTax(), getTaxRate())
  • Refunds (processRefund(), /refund)
  • Invoices/billing (generateInvoice(), createBill())
  • Currency conversion (convertCurrency())

Min Priority: 20

Why Critical: Money loss, fraud, legal compliance

2. Security Flows (Priority 20+)

What: Authentication, authorization, encryption

Examples:

  • Login/logout (/login, authenticate())
  • Token refresh (/refresh-token, refreshAccessToken())
  • Password reset (/forgot-password, resetPassword())
  • Permissions/RBAC (checkPermission(), hasRole())
  • Encryption/hashing (custom crypto logic, NOT bcrypt/argon2)
  • API key validation (validateApiKey())

Min Priority: 20

Why Critical: Security breach, data leak, unauthorized access

3. Data Integrity (Priority 15+)

What: CRUD operations, transactions, validation

Examples:

  • Critical CRUD (createUser(), deleteOrder(), updateProduct())
  • Database transactions (withTransaction())
  • Data validation (custom validators, NOT framework defaults)
  • Data migrations (runMigration())
  • Unique constraints (checkDuplicateEmail())

Min Priority: 15

Why Critical: Data corruption, lost data, inconsistent state

4. Core User Journeys (Priority 15+)

What: Multi-step flows critical to business

Examples:

  • Registration -> Email verification -> Onboarding
  • Search -> Product details -> Add to cart -> Checkout
  • Upload file -> Process -> Download result
  • Submit form -> Approval workflow -> Notification

Min Priority: 15

Why Critical: Broken user flow = lost customers

Audit Rules

1. Identify Critical Paths

Process:

  • Scan codebase for money-related keywords: payment, refund, discount, tax, price, currency
  • Scan for security keywords: auth, login, password, token, permission, encrypt
  • Scan for data keywords: transaction, validation, migration, constraint
  • Scan for user journeys: multi-step flows in routes/controllers

2. Check Test Coverage

For each critical path:

  • Search test files for matching test name/description
  • If NO test found -> add to missing tests list
  • If test found but inadequate (only positive, no edge cases) -> add to gaps list

3. Categorize Gaps

Severity by Priority:

  • CRITICAL: Priority 20+ (Money, Security)
  • HIGH: Priority 15-19 (Data, Core Flows)
  • MEDIUM: Priority 10-14 (Important but not critical)
  • Downgrade when: Function already covered by E2E test -> LOW. Helper with <10 lines called from tested code -> skip

4. Provide Justification

For each missing test:

  • Explain WHY it's critical (money loss, security breach, etc.)
  • Suggest test type (E2E, Integration, Unit)
  • Estimate effort (S/M/L)

Scoring Algorithm

MANDATORY READ: Load shared/references/audit_worker_core_contract.md and shared/references/audit_scoring.md.

Severity mapping by Priority:

  • Priority 20+ (Money, Security) missing test -> CRITICAL
  • Priority 15-19 (Data Integrity, Core Flows) missing test -> HIGH
  • Priority 10-14 (Important) missing test -> MEDIUM
  • Priority <10 (Nice-to-have) -> LOW

Output Format

MANDATORY READ: Load shared/references/audit_worker_core_contract.md and shared/templates/audit_worker_report_template.md.

Write JSON summary per shared/references/audit_summary_contract.md. In managed mode the caller passes both runId and summaryArtifactPath; in standalone mode the worker generates its own run-scoped artifact path per shared contract.

Write report to {output_dir}/ln-634--{identifier}.md (global) or {output_dir}/ln-634--{identifier}.md (domain-aware) with category: "Coverage Gaps" and checks: money_flow_coverage, security_flow_coverage, data_integrity_coverage, core_journey_coverage.

Return summary per shared/references/audit_summary_contract.md.

When summaryArtifactPath is absent, write the standalone runtime summary under .hex-skills/runtime-artifacts/runs/{run_id}/evaluation-worker/{worker}--{identifier}.json and optionally echo the same summary in structured output.

Report written: .hex-skills/runtime-artifacts/runs/{run_id}/audit-report/ln-634--{identifier}.md
Score: X.X/10 | Issues: N (C:N H:N M:N L:N)

Critical Rules

MANDATORY READ: Load shared/references/audit_worker_core_contract.md.

  • Domain-aware scanning: If domain_mode="domain-aware", scan ONLY scan_path production code (not entire codebase)
  • Tag findings: Include domain field in each finding when domain-aware
  • Test search scope: Search ALL test files for coverage (tests may be in different location than production code)
  • Match by name: Use function name, module name, or test description to match tests to production code

Definition of Done

MANDATORY READ: Load shared/references/audit_worker_core_contract.md.

  • contextStore parsed successfully (including output_dir, domain_mode, current_domain)
  • scan_path determined (domain path or codebase root)
  • Critical paths identified in scan_path (Money, Security, Data, Core Flows)
  • Test coverage checked for each critical path
  • Missing tests collected with severity, priority, justification, domain
  • Score calculated using penalty algorithm
  • Report written to {output_dir}/ln-634--{identifier}.md or ln-634--{identifier}.md (atomic single Write call)
  • Summary written per contract

Reference Files

  • Audit output schema: shared/references/audit_output_schema.md

Version: 3.0.0 Last Updated: 2025-12-23

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

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

平台分布

Claude Code

30.85%
按下载量换算699

Gemini CLI

24.34%
按下载量换算551

Codex

17.85%
按下载量换算404

OpenCode

12.58%
按下载量换算285

Antigravity

8.03%
按下载量换算182

windsurf

3.15%
按下载量换算71

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills