AI Code Quality Gate - Detect AI Defects

VerifiedCaution

AI code quality gate that detects hallucinated imports, phantom packages, stale APIs, and AI-specific code defects. Supports TypeScript, JavaScript, Python, Java, Go, Kotlin.

Sby Skills Guide Bot
DevelopmentIntermediate
7/28/2026
Claude CodeCursorWindsurf
#code-review#static-analysis#ai-generated-code#dependency-audit#hallucination-detection

Recommended for

Automated summary

A code quality gate that relies on the Open Code Review MCP server to catch defects typical of AI-generated code: hallucinated imports, phantom packages, stale APIs and dead code paths.

Strengths

  • Targets defect classes that ordinary linters miss, such as hallucinated imports and phantom packages
  • Validates imports against dependency manifests (package.json, requirements.txt, pom.xml) when the project root is scanned
  • Offers diff scanning for fast pull-request feedback, plus per-issue explanations and fix suggestions
  • Returns a severity-ranked report (critical / warning / info) that plugs straight into a review workflow

Limitations

  • Requires the @opencodereview/mcp-server MCP server; without it none of the scan tools are available
  • The heal_code auto-fix must be reviewed before committing — the skill itself advises using it sparingly
  • Language coverage is limited to six: TypeScript, JavaScript, Python, Java, Go and Kotlin
When to use it

Use it to vet AI-generated code before merging, audit a project's imports and dependencies, or gate a pull-request diff on code quality.

When not to use it

Avoid relying on it alone for languages outside its six supported ones (Rust, C++, Ruby…) or as a substitute for a type checker and a full test suite.

Security analysis

Caution
Quality score85/100

The skill contains no destructive, obfuscated, or exfiltration instructions, but it delegates scanning and auto-fixing to an external MCP server and can modify source files through heal_code. These are legitimate developer-tool capabilities, so the risk is moderate rather than malicious.

Findings
  • •Relies on an external MCP server package (@opencodereview/mcp-server) that is not vendored or verified in the skill
  • •Includes a heal_code tool that can automatically modify source files; users should review changes before committing
How this analysis is made

Examples

Scan a project before merging
Scan the codebase at /Users/me/projects/api for AI-generated defects before I merge this branch — I want hallucinated imports and phantom packages reported first.
Audit a PR diff
Here is the diff from my pull request. Run a code quality gate on it and list any stale API calls or version mismatches, with fixes.
Check Python imports
Audit the imports in /Users/me/projects/pipeline, python only, and tell me which packages don't actually exist or aren't in requirements.txt.

name: open-code-review-scan description: AI code quality gate that detects hallucinated imports, phantom packages, stale APIs, and AI-specific code defects. Use when the user asks to scan code, review code quality, check for AI-generated bugs, audit imports, find phantom dependencies, or run a code quality gate. Supports TypeScript, JavaScript, Python, Java, Go, Kotlin. license: MIT metadata: author: raye-deng version: "1.0" mcp-server: "@opencodereview/mcp-server"

Open Code Review — AI Code Quality Gate

Scan source code for AI-generated defects that traditional linters miss. This skill detects:

  • Hallucinated imports: packages that don't exist or aren't in dependencies
  • Phantom packages: code referencing non-existent modules
  • Stale APIs: calls to removed or renamed APIs
  • Dead code paths: unreachable code introduced by AI generation
  • Version mismatches: code using APIs from wrong library versions

When to activate

  • User asks to "scan code", "review code quality", "check for AI bugs"
  • User wants to audit imports or find phantom dependencies
  • User needs a code quality gate before merging PRs
  • User mentions "code review", "lint", "static analysis" for AI-generated code
  • User wants to check a diff or specific files for defects

Instructions

  1. Use the scan_directory tool to scan the target codebase:
    • Provide the absolute path to the directory
    • Optionally specify language filter (e.g., "typescript", "python")
  2. For PR reviews, use scan_diff with the diff content
  3. Review the scan results for defect categories:
    • Critical: hallucinated imports, missing dependencies
    • Warning: stale APIs, version mismatches
    • Info: dead code paths, unused variables
  4. For each defect, use explain_issue to get detailed explanations and fix suggestions
  5. To auto-fix issues, use heal_code on affected files
  6. Present a structured report to the user with:
    • Summary statistics (total issues, by severity)
    • Top critical issues with explanations
    • Recommended fixes

Supported Languages

TypeScript, JavaScript (Node.js), Python, Java, Go, Kotlin

Tips

  • For best results, scan the project root so the tool can read package.json / requirements.txt / pom.xml for dependency validation
  • Run scan_diff on PR diffs for fastest feedback
  • Use heal_code sparingly — always review auto-fixed code before committing

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/ai-code-quality-gate-detect-ai-defects-ms47vpfr/download' --output '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md.part' && mv '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md.part' '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md' && test -s '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/open-code-review-scan' && cp -R '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr' '.claude/skills/open-code-review-scan'

Cursor
test -f '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md' && test -s '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/open-code-review-scan' && cp -R '.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr' '.cursor/skills/open-code-review-scan'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr'

openskills read 'ai-code-quality-gate-detect-ai-defects-ms47vpfr'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/ai-code-quality-gate-detect-ai-defects-ms47vpfr/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills