SKILL.md
DL Paper Code Blog
Overview
This skill turns the standardized "paper + repo" bundle into a publish-ready article: you will read the PDF derivatives, inspect the code snapshot, fill the scaffold outline, write the final Markdown post, and keep figure assets synced with Lsky. Everything lives inside a pre-generated workspace, so the work is editorial/reporting instead of scraping.
Key ingredients live in materialsmanifest.json, paper/, code/, .lskyuploadcache.json, and articlescaffold.md. The assets/articlescaffoldtemplate.md file can be copied whenever you need a fresh outline.
1. Intake the Bundle
- Map the workspace. Use the checklist in [references/materials.md](references/materials.md) to understand where each artifact sits (paper text, figure crops, repo context, bibliography, cache files).
- Verify availability. If the manifest references missing directories (e.g., repo not captured), pause and ask the user; otherwise continue.
- Prepare the scaffold. Copy
assets/articlescaffoldtemplate.md into the project root (or overwrite the existing article_scaffold.md). This is your scratchpad for planning.
2. Research & Outline
Follow the phased process described in [references/workflow.md](references/workflow.md):
- Paper deep dive: mine
papertext.txt, figuresmanifest.json, and rendered pages to capture the narrative, metrics, and figure references. Take notes directly in the scaffold.
- Code reconnaissance: read
code/repocontext.md (plus repomanifest.json) to understand repo layout, commands, configs, and practical pitfalls worth mentioning in the blog.
- Extra context: skim anything the user left in
sources/ and cite it explicitly if used.
- Outline: fill every
TODO inside article_scaffold.md so each section already contains bullet-point evidence (source + snippet). This keeps the drafting phase deterministic and makes reviews easy.
3. Draft & Polish the Article
Use the structure in [references/blogoutline.md](references/blogoutline.md):
- Metadata/title block in Chinese followed by the hero figure.
## 5-minute TL;DR with bullet proof points referencing both paper and repo.
- Sections 1-6 covering task motivation, method storyline, training/experiments, code reproduction guide, learner takeaways, and paper-vs-code differences.
- "References" citing the paper and any supporting DOIs/links.
Writing tips:
- Everything stays in Simplified Chinese with a friendly-but-technical tone (see [references/writingspec.md](references/writingspec.md) for precise requirements, including title rules, section depth, citations, and limited use of code/inline formulas).
- Target length: 5000-7000 non-whitespace characters. Use
scripts/checkarticlelength.py during QA to keep output stable.
- Use
scripts/checkarticlerequirements.py to enforce mechanical constraints (title/metadata, references section, ban paper/pages, and optionally require https image URLs after Lsky sync).
- Do a final human self-review pass with [references/selfreview.md](references/selfreview.md) to ensure the article "explains clearly" (no guessing, evidence-backed claims, readable structure, figure-text consistency).
- Alternate paragraphs and bullet lists so readers can skim.
- Whenever you mention a claim, cite both the PDF section (page or figure) and the repo file/command that corroborates it.
- Keep
articlescaffold.md alongside the final <slug>blog.md so reviewers can trace back to sources.
4. Figures & Asset Logistics
Manage visuals according to [references/figures.md](references/figures.md):
- Select 4-6 figures: one front-matter image, at least one method diagram, several experiment/ablation plots or tables.
- Draft using local cropped images from
paper/figures/ (and paper/frontmatter/). Then run scripts/synclskyimages.py to upload via the installed lsky-uploader skill, update .lskyupload_cache.json, and rewrite the blog Markdown to use returned URLs.
- If downstream platforms need bundled PNGs, mirror the used figures under
saladblogassets/images/figN.png.
- Double-check all links resolve before handing off.
5. Journal Metrics (JCR + CAS)
If you need accurate journal impact factor / quartiles and CAS partitions, use the local SQLite DB generated from your Excel tables:
- Build/update DB from your Excel source:
scripts/buildjournalmetrics_db.py --overwrite
- Query by journal name or ISSN:
scripts/queryjournalmetrics.py --journal "Advanced Science"
The DB file lives at references/journalmetrics2025.sqlite3. If it is missing, run scripts/buildjournalmetrics_db.py --overwrite to generate it locally.
Deliverables Checklist
When you finish a project, ensure the workspace contains:
- Updated
article_scaffold.md with your filled outline.
- Final
<slug>_blog.md (or blog.md if the user specified one filename) following the outline.
- Updated
.lskyuploadcache.json if any new figures were uploaded.
- Optional:
saladblogassets/images/ containing all referenced media.
Document blockers (missing repo, corrupt PDF, etc.) at the top of the blog before the TL;DR if you cannot complete a section.
Resources
- [references/materials.md](references/materials.md) - directory map + file purposes.
- [references/workflow.md](references/workflow.md) - phased process from intake to QA.
- [references/blogoutline.md](references/blogoutline.md) - mandatory section order, tone, and formatting.
- [references/figures.md](references/figures.md) - figure selection, Lsky uploads, cache maintenance, and optional asset packaging.
- [references/writingspec.md](references/writingspec.md) - condensed SML prompt constraints (audience, tone, title format, length, references, image callouts).
lsky-uploader skill - required for scripts/synclskyimages.py (set LSKY_TOKEN before running).
scripts/buildjournalmetrics_db.py - converts your Excel tables into a queryable SQLite DB under references/.
scripts/queryjournalmetrics.py - looks up JCR/CAS metrics for the metadata block.
scripts/synclskyimages.py - uploads local images and rewrites Markdown links to Lsky URLs.
scripts/checkarticlelength.py - counts characters and reports per-section breakdown.
scripts/checkarticlerequirements.py - validates title/metadata/references and blocks forbidden figure sources.
- [references/selfreview.md](references/selfreview.md) - human checklist for clarity and final polish.
- [assets/articlescaffoldtemplate.md](assets/articlescaffoldtemplate.md) - copy this template into each project root to start outlining.