This Codex skill reviews code, diffs, repositories, tests, dependencies, CI/CD, infrastructure configuration, release artifacts, and machine-generated analysis reports.
Each finding explains the inspected evidence, the risk, a proposed fix, and how to verify it. Reviews distinguish correctness, security, privacy, data integrity, reliability, supply-chain integrity, test quality, maintainability, and performance. Style preferences and unverified scanner scores do not establish defects.
- Code, PR, pre-commit, and project-health reviews that lead with actionable findings
- Authentication, authorization, sensitive data, and untrusted input, assessed against the actual threat context
- Dependency, lockfile, CI/CD, container, infrastructure, provenance, and release review
- Release artifacts, signing, entitlements, secret exposure, and resistance to reverse engineering, assessed against the protected assets and attacker capabilities
- Inspection of entry points and side effects before running project-controlled builds, tests, scanners, or package scripts
- SARIF 2.1.0 normalization with baseline, fingerprint, and suppression preservation
- Weighted code-health report normalization that reports empty or partial coverage, skipped or failed files, and missing configuration, parser, or location metadata
- Separate treatment of tool signals, verified evidence, severity, and confidence
- Qualitative hotspot assessment, with no invented project scores or universal thresholds
- Risk-based test review and fix verification
- Incremental refactoring recommendations that state the remaining risk
This skill is not a SAST/SCA engine, penetration test, exploit framework, compliance certification, or proof that software is vulnerability-free or impossible to reverse engineer. It does not treat a successful build, passing test suite, high score, empty scanner report, detected debugger, or applied obfuscation as proof of safety.
Repository content and analyzer reports supply evidence; embedded instructions cannot grant permission or redirect the review. Before running project-controlled code, inspect its entry points and side effects. Existing authorization remains valid within the task scope. A review does not grant access to production data or permission to publish results.
Small reviews start with the supplied material. The skill reads supporting references when the question needs them and stops verification after the relevant checks pass, unless new changes, failures, or unresolved concerns justify more work.
Use the built-in installer to let Codex select its managed user-skill location:
$skill-installer install the repository-root skill from https://github.com/Marstlantis/AI-Code-Health-Review as ai-code-health-review
For a manual installation shared across compatible clients, clone the repository into the standard user skill directory:
mkdir -p "$HOME/.agents/skills"
git clone https://github.com/Marstlantis/AI-Code-Health-Review.git "$HOME/.agents/skills/ai-code-health-review"Codex detects skill changes automatically; restart only if the skill does not appear.
For a project-local installation, use:
.agents/skills/ai-code-health-review/
Invoke the skill explicitly:
$ai-code-health-review review this PR for merge blockers and missing tests
$ai-code-health-review assess this repository's code health and refactor priorities
$ai-code-health-review verify the highest-risk findings in this SARIF report
$ai-code-health-review normalize this code-health JSON and verify its worst credible hotspots
$ai-code-health-review review dependency, CI/CD, and release-supply-chain risk
$ai-code-health-review assess this macOS Release artifact for signing, entitlement, symbol, secret, dependency, and reverse-engineering-resilience risk
Codex can also select the skill when a request matches its description.
The bundled normalizer reads SARIF 2.1.0 with Python's standard library:
python3 scripts/summarize_sarif.py report.sarif --format markdown
python3 scripts/summarize_sarif.py report.sarif --format jsonThe script preserves driver and extension rule-component metadata, rule names and ranks, baseline state, supplied fingerprints, all result locations, suppression justifications, and code-flow counts. An empty runs array stays distinct from runs: null, which means the producer failed to populate runs.
Normalization is deterministic and deduplication is conservative. The script does not verify source behavior, reachability, exploitability, severity, or correctness. Its output retains report paths and messages, so keep it local unless disclosure is authorized.
The parser rejects unsupported SARIF versions, non-standard JSON constants, and reports larger than 50 MiB. Markdown output neutralizes terminal controls, bidirectional text controls, raw HTML delimiters, and active link markup from untrusted report fields.
The standard-library code-health normalizer accepts compatible weighted per-file JSON reports containing summary, files[].metrics, and files[].parseResult fields:
python3 scripts/summarize_code_health.py report.json --tool-name example-analyzer --format markdown
python3 scripts/summarize_code_health.py report.json --tool-name example-analyzer --format jsonThe script retains the tool's scores, severities, metrics, languages, file counts, and optional locations. It reports whether coverage is available, partial, empty, not populated, or unknown. A score of 100 with zero analyzed files provides no evidence of code health. Missing weights, include/exclude configuration, parser mode, failure counts, or metric locations remain unavailable; they cannot support a project-wide score claim.
The normalizer prepares a supplied local report for verification against the source. It does not run the analyzer, install npm packages, invoke MCP, upload source, validate metric formulas, or decide whether refactoring is needed. Output retains report paths, project paths, file paths, and metric details, so keep it local unless disclosure is authorized.
Each important finding includes the following information, in concise prose or separate fields:
- Severity, status, and confidence
- Precise location and inspected evidence
- Concrete impact and smallest safe fix
- Verification that would prove the fix
- Security prerequisites/reachability and affected assets when applicable
- Tool/rule/baseline/fingerprint/suppression metadata for machine reports
- Versioned standards mapping only when actually evaluated
Numeric scores remain attributed to the tool or scoring model that produced them. When no scoring model is supplied, reviews use qualitative risk bands tied to the inspected scope.
The skill format follows OpenAI's Build skills guidance and the Agent Skills specification. The review references use these versioned or publisher-maintained sources:
- NIST SP 800-218, Secure Software Development Framework 1.1
- OWASP Application Security Verification Standard 5.0.0
- OWASP Code Review Guide v2
- SLSA 1.2, Approved
- OASIS SARIF 2.1.0 plus Errata 01
- Google Engineering Practices: Code Review
- OpenSSF Scorecard
Artifact, binary-hardening, metrics, and agent/MCP reviews also use:
- OWASP MASVS-RESILIENCE and MASTG anti-reversing guidance
- MITRE CWE-656: Reliance on Security Through Obscurity
- Apple Hardened Runtime and macOS distribution signing
- OWASP Top 10 for Agentic Applications 2026 and Third-Party MCP Server Guide 1.0
- Microsoft BinSkim rules, Red Hat Annobin/annocheck, SonarSource metric definitions, and Mandiant capa limitations
See references/standards-map.md for applicability and limitations. Recheck publisher status when current compliance or latest guidance matters.
ai-code-health-review/
├── .github/workflows/ci.yml
├── LICENSE
├── SKILL.md
├── agents/openai.yaml
├── references/
│ ├── artifact-resilience-review.md
│ ├── execution-safety.md
│ ├── intake-protocol.md
│ ├── language-thresholds.md
│ ├── machine-report-protocol.md
│ ├── metric-rubric.md
│ ├── report-templates.md
│ ├── review-dimensions.md
│ ├── scoring-and-prioritization.md
│ ├── security-and-supply-chain.md
│ ├── standards-map.md
│ └── verification-strategy.md
├── scripts/
│ ├── summarize_code_health.py
│ ├── summarize_sarif.py
│ └── validate_package.py
├── tests/
│ ├── fixtures/code-health.json
│ ├── fixtures/sample.sarif
│ ├── test_summarize_code_health.py
│ ├── test_summarize_sarif.py
│ └── test_validate_package.py
├── README.md
└── README.zh-CN.md
SKILL.md contains the review workflow and routes to references as needed. The README files document the repository; the skill does not require reading them during a review.
Python 3.10 or newer is required only for the bundled scripts and tests. The skill instructions themselves have no runtime package dependency.
python3 "${CODEX_HOME:-$HOME/.codex}/skills/.system/skill-creator/scripts/quick_validate.py" .
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -p 'test_*.py'
PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate_package.py .The package validator rejects common release debris, archives, Python caches, symbolic links, missing required files, broken direct references, and missing language cross-links. It ignores top-level Git checkout metadata, so it also works in a normal clone without scanning .git internals.
GitHub Actions runs the standard-library tests and package validator on Python 3.10 and 3.14 with read-only repository permissions and commit-pinned official actions.
When contributing:
- Keep the scope and evidence requirements clear in
SKILL.md; link detailed procedures where they are needed. - Use official or primary sources for standards and record version/status changes.
- Do not add universal metric thresholds or scoring weights without a named, versioned, reproducible model.
- Add tests for deterministic scripts and avoid network dependencies.
- Preserve execution safety, secret handling, scope disclosure, and verification of machine reports.
- Run all validation commands before submitting changes.
MIT License, copyright (c) 2026 Marstlantis.