Skip to content

foryourhealth111-pixel/Vibe-Skills / bundled/skills/code-reviewer

code-reviewer

Verified

Default code-quality route for broad code review, PR review, maintainability, correctness, and regression-risk checks. Do not use as the primary route for dedicated OWASP/security audits, review-feedback handling, completion verification, AI-code cleanup, or TDD/test-first work.

scripts/check_style.py

View on GitHub
#!/usr/bin/env python3
"""Check Python code for style issues.

Usage:
    echo "code here" | ./check_style.py
    ./check_style.py "def foo(): pass"
"""

import json
import sys


def check_style(code: str) -> dict:
    """Check code for common style issues."""
    issues = []
    lines = code.split("\n")

    for i, line in enumerate(lines, 1):
        # Check line length
        if len(line) > 100:
            issues.append(
                {"line": i, "issue": f"Line exceeds 100 characters ({len(line)})"}
            )

        # Check trailing whitespace
        if line.endswith(" ") or line.endswith("\t"):
            issues.append({"line": i, "issue": "Trailing whitespace"})

        # Check for camelCase variables (simple heuristic)
        if "=" in line and not line.strip().startswith("#"):
            var = line.split("=")[0].strip()
            if (
                any(c.isupper() for c in var)
                and "_" not in var
                and not var[0].isupper()
            ):
                issues.append(
                    {
                        "line": i,
                        "issue": f"Possible camelCase: '{var}' - use snake_case",
                    }
                )

        # Check for single-letter variables
        if "=" in line:
            var = line.split("=")[0].strip()
            if len(var) == 1 and var not in "ijkxyz_":
                issues.append(
                    {
                        "line": i,
                        "issue": f"Single-letter variable '{var}' - use descriptive name",
                    }
                )

    return {
        "total_issues": len(issues),
        "issues": issues,
        "passed": len(issues) == 0,
    }


if __name__ == "__main__":
    try:
        if len(sys.argv) > 1:
            code = sys.argv[1]
        else:
            code = sys.stdin.read()

        result = check_style(code)
        print(json.dumps(result, indent=2))
    except Exception as e:
        print(json.dumps({"error": str(e)}))
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall