跳到正文
Skillpedia
测试48k · #4616

find-bugs

它能做什么

这个工具会分析代码改动,找出其中的 bug、安全漏洞和质量问题。它会逐行检查,确保代码运行正确且安全。

适用场景

  • ✓想让别人帮你检查代码中的错误时。
  • ✓需要排查代码中的安全漏洞时。
  • ✓想审查代码某个部分的改动时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/find-bugs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/find-bugs/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查这段代码的改动,看看有没有 bug 和安全问题。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会对比代码的旧版本和新版本,检查用户输入、数据库查询以及其他关键部分。然后,它会依据一份检查清单,找出常见的安全问题和 bug。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Find Bugs

Review changes on this branch for bugs, security vulnerabilities, and code quality issues.

When to Use

  • You need a review focused on bugs, security issues, or risky code changes.
  • The task involves auditing the current branch diff rather than implementing new behavior.
  • You want a structured review process with checklist-driven verification against changed files.

Phase 1: Complete Input Gathering

  1. Establish the requested base and head as verified commit SHAs. Check the remote/default branch if needed; do not assume a stale local branch is current. Read the full branch diff with git diff "$BASE_SHA...$HEAD_SHA" --, using validated refs in separately quoted arguments. Include staged and unstaged changes when they are in scope; preserve the checkout.
  2. If output is truncated, read each changed file individually until you have seen every changed line
  3. List all files modified in this branch before proceeding

Phase 2: Attack Surface Mapping

For each changed file, identify and list:

  • All user inputs (request params, headers, body, URL components)
  • All database queries
  • All authentication/authorization checks
  • All session/state operations
  • All external calls
  • All cryptographic operations

Phase 3: Security Checklist (check EVERY item for EVERY file)

  • Injection: SQL, command, template, header injection
  • XSS: All outputs in templates properly escaped?
  • Authentication: Auth checks on all protected operations?
  • Authorization/IDOR: Access control verified, not just auth?
  • CSRF: State-changing operations protected?
  • Race conditions: TOCTOU in any read-then-write patterns?
  • Session: Fixation, expiration, secure flags?
  • Cryptography: Secure random, proper algorithms, no secrets in logs?
  • Information disclosure: Error messages, logs, timing attacks?
  • DoS: Unbounded operations, missing rate limits, resource exhaustion?
  • Business logic: Edge cases, state machine violations, numeric overflow?

Phase 4: Verification

For each potential issue:

  • Check if it's already handled elsewhere in the changed code
  • Search for existing tests covering the scenario
  • Read surrounding context to verify the issue is real

Phase 5: Pre-Conclusion Audit

Before finalizing, you MUST:

  1. List every file you reviewed and confirm you read it completely
  2. List each applicable checklist item as a finding, verified within the reviewed scope, not applicable, or unverified; absence of a finding is not proof of security
  3. List any areas you could NOT fully verify and why
  4. Only then provide your final findings

Output Format

Prioritize: security vulnerabilities > bugs > code quality

Skip: stylistic/formatting issues

For each issue:

  • File:Line - Brief description
  • Severity: Critical/High/Medium/Low
  • Problem: What's wrong
  • Evidence: Concrete trigger, reachable path and observed or reasoned impact; missing tests alone do not prove a bug
  • Fix: Concrete suggestion
  • References: OWASP, RFCs, or other standards if applicable

If you find nothing significant, say so - don't invent issues.

For a review-only request, report findings without changing code. An explicit combined review-and-fix request authorizes scoped repairs and verification; preserve the distinction between findings and completed fixes.

Example

User request:

Review the current branch diff for real bugs, security issues, and regressions, citing exact files and lines.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题

什么是“bug”?

“bug”是指代码中的错误,会导致程序出现意料之外的行为,或者无法继续正常运行。

什么是“安全漏洞”?

“安全漏洞”是指代码中的缺陷,恶意攻击者可能利用它们窃取数据或破坏系统。

这个工具会自动修复它发现的问题吗?

这个工具会指出问题,并建议如何修复,但最终的修正通常还需要由程序员来完成。

详情

作者的原始描述

Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4616
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能