ai-audit

Audits AI-generated code across four layers covering logic, dependencies, style, and instruction adherence.

10|2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/nrdxp/predicate --skill ai-audit-nrdxp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-audit
Source: https://github.com/nrdxp/predicate/tree/main/skills/ai-audit
Command: npx skills add https://github.com/nrdxp/predicate --skill ai-audit-nrdxp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code is often syntactically flawless but logically hollow, containing hallucinated dependencies, inefficient algorithms, and violated constraints that traditional SAST tools miss. This Skill provides a structured adversarial audit protocol to catch those defects before they cause regressions or supply-chain risks. ## Core Features & Use Cases - Four-Layer Audit Framework: Covers inefficiency taxonomy (ODC classification), slopsquatting and dependency verification, stylistic signature detection, and instruction adherence analysis. - Hallucinated Package Detection: Cross-references imports against npm and PyPI registries to flag phantom packages and non-existent versions. - Structured Audit Report: Produces a standardized report with per-layer PASS/FAIL status, findings, and prioritized remediations. - Use Case: After an LLM generates a new module, run this audit to verify every dependency exists in official registries, check for O(n²) algorithmic anti-patterns, and confirm negative constraints from the original prompt were respected. ## Quick Start Audit the AI-generated code in this repository using the four-layer framework and produce a full audit report with prioritized remediations.

Frequently Asked Questions about ai-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit AI-generated code for hidden flaws?

Run the four-layer audit: classify logic defects with the ODC taxonomy, verify every dependency against official registries, check for stylistic markers like robotic comments and defensive bloat, and map all prompt constraints against the actual implementation.

What is slopsquatting and how do I detect hallucinated packages?

Slopsquatting is a supply-chain attack where adversaries register package names that LLMs hallucinate. Detect it by cross-referencing every import against official registries like npm and PyPI, and flagging non-existent versions such as pandas==2.5.0.

Why does traditional SAST miss problems in AI-generated code?

AI-generated code is syntactically flawless but often logically hollow, so static analysis passes while algorithmic inefficiencies, missing edge-case handling, and violated prompt constraints remain. The audit targets these semantic and behavioral gaps instead.

When should I discard an AI coding session and restart?

Discard the session when code complexity (NLOC/CCN) increases over three iterations without resolving the primary defect. This indicates the model has entered a hallucination loop, and a fresh start is more effective than continued prompting.

What are the limitations of this audit approach?

The audit is an adversarial manual protocol used when no deterministic evaluator exists for a condition, so it depends on reviewer rigor rather than automated gates. Where a symbolic or test-based check can be built, that deterministic path is preferred.