extract-paper-idea
Skill8 starsChanged 2 months agoMITView on GitHub
Extract a paper's own content (contribution, novelty, method, results, limitations, future work) into one JSON artifact from its full text, the basis for drafting or refreshing its abstract - or, for a UQAC thesis, its Resume (French) + Abstract (English) pair. Ships no reader of its own: reuses paper2talk's LaTeX flattening, extract-statistic's future-works section scan, and extract-contributions' marker scan, pointed at the paper's own text rather than a cited one. Trigger on: extract-paper-idea, extraction du contenu de l'article, paper idea extraction, abstract source JSON, draft the abstract, refresh the abstract.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/skills/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- aider-setupSkill
- deliberationSkill
- drawio2tikzSkill
- extract-contributionsSkill
- extract-futureworksSkill
- extract-paper-ideaSkill
- extract-statisticSkill
- form-serviceSkill
- geolocalisationSkill
- latex-hygieneSkill
- loop-engineerSkill
- narrative-cvSkill
- obsidian-cliSkill
- opt-local-stt-vramSkill
- opt-local-vram-llmSkill
- paper2talkSkill
- recommendation-letterSkill
- rt-observeSkill
- scholar-evaluationSkill
- scientific-writingSkill
- scopusSkill
- word2latexSkill
- aider-setupSkill
- deliberationSkill
- drawio2tikzSkill
- extract-contributionsSkill
- extract-futureworksSkill
- extract-statisticSkill
- form-serviceSkill
- geolocalisationSkill
- latex-hygieneSkill
- loop-engineerSkill
- narrative-cvSkill
- obsidian-cliSkill
- opt-local-stt-vramSkill
- opt-local-vram-llmSkill
- paper2talkSkill
- recommendation-letterSkill
- rt-observeSkill
- scholar-evaluationSkill
- scientific-writingSkill
- scopusSkill
- word2latexSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 114
Every draft is checked against BOTH of the following before it is shown to the user.
- Distinctive: line 129
No Scopus, no deliberation, no scholar-evaluation.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
extract-paper-idea
Why this exists
An abstract drafted from memory, or from the abstract's own prior wording, drifts from what the
paper actually shows - the same failure extract-contributions was built to catch on citations,
one level up: here the paper is citing itself. This skill grounds every abstract component in a
verbatim extraction of the paper's own contribution, method, results, limitations, and future work,
so the abstract-writer agent drafts from evidence rather than paraphrase.
Precondition, not an option
The paper's .tex must resolve to at least one \section after \input/\include flattening. A
paper with none still gets an extraction (every mechanical field degrades to empty, warnings
names it), never a crash and never an invented section.
Mechanical vs judgment — the schema's core contract
extract_paper_idea.py (scripts/extract_paper_idea.py) does every MECHANICAL step and ships no
reader of its own (R18):
paper2talk'spaper_extract.resolve_includes/sections_of—\input/\includeflattening and the generic section map (level, title, word count).extract-statistic'sextract_text.scan_sections— the future-works-cue sections (limitations,future_work/open_problems), the same scanextract-futureworksaudit mode already runs, pointed here at the flattened text.extract-contributions'extract_contributions.analyse_file— the paper's OWN contribution/novelty/method/result marker sentences. This is the same marker scan run elsewhere on a CITED paper; here it runs on the author's own text directly (text=parameter, no temp file), so "what does this paper claim" is answered from its own words either way. The text handed to the scan is prepared first (_prepare_evidence_text): the paper's existing abstract/résumé/bibliography are stripped out (they are not NEW evidence - the whole point is to ground the abstract in the paper's own body, not in its own prior wording), and every\section{Title}becomes its own short sentence (. Title.) instead of a bare macro, since a bare macro's backslash silently blocks the sentence-boundary lookahead the scan's splitter uses and glues two unrelated sentences together across the heading (measured 2026-09-25).
python .claude/skills/extract-paper-idea/scripts/extract_paper_idea.py "<paper.tex>" --jsonOutput, written to <basename>_abstract_extraction.json beside the paper (and printed with
--json):
| Field | Filled by | Meaning |
source.tex_path / document_type / language | script | absolute path; "paper" or "thesis" (uqac.cls anywhere in the FLATTENED text, so a \input'd preamble file is still caught); "fr"/"en" (babel's LAST option in a multi-language list, French aliases francais/frenchb/acadian included, else a stopword-count fallback) |
title | script | from \title{}, or null |
section_map | script | [{level, title, words, text}, ...], in document order — text is the section's own body (bounded to 2000 chars), so the agent drafts Background/Objective/Implications from evidence already in the JSON instead of re-reading the raw .tex |
background_context | agent | the research problem/context (from the Introduction's section_map text) |
objective_purpose | agent | the paper's stated aim (from the Introduction's section_map text) |
methodology_summary | script | joined method-kind marker sentences |
key_findings | script | result-kind marker sentences |
contribution_novelty | script | contribution/novelty-kind marker sentences |
contribution_status | script | ok / no-contribution / empty / unreadable, the same four statuses extract-contributions keeps apart elsewhere — never merged, so "no marker matched" and "text too short to judge" read differently. Anything but ok is also appended to warnings |
limitations | script | future-works-cue limitations section excerpt(s) |
future_work | script | future-works-cue future_work/open_problems excerpt(s) |
implications | agent | 1-2 sentences (from the Discussion/Conclusion's section_map text) |
hypotheses | agent | UQAC thesis only: the thesis's own stated, testable hypothesis/hypotheses (its own 3rd Résumé/Abstract component, see below); left [] for a paper |
keyword_candidates | agent | 4-8 keywords (see below) |
existing_abstract / existing_resume | script | verbatim text, or null when blank or absent |
existing_abstract_present / existing_resume_present | script | true when the environment exists at all, even blank — distinct from existing_abstract/existing_resume being null, since "nothing to overwrite" and "overwrite an empty shell" are different agent behaviours |
warnings | script | e.g. a \input that was never opened, no \section found, a non-ok contribution_status |
The agent fields are always null/[] out of the script — this skill's contract is that the
script never invents them, and the calling agent (abstract-writer) fills them from the
section_map's own text entries before drafting.
Document-type branch
- Paper → one abstract, in
source.language— never a forced bilingual pair. Five components: Background, Purpose, Method, Findings, Implications (seeabstract-writer.mdStep 4). UQAC thesis (
document_type: "thesis") → BOTH a French Résumé and an English Abstract, per the template's own bilingual requirement, drafted from the SAME JSON so the two stay component-aligned rather than independently improvised.thesis-auditor.mdalready runs exactly this check on a finished thesis: "Compare the French résumé and English abstract component by component" — sharing one source of facts is what makes that check pass by construction instead of by luck.thesis-auditor.md:234-242requires SIX components, not five, plus a keywords line, and this pair must draft all of them orthesis-auditorrejects it on the next audit:- Context and problematic (
background_context) — the research domain and the problem. - Objectives (
objective_purpose) — what the thesis aims to accomplish. - Hypotheses (
hypotheses) — at least one testable hypothesis, stated explicitly. - Methodology (
methodology_summary) — the main method used. - Main result (
key_findings) — a concrete, quantitative finding. - Conclusion and future work (
implications+future_work) — what follows or remains open.
Plus a keywords line (
keyword_candidates), required for both the Résumé and the Abstract —thesis-auditor.mdflags its absence as[RESUME KEYWORDS MISSING]/[ABSTRACT KEYWORDS MISSING]on its own.- Context and problematic (
Keyword rules
4-8 keywords, complementing (not repeating) the title. A journal-supplied controlled vocabulary,
when the venue has one, takes precedence over free choice. Written into BOTH a paper's abstract
(as \keywords{}/IEEEkeywords, matching the paper's own venue convention) and a thesis's
Résumé/Abstract pair (as their required keywords line) — never computed and then left unwritten.
Length
- Journal/conference paper: 100-250 words (up to 300 if the venue allows) — see
.claude/skills/scientific-writing/references/imrad_structure.md, not restated here. - UQAC thesis Résumé/Abstract: 250-350 words target,
<200too short,>400too long — verified in.claude/agents/thesis-auditor.md:232-245, not a second, independently-invented number.
Self-check gate (mandatory, not optional)
Every draft is checked against BOTH of the following before it is shown to the user. A draft failing either is rewritten, never shipped with a caveat:
.claude/skills/scientific-writing/references/composition_rules.md's own self-check list: R1.1/R1.2 (passive by default), R1.4 (noI/my/me/mine), R1.5 (we/our/usconfined to the Contributions paragraph and the Conclusion — so NEVER in an abstract), R1.6 (no informal language), R1.7 (no semicolon), R1.8 (short sentences), R2.6 (no list, ever), R3.4 (a title is a noun phrase, never a question or a remark), R4.1 (unstructured by default, no labels unless the venue requires them), R4.2 (no\cite{}, no reference), R4.3 (no acronym, full stop — even one already defined elsewhere in the paper), R4.4 (no equation)..claude/skills/latex-hygiene/scripts/tex_check.py aiscan— AI-usage score under 20%, the same repo-wide hard rule every other authoring agent here already enforces.
What this skill does NOT do
No Scopus, no deliberation, no scholar-evaluation. The abstract carries no citation (R4.2), so none of the reference-validation or cross-model-debate machinery every other authoring agent in this repo runs applies here.
Where the pieces live
scripts/extract_paper_idea.py— the CLI and the merge. Imports its three sibling scripts directly (the same cross-skill patternextract_contributions.pyalready uses forextract_text.py), rather than shelling out to each in turn. Callsextract_text.configure_streams()before printing, so a non-cp1252 title or claim (measured 2026-09-25:≤) degrades the console encoding rather than crashing after the JSON file was already written (R8/R9, the same defect classtesting.mdalready documents for 2026-09-13).scripts/Test/test_extract_paper_idea.py— 17 tests, offline, no network, no PDF.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

