Skip to content

Commit 2612d50

Browse files
committed
fix(paper-review): sync skill docs and scripts with full PipelineConfig options
review_paper.py and review_tex.py were missing several CLI flags that PipelineConfig already supports (--language, --instructions, --vision-max-pages, --format-vision-max-pages, --no-safety/correctness/criticality). Added the missing args and wired them into PipelineConfig. Updated SKILL.md and reference.md to reflect all available options. Made-with: Cursor
1 parent 1381642 commit 2612d50

4 files changed

Lines changed: 103 additions & 0 deletions

File tree

skills/paper-review/SKILL.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ pip install pypdfium2 # only if using vision mode (use_vision_for_pdf=True)
4141
| Model name | No | Default: `gpt-4o`. Claude: `claude-opus-4-5`, Qwen: `qwen-plus` |
4242
| Discipline | No | If not given, uses general CS/ML-oriented prompts |
4343
| Venue | No | e.g. `"NeurIPS 2025"`, `"The Lancet"` |
44+
| Instructions | No | Free-form reviewer guidance, e.g. `"Focus on experimental design"` |
45+
| Language | No | `"en"` (default) or `"zh"` for Simplified Chinese output |
4446
| BibTeX file | No | Required only for reference verification |
4547
| CrossRef email | No | Improves API rate limits for BibTeX verification |
4648

@@ -63,15 +65,75 @@ python skills/paper-review/scripts/review_paper.py paper.pdf
6365
python skills/paper-review/scripts/review_paper.py paper.pdf \
6466
--discipline cs --venue "NeurIPS 2025"
6567

68+
# Chinese output
69+
python skills/paper-review/scripts/review_paper.py paper.pdf --language zh
70+
71+
# Custom reviewer instructions
72+
python skills/paper-review/scripts/review_paper.py paper.pdf \
73+
--instructions "Focus on experimental design and reproducibility"
74+
6675
# PDF + BibTeX verification
6776
python skills/paper-review/scripts/review_paper.py paper.pdf \
6877
--bib references.bib --email your@email.com
6978

79+
# Vision mode (for models that prefer images over text extraction)
80+
python skills/paper-review/scripts/review_paper.py paper.pdf \
81+
--vision --vision-max-pages 30 --format-vision-max-pages 10
82+
7083
# TeX source package
7184
python skills/paper-review/scripts/review_tex.py paper_source.tar.gz \
7285
--discipline biology --email your@email.com
86+
87+
# TeX source package with Chinese output and custom instructions
88+
python skills/paper-review/scripts/review_tex.py paper_source.tar.gz \
89+
--language zh --instructions "This is a short paper, be concise"
7390
```
7491

92+
## All options — review_paper.py
93+
94+
| Flag | Default | Description |
95+
|------|---------|-------------|
96+
| `--model` | `gpt-4o` | Model name |
97+
| `--api-key` | env var | API key |
98+
| `--base-url` || Custom API endpoint |
99+
| `--discipline` || Academic discipline |
100+
| `--venue` || Target conference/journal |
101+
| `--instructions` || Free-form reviewer guidance |
102+
| `--language` | `en` | Output language: `en` or `zh` |
103+
| `--bib` || Path to .bib file |
104+
| `--email` || CrossRef mailto for BibTeX check |
105+
| `--paper-name` | PDF stem | Paper title in report |
106+
| `--output` | auto | Output .md report path |
107+
| `--no-safety` | off | Skip safety checks |
108+
| `--no-correctness` | off | Skip correctness check |
109+
| `--no-criticality` | off | Skip criticality verification |
110+
| `--no-bib` | off | Skip BibTeX verification |
111+
| `--vision` | off | Use vision mode (requires pypdfium2) |
112+
| `--vision-max-pages` | `30` | Max pages in vision mode (0 = all) |
113+
| `--format-vision-max-pages` | `10` | Max pages for format check (0 = use `--vision-max-pages`) |
114+
| `--timeout` | `7500` | API timeout in seconds |
115+
116+
## All options — review_tex.py
117+
118+
| Flag | Default | Description |
119+
|------|---------|-------------|
120+
| `--model` | `gpt-4o` | Model name |
121+
| `--api-key` | env var | API key |
122+
| `--base-url` || Custom API endpoint |
123+
| `--discipline` || Academic discipline |
124+
| `--venue` || Target conference/journal |
125+
| `--instructions` || Free-form reviewer guidance |
126+
| `--language` | `en` | Output language: `en` or `zh` |
127+
| `--email` || CrossRef mailto for BibTeX check |
128+
| `--paper-name` | package stem | Paper title in report |
129+
| `--output` | auto | Output .md report path |
130+
| `--no-safety` | off | Skip safety checks |
131+
| `--no-correctness` | off | Skip correctness check |
132+
| `--no-criticality` | off | Skip criticality verification |
133+
| `--no-bib` | off | Skip BibTeX verification |
134+
| `--bib-only` || Verify a standalone .bib file only |
135+
| `--timeout` | `7500` | API timeout in seconds |
136+
75137
## Interpreting results
76138

77139
**Review score (1–6):**

skills/paper-review/reference.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
| `crossref_mailto` | str \| None | `None` | Email for CrossRef API; improves rate limits |
1818
| `discipline` | str \| DisciplineConfig \| None | `None` | Discipline ID or custom config |
1919
| `venue` | str \| None | `None` | Target venue name, applied on top of discipline criteria |
20+
| `instructions` | str \| None | `None` | Free-form reviewer guidance, e.g. "Focus on experimental design" |
21+
| `language` | str \| None | `None` | Output language: `"en"` (default) or `"zh"` (Simplified Chinese) |
2022
| `use_vision_for_pdf` | bool | `False` | Render PDF pages as images (needs `pypdfium2`) |
2123
| `vision_max_pages` | int \| None | `30` | Max pages when using vision mode |
2224
| `format_vision_max_pages` | int \| None | `10` | Max pages for Format grader in vision mode |
@@ -70,7 +72,12 @@ options:
7072
--no-correctness Skip correctness check
7173
--no-criticality Skip criticality verification
7274
--no-bib Skip BibTeX verification
75+
--language LANG Output language: en (default) or zh
76+
--instructions TEXT Free-form reviewer guidance
7377
--vision Use vision mode (render pages as images)
78+
--vision-max-pages N Max pages in vision mode (default: 30, 0 = all)
79+
--format-vision-max-pages N
80+
Max pages for format check in vision mode (default: 10)
7481
--timeout SECONDS API timeout (default: 7500)
7582
```
7683

@@ -92,7 +99,12 @@ options:
9299
--paper-name NAME Paper title for report header
93100
--output FILE Output .md report file
94101
--email EMAIL CrossRef email for BibTeX rate limits
102+
--no-safety Skip safety/jailbreak checks
103+
--no-correctness Skip correctness check
104+
--no-criticality Skip criticality verification
95105
--no-bib Skip BibTeX verification
106+
--language LANG Output language: en (default) or zh
107+
--instructions TEXT Free-form reviewer guidance
96108
--timeout SECONDS API timeout (default: 7500)
97109
```
98110

skills/paper-review/scripts/review_paper.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
python review_paper.py paper.pdf --discipline cs --venue "NeurIPS 2025"
88
python review_paper.py paper.pdf --bib refs.bib --email you@example.com
99
python review_paper.py paper.pdf --model claude-opus-4-5
10+
python review_paper.py paper.pdf --language zh
11+
python review_paper.py paper.pdf --instructions "Focus on experimental design"
1012
"""
1113

1214
import argparse
@@ -56,6 +58,14 @@ def parse_args():
5658
parser.add_argument("--no-criticality", action="store_true", help="Skip criticality verification")
5759
parser.add_argument("--no-bib", action="store_true", help="Skip BibTeX verification even if --bib is given")
5860
parser.add_argument("--vision", action="store_true", help="Use vision mode (render PDF pages as images). Requires pypdfium2.")
61+
parser.add_argument("--vision-max-pages", type=int, default=30, metavar="N",
62+
help="Max pages to send in vision mode (default: 30). Set 0 for all pages.")
63+
parser.add_argument("--format-vision-max-pages", type=int, default=10, metavar="N",
64+
help="Max pages for format check in vision mode (default: 10). Set 0 to use --vision-max-pages.")
65+
parser.add_argument("--language", metavar="LANG", choices=["en", "zh"],
66+
help="Output language for the review: 'en' (default) or 'zh' (Simplified Chinese)")
67+
parser.add_argument("--instructions", metavar="TEXT",
68+
help="Free-form reviewer instructions, e.g. 'Focus on experimental design'")
5969
parser.add_argument("--timeout", type=int, default=7500, metavar="SECONDS", help="API timeout in seconds (default: 7500)")
6070
return parser.parse_args()
6171

@@ -111,13 +121,17 @@ async def run_review(args):
111121
timeout=args.timeout,
112122
discipline=args.discipline,
113123
venue=args.venue,
124+
instructions=args.instructions,
125+
language=args.language,
114126
enable_safety_checks=not args.no_safety,
115127
enable_correctness=not args.no_correctness,
116128
enable_review=True,
117129
enable_criticality=not args.no_criticality,
118130
enable_bib_verification=has_bib,
119131
crossref_mailto=args.email,
120132
use_vision_for_pdf=args.vision,
133+
vision_max_pages=args.vision_max_pages or None,
134+
format_vision_max_pages=args.format_vision_max_pages or None,
121135
)
122136

123137
pipeline = PaperReviewPipeline(config)

skills/paper-review/scripts/review_tex.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
python review_tex.py paper_source.tar.gz
77
python review_tex.py paper_source.zip --discipline biology
88
python review_tex.py --bib-only references.bib --email you@example.com
9+
python review_tex.py paper_source.tar.gz --language zh
10+
python review_tex.py paper_source.tar.gz --instructions "Focus on methodology"
911
"""
1012

1113
import argparse
@@ -52,7 +54,14 @@ def parse_args():
5254
parser.add_argument("--paper-name", metavar="NAME", help="Paper title for the report")
5355
parser.add_argument("--output", metavar="FILE", help="Output .md report path")
5456
parser.add_argument("--email", metavar="EMAIL", help="Your email for CrossRef API (recommended for BibTeX check)")
57+
parser.add_argument("--no-safety", action="store_true", help="Skip safety checks")
58+
parser.add_argument("--no-correctness", action="store_true", help="Skip correctness check")
59+
parser.add_argument("--no-criticality", action="store_true", help="Skip criticality verification")
5560
parser.add_argument("--no-bib", action="store_true", help="Skip BibTeX verification")
61+
parser.add_argument("--language", metavar="LANG", choices=["en", "zh"],
62+
help="Output language for the review: 'en' (default) or 'zh' (Simplified Chinese)")
63+
parser.add_argument("--instructions", metavar="TEXT",
64+
help="Free-form reviewer instructions, e.g. 'Focus on experimental design'")
5665
parser.add_argument("--timeout", type=int, default=7500, metavar="SECONDS", help="API timeout in seconds")
5766
return parser.parse_args()
5867

@@ -158,6 +167,12 @@ async def run_tex_review(args):
158167
timeout=args.timeout,
159168
discipline=args.discipline,
160169
venue=args.venue,
170+
instructions=args.instructions,
171+
language=args.language,
172+
enable_safety_checks=not args.no_safety,
173+
enable_correctness=not args.no_correctness,
174+
enable_review=True,
175+
enable_criticality=not args.no_criticality,
161176
enable_bib_verification=not args.no_bib,
162177
crossref_mailto=args.email,
163178
)

0 commit comments

Comments
 (0)