ai-writing-detector
GitHub用于检测、扫描或审计文本中的AI写作模式,不进行重写。支持本地Node执行和模型判断,处理多技能协作及上下文传递,提供分数与标签结果。
Trigger Scenarios
Install
npx skills add conorbronsdon/avoid-ai-writing --skill ai-writing-detector -g -y
SKILL.md
Frontmatter
{
"name": "ai-writing-detector",
"description": "Use when the user asks to detect, scan, audit, score, or flag AI-writing patterns without rewriting the text, including requests for a deterministic local detector result when the host can execute Node."
}
AI Writing Detector
Run a detect-only review using the original Avoid AI Writing rules. Never rewrite unless the user changes the request.
Authority
The canonical rulebook is ../avoid-ai-writing/SKILL.md. Its cautions about false positives, context, protected material, and authorship claims apply here.
For cross-Skill work, follow ../avoid-ai-writing-router/references/handoff-contract.md and the typed edges in ../avoid-ai-writing-router/references/skill-graph.json.
Connection contract
Incoming
Accept detector work from:
avoid-ai-writing-routerviaROUTEfor detect-only requests, the audit stage of a multi-stage request, or fresh signal collection after another terminal stage returns control to the router.preservation-verifiervia boundedRECHECKonly when convergence or residual auditing was part of the request.
Do not accept a direct handoff from false-positive-reviewer. That Skill is terminal in the graph and must return control to avoid-ai-writing-router when fresh signal collection is needed. This prevents a reviewer-detector cycle.
Carry forward the canonical context_profile separately from the detector's context_mode, along with protected constraints, pass state, and risk flags. Do not collapse or reset them.
Produce
Update the handoff envelope with:
execution_evidence.detector:executedonly if the bundled detector actually ran, otherwisemodel_only.detector_summary.scoreandlabelonly when produced by executed detector code.detector_summary.issue_typesfrom actual findings.- any
consequential_authorship_claimrisk flag observed in the user's request.
Outgoing
FEEDfindings tovoice-preserving-rewriteronly when the user also requested returned-text rewriting.FEEDfindings tofile-edit-in-placeonly when the user explicitly requested mutation of a named file.ESCALATEtofalse-positive-reviewerwhen the user asks what the findings can establish about authorship or another consequential conclusion.- Otherwise stop after the detect-only result.
Deterministic hits are candidate matches. Keep the engine's public issue types and scores intact, then apply the canonical context exceptions and pass conditions when deciding which hits are justified editorial findings. Neither kind of result is a mandatory edit instruction or authorizes a mutation.
AI-engineering evidence lens
Apply the agency-ai-engineer lens encoded in ../avoid-ai-writing-router/references/agency-role-lenses.md:
- keep deterministic output separate from model-only observations,
- preserve the selected context profile and detector mode through downstream handoffs,
- treat score and label as signals rather than ground truth,
- consider false positives and genre/register effects,
- never convert pattern detection into an authorship classifier claim.
Preferred path
When the current host can execute Node safely:
- Pass the supplied text to
scripts/detect.js. - Use
--context technicalfor code-adjacent or technical prose when appropriate. Otherwise usegeneral. - Use
--source-mode rendered-markdownfor Markdown that carries YAML frontmatter or HTML comments, so unedited metadata is not scored as the author's prose. Otherwise leave the defaultplain. - Report the detector's score, label, issue types, severity, matched text, and suggestions.
- Separate deterministic candidate matches from justified editorial findings and observations that only exist in the full rulebook.
- Never claim execution unless the command actually ran.
Example:
printf '%s' "$TEXT" | node scripts/detect.js --context general
For a file:
node scripts/detect.js --file path/to/draft.md --context general
For Markdown with frontmatter or HTML comments:
node scripts/detect.js --file path/to/draft.md --source-mode rendered-markdown
If Node or shell execution is unavailable, perform the detect-only workflow from the canonical avoid-ai-writing Skill and explicitly say the deterministic detector was not run.
Stop conditions
Stop here when the request is detect-only. Do not continue into rewrite, file mutation, or interpretation merely because those Skills are available.
A residual RECHECK may run once when requested. It is read-only and does not consume an editing pass; any change it prompts must fit within the requested editing-pass limit, capped at two, and the graph's loop policy.
Output
Return the overall label and score when executed, detected candidate matches grouped by severity, a short contextual assessment that distinguishes justified findings from plausible false positives, execution status, and no rewritten version unless control has explicitly passed to a rewrite owner.
Version History
-
2a7e999
Current 2026-09-28 00:32
修复detect.js CLI兼容性问题:新增--source-mode参数以支持渲染Markdown评分,完善上下文支持,统一空结果处理及错误退出行为,并补充集成测试。
-
313dbc3
2026-09-22 12:53
更新连接契约,明确携带context_profile;细化产出字段以区分执行证据与模型观察;引入agency-ai-engineer视角,强调将分数视为信号而非事实,防止误判作者身份。
- a465548 2026-09-09 07:08


