本文へ移動
cccskills
無料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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-templateスター 573(GitHub 573 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(3)

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

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

assistant

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-template5732026年6月23日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-template5732026年6月23日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-template5732026年6月23日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-template5732026年6月23日 更新

gh-commit

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-template5732026年6月23日 更新

gh-fix-ci

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

jxnl/personal-monorepo-template5732026年6月23日 更新

jxnl のスキルをすべて見る

このスキルの問題を報告する