skills/barnhardt-enterprises-inc/code-review-standards/SKILL.md
Code review framework and criteria. References security-sentinel for security checks. Use when performing code reviews or defining review standards.
npx skillsauth add aiskillstore/marketplace code-review-standardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Code review standards ensure consistent, thorough reviews that catch bugs before they reach production. This skill aggregates criteria from specialized skills.
CRITICAL 🔴 - Must fix before merge
HIGH 🟠 - Should fix before merge
MEDIUM 🟡 - Fix soon (can merge with plan)
LOW 🟢 - Nice to have
→ See: correctness-criteria.md
→ See: security-sentinel skill → See: security-checklist.md
CRITICAL - Must check every review:
For complete security criteria: → security-sentinel/SKILL.md
→ See: typescript-strict-guard skill
any types@ts-ignore without extensive comment! non-null assertions without comment→ See: quality-gates/test-patterns.md
→ See: performance-criteria.md
→ See: maintainability-rules.md
→ See: architecture-patterns skill
For ALL PRs:
For Auth/API/Data PRs:
→ security-checklist.md
Use severity levels and templates: → review-templates.md
Format:
## 🔴 CRITICAL Issues
- [ ] [Security] Hardcoded API key in auth.ts:45
- **Risk**: API key exposed in version control
- **Fix**: Move to environment variable
- **File**: src/lib/auth.ts:45
## 🟠 HIGH Issues
- [ ] [TypeScript] Using `any` type in processData()
- **Issue**: No type safety
- **Fix**: Define explicit interface
- **File**: src/utils/process.ts:12
## 🟡 MEDIUM Issues
- [ ] [Testing] Missing tests for error cases
- **Coverage**: Only happy path tested
- **Needed**: Test null input, invalid format
- **File**: tests/unit/process.test.ts
## 🟢 LOW Issues / Suggestions
- Consider extracting helper function for readability
Choose one:
🔴 **[Security] [Vulnerability Type]**
**Location**: `src/path/file.ts:123`
**Issue**: [Description of vulnerability]
**Risk**: [What could go wrong]
**Fix**:
```typescript
// Suggested fix
Reference: [OWASP link or skill reference]
### TypeScript Issue Template
```markdown
🟠 **[TypeScript] [Issue Type]**
**Location**: `src/path/file.ts:45`
**Issue**: [What's wrong]
**Fix**:
```typescript
// Current (bad)
function process(data: any) { }
// Suggested (good)
function process(data: ProcessData): ProcessedResult { }
Reference: typescript-strict-guard skill
### Performance Issue Template
```markdown
🟡 **[Performance] [Issue Type]**
**Location**: `src/path/file.ts:78`
**Issue**: N+1 query problem in getUserProjects()
**Impact**: Linear time complexity, slow for large datasets
**Fix**:
```typescript
// Use join instead of separate queries
const projects = await db
.select()
.from(projectsTable)
.leftJoin(usersTable, eq(projectsTable.userId, usersTable.id))
---
## Common Review Patterns
### Code Smells
**Long Functions**
```typescript
// 🔴 BAD: 100+ line function
function processEverything() {
// ... 100 lines
}
// ✅ GOOD: Extracted helpers
function processEverything() {
const validated = validateInput()
const processed = processData(validated)
const saved = saveToDatabase(processed)
return saved
}
Deeply Nested Logic
// 🔴 BAD: 4+ levels of nesting
if (user) {
if (user.projects) {
if (user.projects.length > 0) {
if (user.projects[0].status === 'active') {
// ...
}
}
}
}
// ✅ GOOD: Early returns
if (!user) return
if (!user.projects || user.projects.length === 0) return
if (user.projects[0].status !== 'active') return
// ...
Magic Numbers
// 🔴 BAD: Unexplained numbers
setTimeout(callback, 3600000)
// ✅ GOOD: Named constants
const ONE_HOUR_MS = 60 * 60 * 1000
setTimeout(callback, ONE_HOUR_MS)
Code review aggregates criteria from:
# Code Review: Add User Authentication
## Summary
Adds JWT-based authentication with login/logout endpoints.
## 🔴 CRITICAL Issues
### 1. Hardcoded JWT Secret
**File**: `src/lib/auth.ts:12`
**Issue**: JWT secret is hardcoded as "secret123"
**Risk**: Anyone can forge JWTs
**Fix**:
```typescript
- const secret = "secret123"
+ const secret = process.env.JWT_SECRET
+ if (!secret) throw new Error('JWT_SECRET not set')
File: src/app/api/auth/login/route.ts:15
Issue: User input not validated before use
Fix: Add Zod schema validation
const loginSchema = z.object({
email: z.string().email(),
password: z.string().min(8),
})
const validated = loginSchema.parse(body)
File: tests/integration/auth.test.ts
Issue: No tests for error cases
Needed:
🔄 REQUEST CHANGES - Fix critical and high issues before merge.
Once fixed, this will be a solid authentication implementation.
---
## See Also
- security-checklist.md - OWASP Top 10 checklist
- performance-criteria.md - Performance review guide
- maintainability-rules.md - Code quality rules
- review-templates.md - Feedback templates
- ../security-sentinel/SKILL.md - Security patterns
- ../quality-gates/SKILL.md - Quality framework
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.