# Code Analyzer

> Read-only code analysis for architecture review and code quality assessment. Use when reviewing PRs or analyzing codebase structure.

- Skill: `duboc/code-analyzer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add duboc/code-analyzer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/duboc/code-analyzer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: duboc (https://skillmd.com/u/duboc)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/duboc/code-analyzer

---


# Code Analyzer (Read-Only)

## Instructions
Perform comprehensive code analysis without modifying any files.

## Review Checklist

### 1. Code Organization and Structure
- [ ] Follows project directory conventions
- [ ] Proper separation of concerns
- [ ] Appropriate file naming
- [ ] Logical grouping of related code

### 2. Error Handling Patterns
- [ ] Uses typed errors (LocalizedError)
- [ ] Proper error propagation
- [ ] User-facing error messages are clear
- [ ] No silent failures

### 3. Performance Considerations
- [ ] No N+1 query patterns
- [ ] Appropriate use of lazy loading
- [ ] Memory-efficient data structures
- [ ] Proper use of MainActor isolation

### 4. Security Concerns
- [ ] No hardcoded secrets
- [ ] Proper data validation
- [ ] Secure storage for sensitive data (Keychain)
- [ ] Input sanitization

### 5. Test Coverage Gaps
- [ ] Critical paths have tests
- [ ] Edge cases considered
- [ ] Mock dependencies properly

### 6. Swift Best Practices
- [ ] Swift 6 concurrency compliance
- [ ] Proper use of optionals
- [ ] Value types over reference types where appropriate
- [ ] API design guidelines followed

## Output Format
Provide detailed feedback organized by category with:
- Issue description
- Location (file:line)
- Severity (Critical/Warning/Suggestion)
- Recommended fix

