code-quality
Validate code quality using certainty-graded rules. Detect AI artifacts, anti-patterns, and b00t violations. Reports auto-fixable vs review-required findings.
What this skill does
# Code Quality Rules Uses certainty-grade framework. Runs deterministic checks first (code), AI analysis second (reasoning). ## Steps 1. Run HIGH certainty checks (no AI needed). # output: high_findings[] 2. Run MEDIUM certainty checks (heuristics). # output: medium_findings[] 3. Run LOW certainty checks (AI judgment). # output: low_findings[] 4. Apply certainty-grade to each finding. 5. Group: auto-fixable (HIGH) vs needs-review (MEDIUM) vs human-gate (LOW). 6. Report summary with counts. ## HIGH Certainty Rules (Deterministic) **AI Artifact Detection:** - `console.log(` / `print(` / `println!(` in non-test code - `TODO`, `FIXME`, `HACK`, `XXX` comments without issue reference - `debugger;` statements - Placeholder values: `"TODO"`, `"FIXME"`, `"placeholder"`, `"example.com"` - Commented-out code blocks (3+ consecutive commented lines) **b00t Violations:** - Direct `pip install` (MUST use `uv pip install`) - `docker run` without podman (MUST use `podman`) - Raw templates read without `b00t learn` - Hardcoded API keys or secrets (entropy check) **Language-Specific:** - `unwrap()` in Rust production code (outside tests) - `except: pass` in Python - `any` type in TypeScript without justification comment ## MEDIUM Certainty Rules (Heuristic) **Documentation Ratios:** - Functions >20 lines without docstring/comments - Public API without documentation - File doc ratio < 10% (comment lines / total lines) **Code Smell Patterns:** - Functions >50 lines (single responsibility violation) - Nesting depth >4 (cognitive complexity) - Duplicate code blocks (>10 identical lines across files) - Magic numbers without named constants **b00t Alignment:** - Missing `# ๐ค` tribal knowledge on non-idiomatic patterns - Missing error handling at system boundaries - Tests that mock internal code (MUST mock at system boundary only) ## LOW Certainty Rules (AI Judgment) - Variable/function naming clarity relative to domain - Algorithm choice vs alternative approaches - Missing edge case handling (contextual) - Architectural concerns (tight coupling, abstraction leaks) ## Output Format ``` Code Quality Report: <file/scope> โโโโโโโโโโโโโโโโโโโโโโโโโโโโ [HIGH] 3 findings โ auto-fixable โ console.log() at src/app.ts:12 โ TODO without issue at lib/utils.rs:88 โ unwrap() in production at src/main.rs:45 [MEDIUM] 2 findings โ needs review โ process_data() at src/etl.py:100 โ 67 lines, consider split โ public fn without docs at src/api.rs:23 [LOW] 1 finding โ human gate ? naming: `handle_thing()` may be ambiguous in payment context Auto-fix available: 3 | Review required: 2 | Human approval: 1 ``` ## Integration Invoke via: `/next-task` (pre-merge gate), inline during implementation. All fixes apply certainty-grade before executing.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.