本文へ移動
cccskills
無料GitHub で公開

ai-code-onboarding-checklist

当拿到一段 AI 生成的代码,还没决定要不要信、要不要跑、要不要往上继续加东西时使用。

先做一遍客观体检:行数与嵌套深度、有没有测试、有没有硬编码密钥或遗留 TODO、依赖是不是真实存在、有没有危险调用(eval/exec、shell=True、递归删除、反序列化、提权、外发网络,按正文给的 grep 模式逐类查);再给风险评级和下一步动作。老实写明它查不了算法正确性——体检通过不等于代码是对的。

回答里文字、事实和代码混在一起时先用 ai-answer-triage 分级;只审相对已有代码的一份改动用 ai-diff-review-protocol。

インストール方法を見る

含まれるファイル(1)

  • SKILL.md14.6 KB

SKILL.md(原文)

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

ai-code-onboarding-checklist

Purpose

Use this skill when someone has received code from an AI system and wants a first-pass safety and maintainability triage before deeper review.

This skill answers questions like:

  • Is the code small enough to review directly, or already too tangled?
  • Did the AI leave obvious placeholders, TODOs, or unfinished branches?
  • Are there hard-coded secrets, tokens, or suspicious credentials?
  • Do declared dependencies appear real and named consistently?
  • Does it contain calls that can do damage as soon as it runs: eval/exec, shell commands, recursive deletes, unsafe deserialization, privilege changes, outbound network calls?
  • Are there tests, examples, or any executable proof that the code was meant to work?

It does not claim algorithmic correctness, business correctness, or production readiness.

When to use

Use this skill when the user says things like:

  • “AI 帮我写了这段代码,先帮我看看能不能信。”
  • “Before I run this, give me an objective sanity check.”
  • “Tell me what is mechanically risky in this generated repo.”
  • “I want a checklist review, not a full rewrite.”

When not to use

Do not use this skill as the main tool for:

  • proving the algorithm is correct;
  • reviewing only a patch or diff against an existing codebase;
  • auditing whether AI-generated tests are meaningful;
  • validating external factual claims made alongside the code;
  • sorting a whole AI answer in which the code is only one part among explanations, facts and advice.

Prefer neighboring skills for those cases:

  • ai-diff-review-protocol for patch-focused review;
  • ai-generated-test-auditor for test-quality audit;
  • ai-output-fact-checker for claims about libraries, papers, versions, or commands;
  • ai-answer-triage to sort a mixed answer first; the code blocks it marks "test first" come back here.

Required inputs

Ask for or infer the smallest workable set:

  1. Scope: file, folder, or pasted snippet to inspect.
  2. Language / stack if obvious from filenames is not enough.
  3. Intended use: toy experiment, homework draft, internal tool, shipping product, etc.
  4. Trust decision needed now:
    • safe to read only
    • safe to run locally
    • safe to build on
    • safe to merge

If one of these is missing, continue with a best-effort review but mark the missing field explicitly.

Output contract

Return a compact report with these sections, in this order:

  1. Verdict — one of:
    • read-only OK
    • review before run
    • high-risk before run
    • not enough evidence
  2. Findings table with these rows:
    • size / complexity
    • test evidence
    • placeholders / TODOs
    • secrets / credentials
    • dependency reality
    • config & environment assumptions
    • dangerous calls
  3. Top 3 concrete risks
  4. Next safest action
  5. Known blind spots

Keep judgments evidence-based. Quote filenames, symbols, or exact snippets when possible.

Review procedure

Step 1 — Frame the task

Identify:

  • what artifact is being reviewed;
  • whether it is standalone or partial;
  • whether the user wants permission to run it, extend it, or merge it.

If the artifact is only a fragment, say so early. Fragments often fail checks that full projects would pass.

Step 2 — Run objective intake checks

Check the following items in order.

A. Size and structure

Measure or estimate:

  • total files in scope;
  • total non-blank, non-comment lines when practical;
  • unusually long files;
  • unusually deep nesting or callback chains;
  • duplicated blocks or near-copy-paste sections.

Risk signals:

  • one file trying to do everything;
  • abrupt style shifts suggesting stitched-together generation;
  • very large functions with vague names;
  • repeated branches differing only by constants.

B. Test evidence

Look for any of:

  • dedicated test files;
  • runnable examples;
  • sample inputs/outputs;
  • assertions outside production code;
  • CI hints or documented verification steps.

If no test evidence exists, say that clearly. Absence of tests is not proof of failure, but it lowers trust sharply.

C. Placeholders and unfinished edges

Search for signs such as:

  • TODO, FIXME, XXX, HACK, placeholder, stub, mock;
  • empty exception handlers;
  • pass, return null, return None, throw new Error("not implemented"), or equivalent unfinished branches;
  • comments that promise behavior the code does not implement;
  • dead parameters that are accepted but never used.

Distinguish between harmless future work and blockers to safe execution.

D. Secrets and credential handling

Look for:

  • API keys, tokens, private keys, JWT-like blobs;
  • passwords, DSNs, webhook URLs, or service-account JSON content;
  • hard-coded emails, phone numbers, or internal endpoints that should probably be externalized.

If a string merely looks secret-like but cannot be confirmed, label it suspected secret, not confirmed secret.

E. Dependency reality

Check whether the code references libraries, packages, commands, or services that appear consistent with the stated stack.

Review for:

  • imports that do not match the declared dependency manifest;
  • packages that look misspelled or invented;
  • a package name that exists on the registry but may not be the package the code expects: names that AI tools invent get registered by other people. Existing is not the same as trustworthy; note the first-release date, source repository, maintainers and download counts, or hand the check to ai-output-fact-checker;
  • APIs used as if copied from a different version;
  • framework assumptions with no setup instructions;
  • network services, databases, or environment variables required but never documented.

If the environment is missing, downgrade confidence rather than guessing.

F. Config and execution assumptions

Extract assumptions about:

  • OS;
  • runtime version;
  • environment variables;
  • required files or directories;
  • ports, paths, permissions, or external services.

Call out any assumption that would make “just run it” unsafe or misleading.

G. Dangerous calls

Look for calls that can do damage the moment the code runs, whether or not the logic is right. Run these patterns over the scope (for pasted code, search the pasted text the same way), then open every hit and read it in context:

S=path/to/scope   # the file or folder under review
grep -rnE '\b(eval|exec)\s*\(|new Function\s*\(|__import__\s*\(' "$S"   # eval / exec
grep -rnE 'shell\s*=\s*True|os\.(system|popen)\s*\(|child_process|execSync\s*\(|\|\s*(sudo\s+)?(ba|z)?sh\b' "$S"   # shell execution, curl | sh
grep -rnE 'rm\s+-[a-zA-Z]*[rR]|rmtree\s*\(|rimraf|fs\.(rm|rmdir)(Sync)?\s*\(|-delete\b|\b(DROP|TRUNCATE)\s+(TABLE|DATABASE|SCHEMA)\b' "$S"   # recursive delete
grep -rnE 'pickle\.loads?\s*\(|dill\.loads?\s*\(|marshal\.loads?\s*\(|shelve\.open\s*\(|yaml\.(unsafe_)?load(_all)?\s*\(|jsonpickle|torch\.load\s*\(|joblib\.load\s*\(|allow_pickle\s*=\s*True|ObjectInputStream|unserialize\s*\(' "$S"   # deserialization
grep -rnE '\bsudo\b|\bset(e|re|res)?[ug]id\b|chmod\s+(-R\s+)?0?777|chmod\s+[ugoa]*\+[rwx]*s|0o?777|--privileged' "$S"   # privilege escalation
grep -rnE 'requests\.(get|post|put|patch|delete|request)\s*\(|urlopen\s*\(|http\.client|httpx\.|aiohttp|socket\.(socket|create_connection)|fetch\s*\(|axios|XMLHttpRequest|WebSocket|\bcurl\s|\bwget\s|smtplib|ftplib|paramiko' "$S"   # outbound network

A hit is serious when:

  • eval / exec: the evaluated string contains anything the program does not fully control: user input, file content, a network response, a downloaded setting.
  • shell execution: the command string is assembled (f-string, +, format, template literal) from arguments, file names or input, or a download is piped into a shell (curl … | sh).
  • recursive delete: the target path is computed or comes from input, or could resolve to /, ~ or the project root.
  • deserialization: pickle, marshal, dill, joblib, torch.load, yaml.load without Loader=yaml.SafeLoader, or Java/PHP object streams read data someone else can write: a download, an upload, a shared cache, a user-supplied file.
  • privilege escalation: sudo, setuid/setgid, chmod 777 or +s, --privileged containers, anything that runs with or hands out more rights than the task needs.
  • outbound network: the destination is not explained by the stated purpose, or the call sends local data out (files, environment variables, tokens).

The patterns are a net, not a verdict. They also match harmless code (JavaScript RegExp.exec, a local function named fetch, rm -r inside a README) and miss aliases (from pickle import loads). Read each hit before labelling it.

Report each hit as path:line — signal — the call with secrets redacted — where the risky argument comes from, labelled:

  • confirmed: you read it, it runs on the normal path (no flag, no confirmation prompt), and one of the conditions above holds;
  • suspected: the pattern matched but you could not trace the argument or the code path;
  • not found: the patterns ran over the whole scope and nothing matched;
  • not checked: the patterns could not be run over the whole scope; say which part was missed.

An outbound call that is the stated purpose (a scraper fetching its target) is recorded as expected, with its destination, not as a risk. Hits that appear only in comments, docs or test fixtures are listed but do not raise the verdict by themselves.

Step 3 — Rate risk

Map findings to one verdict:

  • read-only OK: no obvious secrets, no severe placeholders, no dangerous calls beyond expected ones, assumptions are small and visible, scope is modest.
  • review before run: code may be salvageable, but missing tests, unclear dependencies, partial placeholders, or suspected dangerous calls make execution risky.
  • high-risk before run: likely secrets, invented dependencies, misleading setup, obviously unfinished critical paths, or any confirmed dangerous call from G. One confirmed dangerous call is enough, even when every other row is clean.
  • not enough evidence: scope too incomplete to judge responsibly.

Step 4 — Recommend the next action

Give the smallest safe next step, for example:

  • “Read these two functions manually before running anything.”
  • “Stub the missing environment variables and run only unit tests.”
  • “Verify these three dependencies exist before install.”
  • “Do not execute; first remove hard-coded credential material.”
  • “Do not run until pickle.loads no longer reads data downloaded from the settings host.”

Deterministic checks this skill should prefer

Whenever the environment allows, prefer objective checks for:

  • line counts;
  • file counts;
  • longest-file identification;
  • obvious nesting-depth heuristics;
  • TODO / FIXME / not implemented markers;
  • secret-pattern regex checks;
  • the dangerous-call patterns in G;
  • dependency-manifest presence and name matching;
  • test-file presence by filename convention.

When tooling is unavailable, perform the same checklist manually and label each item as:

  • confirmed
  • suspected
  • not found
  • not checked

Guardrails

  • Do not say the code is “correct” just because it looks tidy.
  • Do not say a dependency is fake unless you have direct evidence.
  • Do not invent test coverage from comments or examples.
  • Do not execute untrusted code automatically.
  • Do not expose secrets in the report; redact them.
  • If the user asks whether to merge, state clearly that this skill is only an intake screen, not a full code review.

Failure modes to avoid

Bad review patterns:

  • praising code quality without citing evidence;
  • confusing “no tests found” with “tests definitely do not exist” when scope is partial;
  • treating a demo script as production-safe;
  • ignoring environment assumptions because the code itself is short;
  • burying the only real blocker under a long generic checklist.

Handoff guidance

Escalate after this skill when needed:

  • to ai-diff-review-protocol if the real question is whether a change is safe relative to an existing baseline;
  • to ai-generated-test-auditor if tests exist but may be hollow;
  • to a language- or framework-specific debugging skill if the user wants fixes rather than triage.

Minimal example

User ask: “AI 写了个 Python 小工具给我抓网页,能直接跑吗?”

Good response shape:

  • Verdict: review before run
  • Findings:
    • size / complexity: small single-file script
    • test evidence: none found
    • placeholders: one TODO in retry branch
    • secrets / credentials: no confirmed secret, but cookie header hard-coded
    • dependency reality: requests plausible; browser-cookie import unclear
    • config assumptions: requires network access and target-site cookies
    • dangerous calls: requests.get to the target site only (expected, it is the purpose); no eval/exec, shell, delete, deserialization or privilege hits
  • Top risks:
    1. hard-coded cookie material
    2. no proof of retry/error-path behavior
    3. dependency/setup unclear
  • Next safest action: remove cookies, verify imports, run only against a throwaway target
  • Blind spots: no runtime execution, cannot confirm scraper correctness

变更记录 / Changelog

版本日期变更类型
0.2.02026-09-26补上 description 承诺却没有的危险调用检查:新增 G 节(六类 grep 模式、何时算严重、confirmed/suspected 标注),Findings 表加 dangerous calls 一行,确认的危险调用直接评 high-risk before run;E 步补"包名存在不等于可信";与 ai-answer-triage 互相点名minor
0.1.02026-08-30初始版本minor

レビュー

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

同じリポジトリのスキル

概要と使いどころ

当学生说"Common App 活动栏写不下"、"这段活动描述超字数了"、"帮我把这几条压到限制内"时使用。先按官方申请表核对当季字符限额,再逐条检查;一次把所有条目量完并直接给出压缩版,只在需要砍掉实质内容时才用选择题问该保哪部分。每改一版都用工具重新数一遍字符,绝不凭感觉说"这样应该够了"。只压缩,不代写空白。

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

ChromiteCr/Skills42026年10月16日 更新

当学生说"我参加过一些活动但没整理过"、"帮我把经历录进去"、"我的活动档案是空的"时使用。让学生一口气把记得的活动说出来,直接把这段话拆成结构化的长期事项(角色、组织、起止时间、做了什么、结果、级别),说不清的字段留空标"待补"而不是编,再用一张选择题卡把级别判定与是否重复这类关键项一次问完,然后提案入库。只记录学生真正说出口的内容,级别按事实判定,绝不往高了写。

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

ChromiteCr/Skills42026年10月16日 更新

当学生问"招生官会怎么看我的档案"、"我的背景还差什么"、"帮我评估一下现在的申请竞争力"时使用。以顶尖大学招生官的视角通读学生的档案、长期活动与已写下的反思,不问任何前置问题直接产出一份指名道姓的坦诚点评:这份材料的亮点、招生官真实的解读方式、明显的短板与空白、以及接下来最值得做的一到两件事。只读不写,不修改学生的任何数据,也不代写任何申请材料。

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

ChromiteCr/Skills42026年10月16日 更新

当使用者说"帮我填词"、"按这个字数模板写歌词"、"用多Agent对抗式写词"、"这首副歌帮我想几句"时使用,前提是字数骨架和这首歌写什么都已经有了;只有主题、还没定写什么时先用 lyric-concept-builder。拿一份字数骨架和意象系统,派三个 sonnet 子代理按不同路子并行独立起草(场景派 / 口语派 / 意象派),再派一个红队子代理逐句挑毛病,主 Agent 按句裁决拼稿,最后统一辙口与意象。收敛判据卡死:字数用 lyric-doctor 的脚本对模板数、每段同辙、hook 不含陈词、主歌二对主歌一有推进。不抄现有歌词,不替使用者决定这首歌要说什么。

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

ChromiteCr/Skills42026年10月16日 更新

当想知道一段 AI 回答"哪些能直接用、哪些必须先验证、哪些只能当建议"时使用。按声明类型分四级——低风险草稿材料、观点与策略建议、可查证的事实声明、会改变状态的可执行指令——每级配一句默认处置动作;再按影响半径排序,给出最小的下一步检查。可执行类一律标"不能直接执行;先做代码审阅/沙箱测试/回滚准备",其中破坏性或提权的命令排在最前。教的是一套可复用的复查习惯,不是替使用者把所有内容都核实一遍:本 skill 只分级、排序、定处置,要逐条核实走 ai-output-fact-checker,整段代码要做入库体检走 ai-code-onboarding-checklist。

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

ChromiteCr/Skills42026年10月16日 更新

当 AI 改完代码、要决定这份 diff 放不放行时使用。不逐行精读,按四步走查高风险点——意图是否匹配、有没有碰到边界条件、副作用面有多大、能不能回滚——每步有明确的放过与打回判据。改动文件数、增删行数、动到的迁移/锁文件/CI/配置/鉴权/测试文件和危险 hunk 先由 scripts/diff_risk.py 统计(粘贴进来的 diff 文本也能读,不需要 Git),越过固定阈值时必须人工逐段过。只有口头描述、没有改动内容时不给结论,只列要补的材料。diff 里新写的测试可不可信交给 ai-generated-test-auditor;没有基线的整段新代码走 ai-code-onboarding-checklist。

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

ChromiteCr/Skills42026年10月16日 更新

ChromiteCr のスキルをすべて見る

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