meta-paper-write
GitHub根据主题短语端到端生成研究论文PDF。流程涵盖偏好规划、多引擎搜索、实验模拟、来源策展、大纲与引用规划、图表绘制、各章节并行撰写、全局修订及摘要生成,最终通过XeLaTeX编译输出。
Trigger Scenarios
Install
npx skills add opensquilla/opensquilla --skill meta-paper-write -g -y
SKILL.md
Frontmatter
{
"kind": "meta",
"name": "meta-paper-write",
"always": false,
"triggers": [
"写论文",
"draft a paper",
"写篇论文",
"write paper"
],
"provenance": {
"origin": "opensquilla-original",
"license": "Apache-2.0"
},
"composition": {
"steps": [
{
"id": "paper_preferences",
"kind": "agent",
"with": {
"user_message": "{{ inputs.user_message | xml_escape | truncate(1200) }}"
},
"skill": "paper-preference-planner"
},
{
"id": "search_papers",
"kind": "skill_exec",
"skill": "multi-search-engine",
"depends_on": [
"paper_preferences"
]
},
{
"id": "experiment",
"kind": "skill_exec",
"skill": "paper-experiment-stub",
"depends_on": [
"paper_preferences"
]
},
{
"id": "refbib",
"kind": "skill_exec",
"skill": "paper-refbib-stub",
"depends_on": [
"search_papers"
]
},
{
"id": "source_pack",
"kind": "agent",
"with": {
"topic": "{{ inputs.user_message | xml_escape | truncate(200) }}",
"bibliography": "{{ outputs.refbib | truncate(8000) }}",
"search_results": "{{ outputs.search_papers | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-source-curator",
"depends_on": [
"search_papers",
"refbib"
]
},
{
"id": "outline",
"kind": "agent",
"with": {
"topic": "{{ inputs.user_message | xml_escape | truncate(200) }}",
"source_pack": "{{ outputs.source_pack | truncate(8000) }}",
"cite_keys_hint": "{{ outputs.refbib | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-outline-author",
"depends_on": [
"source_pack"
]
},
{
"id": "citation_plan",
"kind": "agent",
"with": {
"topic": "{{ inputs.user_message | xml_escape | truncate(200) }}",
"outline": "{{ outputs.outline }}",
"source_pack": "{{ outputs.source_pack | truncate(8000) }}",
"bibliography": "{{ outputs.refbib | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-citation-planner",
"depends_on": [
"outline",
"source_pack",
"refbib"
]
},
{
"id": "plot",
"kind": "skill_exec",
"skill": "paper-plot-stub",
"depends_on": [
"experiment"
]
},
{
"id": "draft_intro",
"kind": "agent",
"with": {
"outline": "{{ outputs.outline }}",
"section": "introduction",
"citation_plan": "{{ outputs.citation_plan | truncate(8000) }}",
"cite_keys_hint": "{{ outputs.refbib | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-section-author",
"depends_on": [
"outline",
"citation_plan",
"refbib",
"plot"
]
},
{
"id": "draft_method",
"kind": "agent",
"with": {
"outline": "{{ outputs.outline }}",
"section": "method",
"citation_plan": "{{ outputs.citation_plan | truncate(8000) }}",
"cite_keys_hint": "{{ outputs.refbib | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-section-author",
"depends_on": [
"outline",
"citation_plan",
"refbib",
"plot"
]
},
{
"id": "draft_results",
"kind": "agent",
"with": {
"outline": "{{ outputs.outline }}",
"section": "results",
"figure_path": "paper\/figure_1.pdf",
"citation_plan": "{{ outputs.citation_plan | truncate(8000) }}",
"cite_keys_hint": "{{ outputs.refbib | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-section-author",
"depends_on": [
"outline",
"citation_plan",
"refbib",
"plot"
]
},
{
"id": "draft_discussion",
"kind": "agent",
"with": {
"outline": "{{ outputs.outline }}",
"section": "discussion",
"citation_plan": "{{ outputs.citation_plan | truncate(8000) }}",
"cite_keys_hint": "{{ outputs.refbib | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-section-author",
"depends_on": [
"outline",
"citation_plan",
"refbib",
"plot"
]
},
{
"id": "revised_body",
"kind": "agent",
"with": {
"topic": "{{ inputs.user_message | xml_escape | truncate(200) }}",
"method": "{{ outputs.draft_method }}",
"outline": "{{ outputs.outline }}",
"results": "{{ outputs.draft_results }}",
"discussion": "{{ outputs.draft_discussion }}",
"introduction": "{{ outputs.draft_intro }}",
"citation_plan": "{{ outputs.citation_plan | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-revision-author",
"depends_on": [
"draft_intro",
"draft_method",
"draft_results",
"draft_discussion"
]
},
{
"id": "draft_abstract",
"kind": "agent",
"with": {
"topic": "{{ inputs.user_message | xml_escape | truncate(200) }}",
"revised_body": "{{ outputs.revised_body | truncate(8000) }}",
"citation_plan": "{{ outputs.citation_plan | truncate(8000) }}",
"paper_preferences": "{{ outputs.paper_preferences | truncate(4000) }}"
},
"skill": "paper-abstract-author",
"depends_on": [
"revised_body",
"citation_plan"
]
},
{
"id": "compile_latex",
"kind": "skill_exec",
"skill": "latex-compile",
"depends_on": [
"draft_abstract"
]
}
]
},
"description": "Draft a demo research paper end-to-end from a topic phrase: preference planning → web search → source curation → BibTeX → citation plan → topic-aware outline → figure → section drafts → global revision → abstract-last → xelatex compile → PDF.",
"meta_priority": 50
}
meta-paper-write (Meta-Skill, demo)
Take a research topic and produce a compiled PDF paper.
Pipeline (15 steps; preference planning runs first, search/experiment start concurrently, body sections run in parallel after source curation, citation planning, and plotting):
| # | step | kind | skill |
|---|---|---|---|
| ① | paper_preferences | agent | paper-preference-planner |
| ② | search_papers | skill_exec | multi-search-engine |
| ③ | experiment | skill_exec | paper-experiment-stub |
| ④ | refbib | skill_exec | paper-refbib-stub (reads ② on stdin) |
| ⑤ | source_pack | agent | paper-source-curator |
| ⑥ | outline | agent | paper-outline-author |
| ⑦ | citation_plan | agent | paper-citation-planner |
| ⑧ | plot | skill_exec | paper-plot-stub (reads ③'s results.csv) |
| ⑨ | draft_intro | agent | paper-section-author |
| ⑩ | draft_method | agent | paper-section-author |
| ⑪ | draft_results | agent | paper-section-author |
| ⑫ | draft_discussion | agent | paper-section-author |
| ⑬ | revised_body | agent | paper-revision-author |
| ⑭ | draft_abstract | agent | paper-abstract-author |
| ⑮ | compile_latex | skill_exec | latex-compile (assembles paper.tex, xelatex×3 + bibtex) |
Fallback
If the orchestration fails mid-pipeline, retry the failing step manually or
run the pieces directly. The script that compiles the LaTeX is
paper/compile.py; it expects paper/paper.tex and paper/references.bib
to exist.
Version History
- 7f72a32 Current 2026-07-05 18:41


