| name | code-quality |
| description | | Use when this capability is needed. |
Code Quality Skill
Review Criteria
1. Correctness
2. Readability
3. Security
4. Performance
5. Maintainability
Common Issues
Security
db.query(`SELECT * FROM users WHERE id = ${req.params.id}`);
db.query('SELECT * FROM users WHERE id = $1', [req.params.id]);
html = `<div>${userInput}</div>`;
html = `<div>${escapeHtml(userInput)}</div>`;
Performance
for (const user of users) {
user.posts = await db.query('SELECT * FROM posts WHERE user_id = $1', [user.id]);
}
const posts = await db.query('SELECT * FROM posts WHERE user_id = ANY($1)', [userIds]);
Readability
const d = new Date();
const x = u.map(i => i.n);
const currentDate = new Date();
const userNames = users.map(user => user.name);
Code Review Checklist
Converted and distributed by TomeVault — claim your Tome and manage your conversions.