用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/skeletorflet/opencode-kit --skill code-review-checklist命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Web accessibility (a11y). WCAG 2.1, ARIA, keyboard navigation, screen readers, testing tools.
Analytics and event tracking. Product analytics, Mixpanel, PostHog, Segment, GDPR compliance, event taxonomy.
UI animation patterns. CSS transitions, Framer Motion, GSAP, performance, accessibility.
基于 SOC 职业分类
正在显示 SKILL.md
| name | code-review-checklist |
| description | Language-agnostic code review guidelines. Adapts conventions to each language's standards. |
IMPORTANT: This checklist adapts to the language being reviewed. Rule: Follow the conventions of the LANGUAGE, not JavaScript/Java defaults.
Antes de hacer code review, detecta el lenguaje:
├── .py → Python (PEP 8 conventions)
├── .java → Java (Oracle conventions)
├── .cs → C# (Microsoft .NET conventions)
├── .go → Go (Go Code Review Comments)
├── .rs → Rust (Rust API Guidelines)
├── .rb → Ruby (Ruby Style Guide)
├── .ts/.js → JS/TS (Airbnb/Google)
├── .php → PHP (PSR-12)
├── .swift → Swift (Apple conventions)
└── .kt → Kotlin (JetBrains conventions)
| ❌ WRONG (assume wrong convention) | ✅ CORRECT (follows language) |
|---|---|
| camelCase in Python | snake_case |
| snake_case in C# | PascalCase |
| snake_case in Go (exported) | PascalCase for exported |
| camelCase in Rust | snake_case |
# ❌ WRONG
def GetUserById(userId):
MAX_CONNECTIONS = 100
user_list = []
# ✅ CORRECT (PEP 8)
def get_user_by_id(user_id: int) -> Optional[User]:
MAX_CONNECTIONS = 100
user_list: List[User] = []
// ❌ WRONG
public class user_service {
public int max_connections { get; set; }
public User get_user_by_id(int user_id) { ... }
}
// ✅ CORRECT (.NET conventions)
public class UserService
{
public int MaxConnections { get; set; }
public User GetUserById(int userId) { ... }
}
// ❌ WRONG (exporting snake_case)
func get_user_by_id(user_id int) (*User, error) {
max_connections := 100
return get_user_by_id(user_id)
}
// ✅ CORRECT (Go conventions)
func GetUserByID(userID int) (*User, error) {
maxConnections := 100
return userID, nil
}
| ❌ Wrong | ✅ Correct |
|---|---|
if status == 3 | Named constant |
sleep(5000) | Named constant with units |
// ❌ WRONG
if (a) {
if (b) {
if (c) {
doSomething();
}
}
}
// ✅ CORRECT (early return)
if (!a) return;
if (!b) return;
if (!c) return;
doSomething();
| ❌ | ✅ |
|---|---|
| 100+ lines | Split into smaller functions |
// ❌ WRONG
const data: any = ...
// ✅ CORRECT
const data: UserData = ...
# Python: ❌ WRONG (no type hints on public API)
def get_user(id):
return id
# Python: ✅ CORRECT
def get_user(user_id: int) -> Optional[User]:
return user_id
// Rust: ❌ WRONG
fn get_user(id) -> Option<User> {
Some(User { id })
}
// Rust: ✅ CORRECT
fn get_user(user_id: i32) -> Option<User> {
Some(User { id: user_id })
}
### Input Validation
- [ ] All inputs validated?
- [ ] Sanitized before use?
### Authentication/Authorization
- [ ] Proper auth checks?
- [ ] No auth bypasses?
### Secrets
- [ ] No hardcoded API keys?
- [ ] No passwords in code?
- [ ] Environment variables used?
### SQL Injection
- [ ] Parameterized queries?
- [ ] ORM used properly?
- [ ] No string concatenation in queries?
### XSS
- [ ] Output encoding?
- [ ] Sanitized HTML?
- [ ] CSRF tokens?
| Check | Pregunta |
|---|---|
| [ ] Unit tests added for new code? | Coverage adequate? |
| [ ] Edge cases tested? | Empty, null, large values? |
| [ ] Tests readable? | Clear intent? |
| [ ] Tests isolated? | No dependencies on external state? |
| Check | What to look for |
|---|---|
| Type hints | Public functions should have type hints |
| PEP 8 | Use Black/isort for formatting |
| Exceptions | Catch specific exceptions, not bare except |
| Check | What to look for |
|---|---|
| PascalCase | All public members PascalCase |
| var usage | Use var when type is obvious |
| LINQ | Prefer LINQ over loops for queries |
| Check | What to look for |
|---|---|
| Exported/Unexported | PascalCase = exported, snake_case = private |
| Error handling | Always check errors |
| Context usage | Pass context for cancellation |
| Check | What to look for |
|---|---|
| Ownership | No unnecessary clones |
| Error handling | Use Result for fallible functions |
| lifetimes | Explicit lifetimes where needed |
// Bloqueadores importantes - 🔴
🔴 BLOCKING: SQL injection vulnerability here
// Sugerencias importantes - 🟡
🟡 SUGGESTION: Consider using useMemo for performance
// Nits menores - 🟢
🟢 NIT: Prefer const over let for immutable variable
// Preguntas - ❓
❓ QUESTION: What happens if user is null here?
// Convenciones de lenguaje - ⚙️
⚙️ CONVENTION: snake_case is used for functions in Python, not camelCase
| Check | Question |
|---|---|
| ✅ | Naming follows language conventions? |
| ✅ | Security issues addressed? |
| ✅ | Error handling in place? |
| ✅ | Tests added/updated? |
| ✅ | No obvious bugs? |
| ✅ | Code is maintainable? |
Remember: A good code review adapts to the language's conventions. Don't enforce JavaScript conventions on Python code, or vice versa. Follow the idioms of the language being reviewed.