/sci-paper:de-ai <file_path> [--section <name>] [--n N] [--max-iter N] [--audit-only] [--no-apply] [--distill] [--field <name>]from sci-paper
Chains three passes to remove AI-sounding patterns from academic text: measurement, structural-tell audit, and claim-first rewrite. Preserves numbers, formulas, and citations.
Ships in sci-paper. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Normative authority:
docs/SCIPAPER_STANDARD.md. Where this file and the standard disagree, the standard wins.docs/architecture/DEAI_SUBSYSTEM.mdexplains the design;docs/architecture/EVALUATION.mdrecords the empirical evidence. Style profiles and learned models supply evidence and positive anchors, never competing policy.Provenance (MIT, attribution retained): this skill chains three de-AI sources into one pipeline — the in-house de-AI subsystem (the L0-L4 tools and the standard's feedback contract) and two vendored humanizers: AIScientists-Dev/academic-humanizer v0.3.3 (MIT; the Layer 1-5 catalog) and blader/humanizer (MIT; the structural families 2.12-2.16, the Pass-2 self-interrogation, and the false-positive guards). The upstream word lists are not normative here — corpus evidence is (§7 Corpus overrides).
Three sequential passes over one target, all inside the standard's
measure -> type -> rank -> edit -> re-measure -> disposition loop:
sci-paper.feedback.v1
report: L0 lexical/punctuation, L1 distribution, L2 sentence + document
structure, L3 learned similarity, L4 positive voice.--audit-only stops after Pass 2 (findings only; this is the mode
paper-review dimension D and final-review invoke). --no-apply runs
Pass 3 to proposals only. For technical prose, neutral and precise IS the
human voice — this skill strips machine tells; it never adds personality,
humor, or first-person flavor.
Boundary with /sci-paper:condense (canonical home — this statement;
mirrored verbatim in condense SKILL.md §0):
de-ai removes the authorship fingerprint (L0-L4 signals, structural tells,
voice; its Pass-3 length cap only guards its own rewrites against growth).
condense removes redundancy and length (cross-document deduplication under
one-canonical-home-per-fact). At the overlap (verbose AI-isms such as
rule-of-three padding or connective stacking), de-ai DETECTS the tell; when
the right fix is deletion rather than rewrite, the deletion EXECUTES under
condense's ranked sweep.
degraded or unmeasured, never a clean result. No universal style
verdict exists.l0_target. L1-L4 findings are ranked
advisories with dispositions, never forced to zero at the cost of clarity.--field: one available field under style-profile/ selects
automatically; multiple require --field; zero means corpus guidance is
unavailable — model-free axes still run and the gap is reported.docs/SCIPAPER_STANDARD.md and the /sci-paper:paper writing
guidance (Anti-AI-isms tiers, forward narrative, formula and citation
standards, canonical L0 examples).style-profile/<field>/style_dossier.md in full when it exists, and
check freshness: if the corpus under style-corpus/<field>/ is newer than
the dossier, stop and rebuild with /sci-paper:calibrate <field> (§3–§4
there: extract_style --field <field> alone rewrites the dossier and the
bank, and every --calibrate axis keeps describing the old corpus while
reporting measured). A stale profile is unmeasured, never conformity.python tools/retrieve_exemplars.py --field <field> --section <type> --topic "<verified one-sentence topic>" --k 5 (add --allow-fallback
when sentence-transformers is absent: keyword overlap, strictly worse;
without either, record the anchors as unmeasured). Read every returned
exemplar; record provenance; use for rhythm and register only.python tools/ai_ism_lint.py <file> --field <field> \
--structure --distribution --document-structure --register --salience \
--oracle --voice --format json --output <scratch>/feedback-before.json
Read the output as sci-paper.feedback.v1; record every axis state
(measured / degraded / unmeasured / not_applicable) — silence is
never clean. Exit semantics: 0 = no L0 targets (advisories may remain),
1 = L0 targets present, 2 = input/config/execution failure. Never re-parse
JSON from printed prose.
Axes and tools:
ai_ism_lint Tier A/B + em-dash) — the only
to-zero axis. The Tier A/B word lists are the TIER_A_PATTERN and
TIER_B_PATTERN regexes in tools/ai_ism_lint.py, mirrored for human reading
in skills/paper/SKILL.md; do not re-derive them by hand.
style-profile/<field>/lexicon.json is separate calibration data: only its
llm_words_absent_from_corpus key is read, and only for the advisory
corpus-zero: rule.deai_register) — terms the manuscript leans on that the
field's own corpus does not carry: the tell of a paper written in a
neighbouring discipline's vocabulary. Evidence is corpus document frequency,
never a curated list of another field's words, because a list cannot separate
AUC, which the astronomy corpus almost never carries, from epoch and
accuracy, which it carries routinely.
Advisories only; a corpus-rare term may be a borrowed method's accepted name
or the concept the paper introduces. The same tool's zero-hit audit
(register-zero:<term>) is exhaustive rather than thresholded: every body
word the manuscript uses that no corpus passage carries is listed, strong
unless the manuscript supplies a reason the tool can read — a mechanical
formation of an attested stem (clamped from clamp), a defining sentence
or acronym expansion at first use, or a proper name capitalised at every
use. "The cited method's own name" is an author disposition, not an
exemption. A strong hit is answered by one of the §4.2 dispositions, never
by silence.deai_collocation) — sentences that join common words
the field never joins (binned kernel, smoothed boundary): the fraction of a
sentence's adjacent content-word pairs that no corpus passage attests, against
a per-section leave-one-out reference. A pair the field writes by chance would
have been seen; a pair it never wrote is a coinage or a figure of speech, and
the glossary reading (deai_collocation --glossary, or ai_ism_lint --glossary)
lists every such pair the manuscript uses twice or more with its first-use line:
a coinage that recurs is the manuscript's own term and is walked once, given
its definition at first use or replaced by the field's word, never left to a
reader who does not know the project; and
the action names the relation it compresses. Advisory; a term this paper
defines keeps its pair.deai_salience) — whether a passage ranks the
quantities it reports or recites them. Not numeric density (a quantitative
abstract is supposed to carry numbers) but how far the numerals run without an
interpreting sentence between them, against a per-section human reference.
This is the only axis that reads the numeral-preserving LaTeX projection; the
others read latex_to_plain, which replaces math with [math] and therefore
measures zero numerals on any .tex file.deai_discourse) — given/new cohesion per
paragraph and hedging per section, each flagged on the low tail of the
field's own reference; hedging is restricted to intro and method.
Advisory.deai_metrics, deai_oracle) — burstiness,
connective openers, surprisal/UID. Degraded and rank-only: the
distribution operating point is refuted (EVALUATION §16) and UID has none.deai_structure) — template families
(announced enumeration, ordinal runs, setup-list-wrap, repeated
modal/anaphoric frames, symmetric closers) plus the auxiliary families
(antithesis clusters, short reversal beats, paper-as-agent subjects, wh-cleft
openers, modifier stacks of three-plus tokens with two hyphenated compounds).
Auxiliary families never enter the template score; they name the sentence.deai_residue) — the trace an edit leaves: self-referential
drafting history (we initially, no longer), edit-meta text (TODO, see previous version), a sentence that defines the paper's own object by what
it never does or has (residue-absence: never strong, carries no
ordinary, exempt with a citation in the sentence; delete the clause where
its neighbours already carry the positive statement, rewrite only what the
page lacks, and record the dropped negation the §6 gate reports), and a
heading or caption
that promises what the body never delivers (negative-label). With
--before or --git-ref the diff
rule reports a label the edit added and the body does not earn, and exit 1
gates the pass; a residue finding is fixed by rewriting the sentence to the
current state of the science, never by adding an explanation.deai_docstructure) — the de-AI centre of
gravity: per-stratum cross-paragraph dispersion manifold, role coupling,
split-conformal operating points. Word-level rewriting cannot move this
signal; the only sanctioned lever is deai_partition (§4).deai_anchoring) — a writing-quality band, not an
AI-discrimination axis.deai_voice) — a decided-degraded offline audit
instrument; per-paragraph findings are confidence-capped at 0.5. A low
score never proves machine authorship.deai_partition, deai_provenance,
deai_personal) — provenance/personal are honestly unmeasured until the
author supplies their own draft history or prior papers.Audit against the catalog below, then merge every hit into the Pass-1 ranked list (Layer 1-2 structural hits are ordinary style-class advisories: a catalog count has no calibrated operating point, so density excess puts a hit first among the ordinary advisories but never makes it strong (standard §4); Layer-4 claim-evidence failures are integrity-class). Skip LaTeX comments and scaffolding macros. This pass never edits.
Inflated significance; superficial "-ing" tails that fake depth; promotional or figurative language; vague attribution without a citation; copula avoidance ("serves as" -> "is"); negative parallelism ("not just X, but Y"); rule-of-three padding; elegant variation (one referent keeps one name for the whole paper); filler ("it is worth noting that", "in order to"); overlong clause-stacked sentences (2.11); em-dashes (remove entirely; recast with commas, colons per the colon rule, parentheses, or separate sentences). Lexical tells are enforced mechanically by the linter — run it, do not re-derive the lists here.
The next five (2.12-2.16, from blader/humanizer) are structural, not lexical — flag the construction, honour each corpus caveat, never the bare word.
After the first draft of any Pass-3 rewrite, ask of it: "what still reads as machine-written here?" Answer in 2-4 concrete bullets (a specific phrase, a rhythm, a residual tell), then apply one further targeted rewrite that clears them and re-checks the fidelity and length gates. Do not manufacture voice to pass this step.
Evidence-tied hedging ("suggests", "is consistent with", "we hypothesize", "may indicate", "appears to") is correct and required when the claim is genuinely uncertain; strengthening a calibrated verb is a claim-evidence defect. Passive voice is fine when the actor is irrelevant; first-person plural "we" is standard; semicolons and an occasional triple are fine; formal definitions, named methods, symbols, and equations stay verbatim. False-positive guards: do not flag formal vocabulary on its own; a single mixed register; straight-vs-curly quotes in isolation; a lone emphatic short sentence; text inside quotations, a caption's verbatim labels, or a worked example; or field-common knowledge. Specific hard-to-fabricate detail, a genuine mid-sentence self-correction, and calibrated hedging are human signals, not tells.
For every empirical claim: (a) is it backed by a number, figure, table, or citation in the text, and (b) does the verb match that evidence's strength? Unbacked -> add the pointer or soften. Verb too strong -> downgrade to what the data show. Vague magnitude -> a number or an attributed range; lead comparisons with the strongest baseline. Layer-4 failures are integrity-class, not style-class.
If the author supplies prior papers, sample them first and match sentence
rhythm, connective habits, hedging placement, and section openers. Otherwise
default to clean, precise, venue-appropriate prose; the corpus dossier (§1)
is the measured voice baseline. Funding proposals route to
/sci-paper:proposal-polish, never here.
Select work in ranked order: L0 targets in the requested span first, then strong L1/L2/L3 advisories with concrete actions, then Pass-2 density hits, then document-shape findings. For each selected paragraph:
<scratch>/claim.txt):
every claim and its evidence relation, all numbers/units, citations, named
entities, inline math and acronyms, comparison/negation/causal direction,
scope, stance, qualifiers. Re-read every numeric and citation source in
the same turn. Snapshot the original verbatim (<scratch>/original.txt)
as the §5.3 length baseline. Before the FIRST paragraph of a pass, also
snapshot the whole document once (<scratch>/document-baseline.tex, the
include tree, or the clean git ref): the loop-close gates of step 6
compare against it.
1b. Bind. Fill the binding ledger (§4.3) for the paragraph. It is not
optional and no detector emits it; every none row is a clause the rewrite
must drop rather than carry forward.none.python tools/rewrite_reward.py --field <field> \
--reference <scratch>/claim.txt --original <scratch>/original.txt \
--candidates <scratch>/cand_0.txt <scratch>/cand_1.txt ...
eligible=False (fidelity failure, or longer than the original → -inf)
cannot be selected; the tool exits 1 when NO candidate is eligible (a
measured outcome, not a failure — regenerate tighter) and 2 only on invalid
input or a crash. A missing profile, a missing or unusable
voice_model.joblib, or a missing sentence-transformers does not stop the
gate: that term is unmeasured at weight 0, one stderr line says which, and
ranking proceeds on the deterministic terms (the learned model is never
required). --allow-growth "<reason>" only with an author-approved
justification, printed into the run record. Among eligible candidates
rank by L0 reduction, semantic fidelity, voice score, and condensation.
If none is eligible, preserve the original and regenerate tighter — never
pick the least-bad ineligible candidate. Then verify entities, scope,
stance, and logical dependencies against the source by hand: the
deterministic checker is necessary, not sufficient — it compares numbers
and negation/causal/comparison markers as bags, so a marker moved between
clauses passes it; its count mismatch line flags only lost repeats.python tools/length_gate.py <file> --before <scratch>/document-baseline.tex
(or --git-ref <ref>) and python tools/deai_residue.py <file> --before <scratch>/document-baseline.tex. A strong length-growth,
length-shrink-short or residue finding blocks the stop until it has a
disposition; the per-candidate --original budget of step 3 is the
candidate-time gate, not this one.salience-recital)A recital finding is not an instruction to delete numbers. It says the passage has not told the reader which of its quantities matter, and the repair is hierarchy, not subtraction. Work in this order, inside the same claim-record protocol as any other rewrite:
An accepted disposition is the right outcome wherever the density is what the
genre requires: a methods paragraph specifying a parameter grid is an
enumeration by nature, and the finding only reports that it is denser than most
human method passages.
register-foreign, register-zero)Three dispositions, in preference order, each recorded. A strong register-zero
hit must take one of them explicitly: it is a word no passage of the field has
ever written, and the only reasons to keep it are that this paper defines it
(disposition 3, with the definition at first use) or that it names a method the
field has not used before (disposition 2, with the citation that introduces it).
Never swap a term whose replacement would change the claim, and never introduce a field term the manuscript has not earned.
Document-shape findings (dispersion manifold, role coupling) cannot be
moved by word-level rewriting. Run python tools/deai_partition.py <file> --field <field> and surface its fidelity-free merge/split suggestions to the
author verbatim; they change zero tokens and are applied by hand, never
automatically.
No detector produces this finding. §4.1 and §4.2 act on measured advisories; this one is a mandatory unmeasured pass, run on every paragraph selected for rewrite. The reason it has no tool is recorded: three surface statistics were built for it and all three were refuted (EVALUATION §9.6, §14.5, §15.1). The defect is not a property of a clause but of the relation between a clause and the propositions around it, so the ledger is filled by judgement and made checkable by its output shape, not by a threshold.
Fill it before generating candidates, on the original paragraph:
| clause | kind | antecedent |
|---|---|---|
| … | fact / link / none | a number, an equation, a citation, or the id of an earlier clause |
fact — introduces something checkable that was not in play: a number, a
measurement, a named object, a concrete procedure.link — binds two propositions already in play. Name both.none — no antecedent can be named. This is a claim about the text, so
write it only after trying to find one.A causal, purposive, or evaluative frame with a none antecedent is the
padding case: the sentence has the shape of an argument and none of the
substance. Delete it in the rewrite; do not repair it by inventing the
antecedent, which manufactures a claim the sources do not support.
Two traps make this pass fail in opposite directions:
fact, not none, however evaluative it
reads. §6 eligibility already protects the qualifier class and outranks this
pass entirely.Where a whole paragraph resolves to none rows, the repair is deletion and
belongs to /sci-paper:condense, not to a rewrite; hand it over rather than
rewriting inert text into better inert text. Where the paragraph's fact rows
are unranked instead of unbound, that is the recital case — use §4.1.
--distill)Only paragraphs explicitly accepted by the author may enter
style-profile/<field>/exemplar_paragraphs.jsonl as positive voice anchors,
with provenance and section type recorded. Never feed automatically generated
or merely detector-favored text back as human positive data. Retraining on
the grown bank requires held-out and confound-aware evaluation; a multi-minute
heavy run executes on the authorized compute environment, not locally.
Stop only when: all integrity blockers are resolved or verified false
positives; applicable L0 targets are zero; every strong advisory is acted,
accepted, rejected_as_false_positive, or pending with a stated reason;
ordinary advisories and unavailable axes are reported; every changed
paragraph passes scientific-fidelity verification; and the Pass-3 step-6
loop-close gates have run against the document snapshot with every strong
length or residue finding dispositioned. This is a
disposition-complete feedback state, not a universal prose verdict. If the
iteration budget is exhausted, leave the original text for unresolved cases
and return the pending findings.
# de-ai — Feedback Report
Target: <file> | Field: <field> | Candidates/paragraph: N
Measurement: <axis=status list, all four states shown>
Passes run: measure / humanizer-audit / rewrite (or audit-only)
Paragraphs considered: K | rewritten: R | unchanged: U
L0 targets: before B -> after A (Tier A, em-dash, Tier B excess)
Strong advisories: acted X | accepted Y | false-positive Z | pending P
Length delta (rendered prose): <per-paragraph words, §5.3>
## Paragraph changes
- <line/section>: <finding ids and rules>
- eligibility, missing invariants, before/after, disposition
## Residual feedback
<ranked ordinary advisories, document-shape suggestions, unavailable axes>
No number, equation, or citation changed.
/sci-paper:condense; de-ai only rewrites what a tell finding selects.Corpus overrides (measured evidence beats the upstream word lists):
landscape is a legitimate astrophysics term — never flag it lexically;
demonstrate* and significantly are normal astro usage — flag only on a
Layer-4 failure, never as bare words. The enforced Tier A/B lists live in
tools/ai_ism_lint.py; this skill defers to them. The corpus-derived
style-profile/<field>/lexicon.json feeds the advisory corpus-zero: rule only.
When the corpus changes, re-run /sci-paper:calibrate <field> (its §3–§4:
extraction plus every --calibrate axis); extract_style and
build_profile alone leave the calibrated references stale.
Interfaces:
docs/SCIPAPER_STANDARD.md — consequence classes, ranking, disposition,
stopping, §5.2 de-AI-ization order, §5.3 length budget, §6 rewrite
eligibility./sci-paper:paper — writing guidance and canonical L0 prose examples./sci-paper:condense — the redundancy/length action surface (boundary
statement in §0)./sci-paper:paper-review — invokes this skill --audit-only as its
dimension-D structural-tell step./sci-paper:final-review — runs this skill --audit-only as an isolated
reviewer.ai_ism_lint (L0 hub + aggregation), deai_metrics,
deai_oracle, deai_structure, deai_salience, deai_register,
deai_collocation, deai_discourse, deai_residue, deai_docstructure,
deai_anchoring,
deai_voice, deai_partition, deai_provenance, deai_personal,
rewrite_reward (fidelity + length gate), retrieve_exemplars,
extract_style, build_profile, deai_feedback (schema + ranking).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
de-ai, humanizer, academic-writing, text-rewriting, ai-detection
12 skills in this plugin
/brainstormFully automatic radial exploration engine for divergent research ideation, or for exhaustively finding ways to solve one concrete hard problem. The data model is a phylogenetic tree: root = the starting point (topic / problem / current research state), node = one idea, depth = number of divergence layers, width = number of final results. Every node is brainstormed through twelve framing passes (first-principles, inversion, cross-disciplinary transport, adversarial, constraint relaxation, scale extrapolation, substitution, office-hours, contrarian, failure-driven, high-risk, meta), every branch gets a complete rigorous derivation (mathematics / physics / logic / literature check / feasibility / falsifiability), and divergence recurses until every deepest leaf is fully advanced. A mandatory glossary grill locks the root node's terminology to the project glossary (FACTS.md if available) before exploration starts. width / depth / rounds default to unlimited and stop on convergence criteria. Deferred or incomplete leaves ('defer', 'cost limits', 'future work', 'TODO') are hard-banned. Use when: "brainstorm" / "explore options" / "find research directions" / "how do I solve this problem" / 发散思考 / 找研究方向 / 怎么解决这个难题 / 穷尽某个研究问题的解法 / 论文 motivation 阶段需要 radial 探索./calibrateMake the plugin yours. Walks the whole calibration chain for one field — corpus intake, profile extraction, per-axis calibration, optional model training, a held-out provenance measurement, and finding-level labelling against your own standard, style and target journal — then verifies the result. Every axis reports `measured`, `degraded` or `unmeasured` from its own floor; a stratum that cannot support a rate stays `unmeasured` rather than being given one. Produces evidence only: no threshold here creates a verdict, an authorship claim, or a paper PASS/FAIL. Use when: "calibrate" / "set up my corpus" / "train on my papers" / "adapt to my journal" / "why is this axis degraded" / 校准 / 建语料库 / 用我自己的论文训练 / 适配目标期刊 / 标注 / 这个轴为什么是 degraded.Other plugins' skills for the same job
npx claudepluginhub skymanbp/sci-paper --plugin sci-paper