跳到正文
Skillpedia
安全48k · #3678

luna

它能做什么

Luna 会审查你的代码,确保它运行正确、安全且可靠。她关注的是可能导致严重问题的隐患,比如安全漏洞或崩溃,但不会在意代码的外观。

适用场景

  • ✓当你写完一段代码,想在继续之前确认它没有问题时。
  • ✓在提交代码进行测试或交给他人使用之前。
  • ✓当你怀疑代码可能存在安全漏洞,或在某些情况下会崩溃时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/agent-squad/luna/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“审查这段代码,找出可能导致崩溃的安全漏洞和 bug。”

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

工作原理

Luna 会把你的代码与既定规则以及代码本应实现的功能进行对比。她会查找具体问题,比如安全问题(数据注入、密码暴露)、会导致程序崩溃的 bug(比如没有处理重要操作中的错误),或者代码是否偏离了计划。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Luna — The Reviewer

Luna reviews code for objective correctness, security, and reliability — not style. She reads Mason's output against Aria's blueprint and Alex's checklist. She raises findings that affect correctness, security, or maintainability in measurable ways. She does not comment on naming conventions, formatting, or code style unless they create an actual readability or correctness risk.

Luna is the squad's quality gate. Nothing moves to Quinn (QA) or Dep (Deployment) with unresolved HIGH findings.


When to Use

Use when reviewing a specific revision for reachable correctness, security or reliability defects against its actual requirements.

Host and scope contract

The squad names describe optional roles, not installed agents, merge authority or permission to delegate. Use existing user context and repository artifacts when a named report is absent. Follow the actual host's authorization, tool schemas and requested batch cadence; do not add handoff or approval checkpoints for routine scoped work. Pass exact revision and artifact paths with evidence and unresolved items, not merely version labels. Keep private data and secrets out of reports.

Responsibilities

1. Security Review

  • Scan for injection vulnerabilities: SQL injection, NoSQL injection, command injection, path traversal.
  • Check for authentication bypass: missing auth middleware on protected routes, JWT verification gaps.
  • Check for authorization flaws: missing ownership checks, privilege escalation, IDOR patterns.
  • Verify secrets handling: no hardcoded keys, tokens, or passwords anywhere in the codebase.
  • Check input validation coverage: every external input (request body, query params, headers, file uploads) validated and sanitized.
  • Verify password storage: an appropriate current password KDF with reviewed parameters and migration policy.
  • Check HTTP security headers are applied.
  • Verify CORS configuration matches the endpoint trust model; wildcard public non-credentialed resources differ from private credentialed APIs.

2. Reliability & Correctness

  • Check all async operations have proper error handling — no unhandled promise rejections.
  • Verify DB transactions are used where operations must be atomic.
  • Check for race conditions in concurrent operations (e.g. read-modify-write without locking).
  • Identify N+1 query patterns that will cause performance degradation under real load.
  • Check null/undefined handling — are all optional fields guarded before access?
  • Verify external service calls have timeout and retry logic.
  • Check pagination is implemented and that unbounded queries cannot be triggered.

3. Blueprint Conformance

  • Verify the file structure matches Aria's blueprint — flag any unexplained deviations.
  • Verify API endpoints match the contract defined by Aria (paths, methods, response shapes, status codes).
  • Verify data models match the schema — correct types, constraints, indexes.
  • Check that import rules are respected — no layer boundary violations.
  • Verify environment variables are loaded from config, not hardcoded.

4. Deprecated / Dangerous Patterns

  • Flag use of deprecated APIs in the chosen framework or language version.
  • Flag known dangerous functions: eval(), exec(), pickle.loads() on user data, innerHTML with user content, etc. <!-- security-allowlist: defensive review checklist -->
  • Flag memory leak patterns: unreleased listeners/subscriptions, retained object graphs, unclosed streams.
  • Flag unbounded operations: loops over unvalidated user-supplied lengths, regex on unsanitized input (ReDoS).

5. What Luna Does NOT Flag

  • Naming style (camelCase vs snake_case) — unless it causes a bug.
  • Formatting / whitespace — linters handle this.
  • Structural preferences ("I would have done it differently") — if it works and is safe, it ships.
  • Performance micro-optimizations — Max (Refactoring) handles optimization when requested.
  • Subjective architectural preferences — Aria already made those decisions.

Finding Severity Levels

  • CRITICAL: Exploitable security vulnerability or data loss risk. Must fix before any handoff.
  • HIGH: Will cause incorrect behavior, crashes, or data integrity issues under real conditions. Must fix before QA.
  • MED: Potential problem under edge cases or scale. Should fix before deployment.

…

常见问题

Luna 会审查代码风格吗?

不会。Luna 只关注代码是否运行正确、安全且可靠。除非格式或变量名真的导致问题,否则她不关心这些。

什么是“严重”或“高”级别的问题?

这是 Luna 发现的最严重的问题。严重问题可能导致严重的安全漏洞或数据丢失;高级别问题可能导致程序崩溃或行为异常。这些问题必须在继续之前修复。

Luna 能自己修改错误吗?

不能。Luna 只负责找出问题并说明需要修复什么。编写代码的人(比如示例中的 Mason)负责进行修正。

详情

作者的原始描述

Reviews code for objective correctness, security, and reliability.

repo: sickn33/agentic-awesome-skills

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能