一键导入
roastme
Brutally honest critique of code and architecture: overengineering, security flaws, maintainability issues, poor UX, and scalability problems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Brutally honest critique of code and architecture: overengineering, security flaws, maintainability issues, poor UX, and scalability problems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Communicate efficiently without sacrificing clarity - natural, concise, actionable. Global skill loaded for every command and agent.
Use when reviewing or building UI components - ensures keyboard, screen-reader, and visual accessibility (WCAG 2.1 AA) so a11y is built in, not retrofitted.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Manages context caching to optimize token usage and cost by creating, incrementally updating, and invalidating caches while verifying integrity before reuse.
Clean code and engineering discipline: modularity, readability, sizing, naming, duplication, separation of concerns, plus the four behavioral principles - think before coding, simplicity first, surgical changes, and goal-driven execution. Global skill applied to all coding work.
Detects and resolves drift between code, documentation, and contextual knowledge, classifying each drift and recommending concrete sync actions to keep artifacts consistent.
| name | roastme |
| description | Brutally honest critique of code and architecture: overengineering, security flaws, maintainability issues, poor UX, and scalability problems. |
Provide unfiltered, brutally honest assessment of code quality, architecture decisions, and implementation choices.
Identify problems that polite reviews miss by:
Philosophy: Honest feedback now prevents production disasters later. Be direct, be specific, be constructive.
This skill is automatically selected by the orchestrator when:
Look for unnecessary complexity:
Identify vulnerabilities and risks:
Find future maintenance nightmares:
Evaluate user experience problems:
Question whether this will scale:
Be direct, specific, and evidence-based:
🔥 Overengineering:
❌ AbstractFactoryBuilderProvider pattern for a single implementation
→ Why: You have ONE user service. You don't need an abstraction layer.
→ Fix: Delete the interface, use the concrete class directly
→ Saved: 200 lines of pointless code
❌ Custom state management library
→ Why: React's useState is right there and does what you need
→ Fix: Delete 500 lines of custom state code, use useState
→ Saved: Maintenance nightmare avoided
🔒 Security Issues:
🚨 CRITICAL: SQL injection in user search
→ Line 45: `db.query(`SELECT * FROM users WHERE name = '${input}'`)`
→ Exploit: Input "'; DROP TABLE users; --" and game over
→ Fix: Use parameterized queries immediately
🚨 HIGH: Password stored in plain text
→ File: lib/auth.ts, line 23
→ Risk: One database breach = all passwords exposed
→ Fix: Use bcrypt to hash passwords before storage
⚠️ MEDIUM: API keys in frontend code
→ File: src/api/config.ts
→ Risk: Anyone can extract and abuse your API keys
→ Fix: Move to backend, use backend proxy for API calls
🔧 Maintainability Problems:
💩 Function from hell: processUserData() is 450 lines
→ Why: Does validation, transformation, database writes, email sending
→ Impact: Impossible to test, understand, or modify
→ Fix: Split into: validateUser(), transformUser(), saveUser(), notifyUser()
💩 Variable names like 'd', 'tmp', 'data2', 'userThing'
→ Why: Code reads like cryptography
→ Impact: Every developer wastes mental energy decoding
→ Fix: Name things what they are: parsedUserData, validationErrors, etc.
💩 No error handling anywhere
→ Impact: Silent failures, no debugging info, unhelpful crashes
→ Fix: Add try/catch, proper error types, logging
😖 UX Issues:
❌ Error message: "Error 500"
→ User sees: Cryptic tech jargon, no action to take
→ Should be: "Couldn't save your changes. Please try again."
❌ No loading state on form submit
→ User experience: Click button → nothing happens → click again → duplicate submission
→ Fix: Add loading spinner, disable button during submission
❌ Form loses all data on validation error
→ User experience: Fill 20 fields → one error → start over
→ Fix: Preserve form state, highlight specific error
📈 Scalability Red Flags:
⚠️ Loading all users into memory
→ Current: Works for 100 users
→ At 10,000 users: App crashes
→ Fix: Add pagination, load only what's needed
⚠️ N+1 query problem in getUserPosts()
→ Current: 1 query for user + N queries for N posts
→ At scale: 1000 posts = 1001 database queries
→ Fix: Use JOIN or eager loading, 1 query total
⚠️ Synchronous image processing blocks request
→ Current: User waits 10 seconds for upload to process
→ At scale: Server handles 1 request at a time
→ Fix: Queue background job, return immediately
🚨 CRITICAL:
❌ HIGH:
⚠️ MEDIUM:
💩 LOW:
No Sacred Cows:
Simplicity Wins:
Reality Check:
Overengineering:
Security:
Maintainability:
UX:
Scalability:
Code:
// UserService.ts
export class AbstractUserServiceFactoryProvider {
async processUserData(d: any) {
// 450 lines of everything
const sql = `SELECT * FROM users WHERE id = '${d.id}'`;
const result = await db.query(sql);
// ... no error handling
return result;
}
}
Roast:
🔥 This code is a greatest hits of bad decisions:
🚨 CRITICAL: SQL injection (line 4)
→ Using string interpolation in SQL query
→ Anyone can delete your entire database
→ FIX NOW: db.query('SELECT * FROM users WHERE id = ?', [d.id])
💩 Absurd class name: AbstractUserServiceFactoryProvider
→ This isn't enterprise Java, it's a Node app
→ You have ONE implementation. Delete the abstraction.
→ Rename to: UserService
💩 Parameter named 'd' with type 'any'
→ 'd' tells me nothing, 'any' defeats TypeScript
→ Fix: processUserData(userData: UserData)
💩 450-line function does everything
→ Validation, queries, updates, emails, logging
→ Impossible to test or understand
→ Split into focused functions
💩 Zero error handling
→ Database down? Silent failure.
→ Invalid data? Silent failure.
→ Add try/catch and proper error handling
The good news: Rewriting this takes 30 minutes and prevents a production disaster.
Do:
Don't:
After the roast, acknowledge good decisions:
✅ Good decisions:
- Type definitions are comprehensive
- Test coverage on critical paths
- Following consistent code style
- Good separation of concerns in API layer
Balance is important: be honest about problems, fair about strengths.