Skip to content
cccskills
FreePublished on GitHub

audit-ai-code

Audit, de-slop, parameterize, modularize, or safely clean up AI-generated or AI-shaped backend/general code. Use for Python, TypeScript, or other implementation diffs that may contain duplicate helpers, fixture hacks, hard-coded test data, over-defensive control flow, broad exception wrappers, config-bag or boolean-mode soup, speculative scaffolding, hallucinated APIs/dependencies, local-idiom drift, brittle tests, or maintainability/safety/performance gaps after a feature, bugfix, prototype, or agent pass.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573 stars(GitHub 573 + cccskills 0)

Run score Not tested

See how to install

Files included (3)

  • SKILL.md6.5 KB
  • agents/openai.yaml370 B
  • references/sources.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

AI Code Audit

Use

Audit or repair implementation code that reads generically AI-generated, overfit, or hard to maintain. Preserve behavior, public APIs, and tests unless the user explicitly asks for a refactor.

Review in this order:

  1. Find the target scope.

    • Prefer git diff --check and git diff --stat first.
    • Inspect the current diff for touched files; if there is no git diff, fall back to recently modified files.
    • Ask one narrow question if scope is genuinely ambiguous.
  2. Establish the local idiom.

    • Read adjacent handwritten code before judging style.
    • Identify existing patterns for module boundaries, configuration, validation, errors, logging, tests, naming, and helper placement.
    • Prefer the repo's established utilities, dependency injection style, and data shapes over new local conventions.
    • Treat local consistency as evidence; do not impose generic "clean code" rules that fight the codebase.
  3. Collapse duplicate helpers and shadow APIs.

    • Find helpers or wrappers that do the same job with slightly different names, signatures, or one-off branches.
    • Prefer one canonical helper with a narrow, intention-revealing API.
    • Replace hand-rolled parsing, path, date/time, and string logic with existing project utilities when they already exist.
    • Verify any newly introduced helper, method, import, or package is real and canonical in this repo or dependency graph.
  4. Improve parameterization and modularity.

    • Parameterize repeated literals, fixture-specific values, environment assumptions, and duplicated branches only when doing so clarifies a real variation point.
    • Keep cohesion high: move behavior to the module or type that already owns the concept; avoid shared utility bins.
    • Keep coupling low: pass the smallest stable domain object or explicit value needed, not unrelated context, global state, or sprawling option maps.
    • Replace boolean mode arguments with explicit methods, named strategies, or derived decisions when callers need different behaviors.
    • Use parameter objects only for cohesive data that changes together; do not turn them into config bags.
    • Preserve typed, explicit interfaces; do not make code more dynamic or generic just to reduce lines.
  5. Flatten defensive control flow and exception boundaries.

    • Replace nested condition ladders with guard clauses and early exits.
    • Consolidate checks that lead to the same result and hoist duplicate branch bodies.
    • Remove stateful control flags when direct control flow is clearer.
    • Delete broad exception wrappers that hide uncertainty, keep one clear handler around real boundary failures, and replace expected non-exceptional cases with explicit precondition checks.
  6. Remove generated-code residue.

    • Delete speculative abstractions, factories, generic hooks, pass-through wrappers, broad options objects, dead branches, and placeholder fallbacks that have no concrete caller or product need.
    • Remove comments/docstrings that restate obvious code; keep only non-obvious intent, invariants, and tradeoffs.
    • Normalize naming, module boundaries, error style, and helper shape to match adjacent hand-written code.
    • Treat fixture-shaped branches, magic constants, and deleted or weakened tests as a smell; encode the actual behavior or invariant instead.
  7. Check tests for behavior focus.

    • Prefer tests named and structured around behavior, not a 1:1 mirror of implementation methods.
    • Remove branches that special-case fixture names, timestamps, ids, or canned responses in production code.
    • Replace snapshot-only or mock-call-only assertions with observable behavior when practical.
    • Keep test helpers parameterized around meaningful scenarios, not hidden setup that makes failures hard to read.
  8. Check safety and runtime basics.

    • Look for secrets in code/config, string-built queries or shell commands, path traversal, unsafe deserialization, SSRF-shaped fetches, missing server-side authorization, sensitive data in logs, swallowed exceptions, unchecked return values, missing outbound timeouts, and check-then-act races.
    • Verify generated imports, packages, APIs, permissions, and defaults against project docs, lockfiles, or official sources before trusting them.
    • Patch only high-confidence local fixes; report broader security, dependency, or architecture changes as follow-up.
  9. Verify.

    • Run the narrowest relevant tests, typechecks, and linters for touched files.
    • Re-open the diff and confirm cleanup did not change intended behavior.

For larger diffs, parallelize read-only review into up to four passes: local idiom/reuse, cohesion/API shape, control-flow/exception boundaries, and behavior tests/safety/performance. Prefer a stronger model for ambiguous tradeoffs and a smaller model for narrow, easy-to-verify scans.

Output

For each finding, include:

  • Issue
  • Evidence
  • Class (P0, P1, P2)
  • Why it matters
  • Possible non-AI explanation
  • Smallest fix
  • Acceptance check
  • Confidence (High, Medium, Low)
  • File/line

Return only the top 5-8 findings for review-only asks and merge repeated symptoms under one root cause.

For implementation asks, patch the code directly, then summarize what was simplified, what was intentionally left alone, what validation ran, and any follow-up risks.

Guardrails

  • Treat "AI-looking" as a quality smell, not a provenance claim.
  • Prefer objective maintainability, correctness, and safety defects over style-only opinions.
  • Prefer parameterized, modular, locally idiomatic code when it reduces real duplication or clarifies ownership.
  • Do not widen APIs into mega-helpers, config bags, boolean-flag modes, or generic parameter soup just to reduce line count.
  • Do not add speculative abstraction layers, broad framework wrappers, or one-off utility namespaces.
  • Do not reformat unrelated files or chase broad style churn.

Resource

  • references/sources.md: source basis for code-smell, AI-generated-code, API-shape, test-focus, and security-review checks.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Meet or work with Assistant, the user's relaxed ongoing work support. Use when the user invokes Assistant, starts or resumes an Assistant chat, asks what they should know, wants proactive work awareness, asks for reply drafts, asks to keep an eye on work, or needs follow-up/check-in help. On first contact, start with exactly "Hi, I'm your assistant." then decide whether onboarding is brand new, partial, or already established.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573Updated Jun 23, 2026

Audit AI-generated, AI-shaped, or AI-looking frontend code, UI screenshots, and design diffs. Use for prompts like "audit AI frontend", "de-slop UI", "componentize this screen", "parameterize this React/Tailwind/shadcn UI", "make it responsive/accessible", or "review design-system drift"; check component APIs, reusable props/data models, modular composition, shared primitives/tokens, responsive resilience, accessibility, copy quality, hard-coded fixture screens, one-off CSS piles, and generic cards/gradients/fonts.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573Updated Jun 23, 2026

Audit pasted chatbot output, AI-cleanup diffs, wiki drafts, Markdown/MDX/docs, and source-backed articles for generic AI fluff, LLM writing tells, weak audience model, lack of theory of mind, inflated significance, vague attribution, leaked tokens, placeholders, broken markup, fabricated or mismatched citations, and detector false positives. Use for requests like "AI writing audit", "check for AI slop", "find writing fluff", "does this sound like ChatGPT", "cleanup LLM tells", "make this less generic", "verify these citations", "detector flagged this", or text containing turn0search0, oaicite, oai_citation, contentReference, utm_source=chatgpt.com, malformed references, or wrong target-format markup.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573Updated Jun 23, 2026

Help address review/issue comments on the open GitHub PR for the current branch using `oai_gh` or `gh`; verify auth first and prompt the user to authenticate if not logged in.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573Updated Jun 23, 2026

Review git changes and split them into semantic commits with clear messages. Use when the user asks to commit work, clean up local history, or group a mixed diff into logical commits. Do not commit on main or master unless the user explicitly asks.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573Updated Jun 23, 2026

Use when a user asks to debug or fix failing GitHub PR checks that run in GitHub Actions; use `oai_gh` or `gh` to inspect checks and logs, summarize failure context, draft a fix plan, and implement only after explicit approval. Treat external providers (for example Buildkite) as out of scope and report only the details URL.

The English summary is being prepared. Showing the original description.

jxnl/personal-monorepo-template573Updated Jun 23, 2026

See all skills by jxnl

Report a problem with this skill