source-command-audit
Use this skill when the user asks to run the migrated source command audit.
Command Template
Audit: Comprehensive Problem Discovery
Scan the entire project for issues. Find problems, don't fix them. Open GitHub issues for everything found.
Rule: DO NOT fix anything. Only discover and document.
Scan Areas
1. Code Quality
- Dead code, unused imports, unreachable code
- TODOs, FIXMEs, HACKs left in code
- Weak typing (
any, missing types, unsafe casts)
- Hardcoded values that should be config
- Debug artifacts in production (console.logs, commented code)
- Copy-paste duplication (DRY violations)
- Overly complex functions/files (hard to understand at a glance)
- Missing or inconsistent error handling
- Naming that doesn't convey intent
- Outdated or vulnerable dependencies
2. Business Logic Correctness
Code-correct ≠ Business-correct. Review business rules in the code.
- Region/locale logic: Does HK user see HK-specific data? (not China's 五險三金)
- Currency handling: Correct currency for user's region?
- Date/time: Timezone handling, week start day, date formats
- Tax/legal: Region-specific rules applied correctly?
- Permissions: Do access rules make business sense?
- Calculations: Business formulas correct? (not just mathematically)
- State machines: Valid business state transitions only?
- Validation rules: Match real-world business constraints?
- Default values: Sensible for the business context?
- Edge cases: Business-impossible states prevented?
3. Architecture
- Circular dependencies
- God objects/files doing too much
- Tight coupling between modules
- Missing abstractions
- Leaky abstractions
- Single points of failure
- Missing SSOT (multiple sources of truth)
- Inconsistent patterns across codebase
4. UI/UX Issues
- Confusing user flows
- Missing loading states (use skeleton, not spinner)
- Missing error states (with recovery actions)
- Missing empty states (with guidance)
- Inconsistent spacing/typography
- Non-responsive layouts
- Accessibility violations (contrast, keyboard nav, screen reader)
- Missing feedback on user actions
- Unclear CTAs or labels
- Information overload
5. Modern UI Patterns (Lack of)
- No inline editing (everything requires modal/page)
- No drag & drop where it makes sense
- No undo capability (destructive actions are permanent)
- No auto-save (users must remember to save)
- No keyboard shortcuts for power users
- No command palette (⌘K) for quick navigation
- Outdated inputs (dropdowns instead of combobox with search)
- No optimistic UI (waiting for server on every action)
- Jarring transitions (no smooth state changes)
6. Product Design
- Unclear value proposition
- Friction in core user journey
- Missing onboarding guidance
- Features that don't serve business goals
- Confusing navigation structure
- Missing progressive disclosure
- Power user needs unmet
- Beginner barriers too high
7. Performance
- Slow page loads
- Unnecessary re-renders
- Large bundle sizes
- Missing lazy loading
- N+1 queries
- Missing caching opportunities
- Unoptimized images/assets
8. Security
- Exposed secrets or credentials
- Missing input validation
- XSS vulnerabilities
- CSRF vulnerabilities
- Insecure dependencies
- Missing rate limiting
- Overly permissive CORS
9. Developer Experience
- Missing or outdated documentation
- Unclear setup instructions
- Flaky or missing tests
- Slow CI/CD pipeline
- Missing type definitions
- Confusing folder structure
10. Public-Facing & Exposure
- SEO: Missing/poor title tags, meta descriptions, structured data
- Social Sharing: Missing OG tags, Twitter cards, poor share previews
- Landing/Home: Unclear value prop above the fold, weak CTAs
- README: Missing badges, unclear quick start, no screenshots
- Docs: Incomplete, outdated, hard to navigate
- Analytics: Missing tracking, no conversion funnels
- Branding: Inconsistent voice, visuals, messaging
Process
- Scan each area systematically
- Document every issue found with:
- Clear description of the problem
- Location (file, line, or area)
- Impact (High/Medium/Low)
- Category label
- DO NOT attempt any fixes
- Open GitHub issues for each problem found
Issue Format
gh issue create --title "[Category] Brief description" --body "$(cat <<'EOF'
## Problem
What is wrong and where.
## Impact
Why this matters. What could go wrong.
## Evidence
Code snippets, screenshots, or specific locations.
## Suggested Category
- [ ] Bug
- [ ] Tech Debt
- [ ] UX Issue
- [ ] Performance
- [ ] Security
- [ ] Documentation
EOF
)" --label "audit"
Output
After scanning, report:
Summary
| Category |
Issues Found |
High |
Medium |
Low |
| Code |
... |
... |
... |
... |
| UI/UX |
... |
... |
... |
... |
| ... |
... |
... |
... |
... |
Issues Created
- #123 [Code] Description...
- #124 [UX] Description...
- ...
Critical Issues (need immediate attention)
Mindset
- Be thorough, not selective
- No issue is too small to document
- Assume nothing is perfect
- Fresh eyes find more problems
- The goal is awareness, not judgment
- Better to over-report than miss something
1---2name: source-command-audit3description: Find all problems in the project - design, code, UX - and open issues4---56# source-command-audit78Use this skill when the user asks to run the migrated source command `audit`.910## Command Template1112# Audit: Comprehensive Problem Discovery1314Scan the entire project for issues. Find problems, don't fix them. Open GitHub issues for everything found.1516**Rule: DO NOT fix anything. Only discover and document.**1718## Scan Areas1920### 1. Code Quality21- Dead code, unused imports, unreachable code22- TODOs, FIXMEs, HACKs left in code23- Weak typing (`any`, missing types, unsafe casts)24- Hardcoded values that should be config25- Debug artifacts in production (console.logs, commented code)26- Copy-paste duplication (DRY violations)27- Overly complex functions/files (hard to understand at a glance)28- Missing or inconsistent error handling29- Naming that doesn't convey intent30- Outdated or vulnerable dependencies3132### 2. Business Logic Correctness3334**Code-correct ≠ Business-correct. Review business rules in the code.**3536- Region/locale logic: Does HK user see HK-specific data? (not China's 五險三金)37- Currency handling: Correct currency for user's region?38- Date/time: Timezone handling, week start day, date formats39- Tax/legal: Region-specific rules applied correctly?40- Permissions: Do access rules make business sense?41- Calculations: Business formulas correct? (not just mathematically)42- State machines: Valid business state transitions only?43- Validation rules: Match real-world business constraints?44- Default values: Sensible for the business context?45- Edge cases: Business-impossible states prevented?4647### 3. Architecture48- Circular dependencies49- God objects/files doing too much50- Tight coupling between modules51- Missing abstractions52- Leaky abstractions53- Single points of failure54- Missing SSOT (multiple sources of truth)55- Inconsistent patterns across codebase5657### 4. UI/UX Issues58- Confusing user flows59- Missing loading states (use skeleton, not spinner)60- Missing error states (with recovery actions)61- Missing empty states (with guidance)62- Inconsistent spacing/typography63- Non-responsive layouts64- Accessibility violations (contrast, keyboard nav, screen reader)65- Missing feedback on user actions66- Unclear CTAs or labels67- Information overload6869### 5. Modern UI Patterns (Lack of)70- No inline editing (everything requires modal/page)71- No drag & drop where it makes sense72- No undo capability (destructive actions are permanent)73- No auto-save (users must remember to save)74- No keyboard shortcuts for power users75- No command palette (⌘K) for quick navigation76- Outdated inputs (dropdowns instead of combobox with search)77- No optimistic UI (waiting for server on every action)78- Jarring transitions (no smooth state changes)7980### 6. Product Design81- Unclear value proposition82- Friction in core user journey83- Missing onboarding guidance84- Features that don't serve business goals85- Confusing navigation structure86- Missing progressive disclosure87- Power user needs unmet88- Beginner barriers too high8990### 7. Performance91- Slow page loads92- Unnecessary re-renders93- Large bundle sizes94- Missing lazy loading95- N+1 queries96- Missing caching opportunities97- Unoptimized images/assets9899### 8. Security100- Exposed secrets or credentials101- Missing input validation102- XSS vulnerabilities103- CSRF vulnerabilities104- Insecure dependencies105- Missing rate limiting106- Overly permissive CORS107108### 9. Developer Experience109- Missing or outdated documentation110- Unclear setup instructions111- Flaky or missing tests112- Slow CI/CD pipeline113- Missing type definitions114- Confusing folder structure115116### 10. Public-Facing & Exposure117- **SEO**: Missing/poor title tags, meta descriptions, structured data118- **Social Sharing**: Missing OG tags, Twitter cards, poor share previews119- **Landing/Home**: Unclear value prop above the fold, weak CTAs120- **README**: Missing badges, unclear quick start, no screenshots121- **Docs**: Incomplete, outdated, hard to navigate122- **Analytics**: Missing tracking, no conversion funnels123- **Branding**: Inconsistent voice, visuals, messaging124125## Process1261271. **Scan** each area systematically1282. **Document** every issue found with:129 - Clear description of the problem130 - Location (file, line, or area)131 - Impact (High/Medium/Low)132 - Category label1333. **DO NOT** attempt any fixes1344. **Open GitHub issues** for each problem found135136## Issue Format137138```bash139gh issue create --title "[Category] Brief description" --body "$(cat <<'EOF'140## Problem141What is wrong and where.142143## Impact144Why this matters. What could go wrong.145146## Evidence147Code snippets, screenshots, or specific locations.148149## Suggested Category150- [ ] Bug151- [ ] Tech Debt152- [ ] UX Issue153- [ ] Performance154- [ ] Security155- [ ] Documentation156EOF157)" --label "audit"158```159160## Output161162After scanning, report:163164### Summary165| Category | Issues Found | High | Medium | Low |166|----------|--------------|------|--------|-----|167| Code | ... | ... | ... | ... |168| UI/UX | ... | ... | ... | ... |169| ... | ... | ... | ... | ... |170171### Issues Created172- #123 [Code] Description...173- #124 [UX] Description...174- ...175176### Critical Issues (need immediate attention)177- ...178179## Mindset180181* Be thorough, not selective182* No issue is too small to document183* Assume nothing is perfect184* Fresh eyes find more problems185* The goal is awareness, not judgment186* Better to over-report than miss something