ln-631-test-business-logic-auditor by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-631-test-business-logic-auditor路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录未找到,请定位此 SKILL.md 文件所在的目录,然后向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
专门用于审计"业务逻辑聚焦"(类别 1)测试的工作器。
必读: 加载 shared/references/audit_worker_core_contract.md。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
接收包含以下内容的 contextStore:tech_stack、testFilesMetadata、codebase_root、output_dir。
必读: 加载 shared/references/two_layer_detection.md 了解检测方法。
shared/templates/audit_worker_report_template.md 在内存中构建完整的 Markdown 报告,通过单次 Write 调用写入 {output_dir}/631-business-logic.md内容: 验证框架行为(Express、Fastify、Koa)而非我们业务逻辑的测试
检测模式:
(express|fastify|koa).(use|get|post|put|delete|patch)严重性: 中等
建议: 如果测试仅验证框架行为,考虑移除。如果测试的是自定义代码与框架的集成 → 保留
工作量: S(删除测试文件或测试块)
内容: 验证 Prisma/Mongoose/Sequelize/TypeORM 行为的测试
检测模式:
(prisma|mongoose|sequelize|typeorm).(find|findMany|create|update|delete|upsert)严重性: 中等
建议: 如果测试仅验证 ORM 行为,考虑移除。如果测试的是自定义查询逻辑或仓储模式 → 保留
工作量: S
内容: 验证 bcrypt/argon2 哈希行为的测试
检测模式:
(bcrypt|argon2).(hash|compare|verify|hashSync)严重性: 中等
建议: 如果测试仅验证库行为,考虑移除。如果测试的是自定义密码策略或哈希包装器 → 保留
工作量: S
内容: 验证 JWT 签名/验证的测试
检测模式:
(jwt|jsonwebtoken).(sign|verify|decode)严重性: 中等
建议: 如果测试仅验证 JWT 库,考虑移除。如果测试的是自定义令牌载荷、声明逻辑或认证流程 → 保留
工作量: S
内容: 验证 axios/fetch/got 行为的测试
检测模式:
(axios|fetch|got|request).(get|post|put|delete|patch)严重性: 中等
建议: 如果测试仅验证 HTTP 客户端行为,考虑移除。如果测试的是自定义 API 包装器、重试逻辑或错误映射 → 保留
工作量: S
内容: 验证 React hooks 行为(useState、useEffect 等)的测试
检测模式:
(useState|useEffect|useContext|useReducer|useMemo|useCallback)严重性: 低(如果是测试我们自己的自定义钩子逻辑,则可接受)
建议: 审查 — 如果测试框架行为 → 删除;如果测试自定义钩子 → 保留
工作量: S-M
必读: 加载 shared/references/audit_worker_core_contract.md 和 shared/references/audit_scoring.md。
必读: 加载 shared/references/audit_worker_core_contract.md 和 shared/templates/audit_worker_report_template.md。
将报告写入 {output_dir}/631-business-logic.md,其中包含 category: "Business Logic Focus" 和检查项:framework_tests、orm_tests、crypto_tests、jwt_tests、http_client_tests、react_hooks_tests。
向协调器返回摘要:
Report written: docs/project/.audit/ln-630/{YYYY-MM-DD}/631-business-logic.md
Score: X.X/10 | Issues: N (C:N H:N M:N L:N)
必读: 加载 shared/references/audit_worker_core_contract.md。
必读: 加载 shared/references/audit_worker_core_contract.md。
{output_dir}/631-business-logic.md(原子性单次 Write 调用)shared/references/audit_output_schema.md版本: 3.0.0 最后更新: 2025-12-23
每周安装数
172
仓库
GitHub 星标数
253
首次出现
2026年1月24日
安全审计
安装于
claude-code157
cursor153
opencode153
codex152
gemini-cli152
github-copilot146
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. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Specialized worker auditing tests for Business Logic Focus (Category 1).
MANDATORY READ: Load shared/references/audit_worker_core_contract.md.
Receives contextStore with: tech_stack, testFilesMetadata, codebase_root, output_dir.
MANDATORY READ: Load shared/references/two_layer_detection.md for detection methodology.
shared/templates/audit_worker_report_template.md, write to {output_dir}/631-business-logic.md in single Write callWhat: Tests validating framework behavior (Express, Fastify, Koa) instead of OUR business logic
Detection Patterns:
(express|fastify|koa).(use|get|post|put|delete|patch)Severity: MEDIUM
Recommendation: Consider removing IF test only validates framework behavior. If testing integration of custom code with framework → KEEP
Effort: S (delete test file or test block)
What: Tests validating Prisma/Mongoose/Sequelize/TypeORM behavior
Detection Patterns:
(prisma|mongoose|sequelize|typeorm).(find|findMany|create|update|delete|upsert)Severity: MEDIUM
Recommendation: Consider removing IF test only validates ORM behavior. If testing custom query logic or repository patterns → KEEP
Effort: S
What: Tests validating bcrypt/argon2 hashing behavior
Detection Patterns:
(bcrypt|argon2).(hash|compare|verify|hashSync)Severity: MEDIUM
Recommendation: Consider removing IF test only validates library behavior. If testing custom password policy or hashing wrapper → KEEP
Effort: S
What: Tests validating JWT signing/verification
Detection Patterns:
(jwt|jsonwebtoken).(sign|verify|decode)Severity: MEDIUM
Recommendation: Consider removing IF test only validates JWT library. If testing custom token payload, claims logic, or auth flow → KEEP
Effort: S
What: Tests validating axios/fetch/got behavior
Detection Patterns:
(axios|fetch|got|request).(get|post|put|delete|patch)Severity: MEDIUM
Recommendation: Consider removing IF test only validates HTTP client behavior. If testing custom API wrapper, retry logic, or error mapping → KEEP
Effort: S
What: Tests validating React hooks behavior (useState, useEffect, etc.)
Detection Patterns:
(useState|useEffect|useContext|useReducer|useMemo|useCallback)Severity: LOW (acceptable if testing OUR custom hook logic)
Recommendation: REVIEW — if testing framework behavior → DELETE; if testing custom hook → KEEP
Effort: S-M
MANDATORY READ: Load shared/references/audit_worker_core_contract.md and shared/references/audit_scoring.md.
MANDATORY READ: Load shared/references/audit_worker_core_contract.md and shared/templates/audit_worker_report_template.md.
Write report to {output_dir}/631-business-logic.md with category: "Business Logic Focus" and checks: framework_tests, orm_tests, crypto_tests, jwt_tests, http_client_tests, react_hooks_tests.
Return summary to coordinator:
Report written: docs/project/.audit/ln-630/{YYYY-MM-DD}/631-business-logic.md
Score: X.X/10 | Issues: N (C:N H:N M:N L:N)
MANDATORY READ: Load shared/references/audit_worker_core_contract.md.
MANDATORY READ: Load shared/references/audit_worker_core_contract.md.
{output_dir}/631-business-logic.md (atomic single Write call)shared/references/audit_output_schema.mdVersion: 3.0.0 Last Updated: 2025-12-23
Weekly Installs
172
Repository
GitHub Stars
253
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code157
cursor153
opencode153
codex152
gemini-cli152
github-copilot146
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
33,600 周安装