| name | huggingface-papers-weekly-digest |
| description | Produce concise Chinese digests of the current Hugging Face Daily Papers weekly page. Use when asked to summarize/trend top papers from huggingface.co/papers/week/current or the Weekly tab on Hugging Face Papers. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["Research","HuggingFace","Papers","Digest","Chinese"],"related_skills":["arxiv"]}} |
Hugging Face Papers Weekly Digest
Use this skill when producing a weekly digest from Hugging Face Papers, especially for cron jobs where no clarification is possible.
Workflow
-
Open the requested page with browser tools first
- Try
https://huggingface.co/papers/week/current because the user may specify it.
- If it returns 404, open
https://huggingface.co/papers and select/click the Weekly tab.
- Verify the page text shows a date range like
May 3-9, not a single daily date.
-
Extract the top papers from the loaded Weekly page
- Use browser console/DOM extraction rather than relying only on accessibility snapshots, because some titles are hidden/truncated in compact snapshots.
- Useful console snippet:
Array.from(document.querySelectorAll('article')).slice(0, 12).map((a, idx) => {
const titleEl = a.querySelector('a.line-clamp-3');
return {
rank: idx + 1,
title: titleEl?.innerText.trim(),
href: titleEl?.href,
text: a.innerText
};
})
-
Open individual paper pages for summaries when needed
- Hugging Face paper pages often include a useful first paragraph under Abstract labeled as an AI-generated summary, followed by the paper abstract.
- Browser navigation/snapshots work reliably for these pages;
web_extract may fail with AUTH_ERROR on Hugging Face and arXiv pages.
- If batch fetching via
fetch() returns HTML without rendered abstract, navigate to each paper page in the browser and read the snapshot.
-
Use arXiv as fallback, but avoid rate-limit pitfalls
- Paper IDs are usually in the HF URL:
/papers/2605.02881 → https://arxiv.org/abs/2605.02881.
- The arXiv Atom API can provide abstracts, but may timeout or return 429 if called too quickly. If using it, add a User-Agent and sleep ~3 seconds between requests, or use only for missing papers.
web_extract may be blocked/unauthorized for arXiv; prefer browser pages or the arXiv API.
-
Write the Chinese digest
- Keep it concise and useful.
- Group by theme when possible, e.g.:
- 具身智能 / 机器人 / 自动驾驶
- Agent / 搜索 / 自主研究
- 视频生成 / 扩散模型
- 多模态 / 评测 / 推理
- For each paper include:
- Title
- HF paper URL
- 1–2 Chinese sentences summarizing from title + HF abstract/page context
- End with
值得重点关注 listing 3 papers worth reading first and why.
Common Pitfalls
https://huggingface.co/papers/week/current may return 404; the current Weekly view may only be reachable from https://huggingface.co/papers via the Weekly tab.
- After clicking Weekly, the page may briefly show only the header while loading; wait or inspect
document.body.innerText after a short delay.
- Accessibility snapshots can omit some titles in compact mode; DOM extraction is more complete.
- Do not use
send_message inside cron jobs when the system says final response will be auto-delivered.
Weekly Feishu docx digest workflow
Use this variant when the user asks for a weekly Hugging Face Papers digest that must become a Feishu document and local wiki/archive files, especially scheduled Friday evening jobs.
-
Date and source verification
- Interpret the run date in
Asia/Shanghai / Asia/Singapore time: TZ=Asia/Shanghai date +%F.
- Try
https://huggingface.co/papers/week/current first. If it returns 404, open https://huggingface.co/papers, click the Weekly tab, and record the resulting /papers/week/YYYY-Www URL plus the visible date range.
- Do not treat the
/week/current 404 as a failure if the Weekly tab works; include a source caveat in the document, archive, log, and final cron response.
- Extract the visible weekly ranking via browser DOM first. Compact snapshots may omit titles after the first dozen papers, while DOM links often still contain
/papers/<arxiv_id>.
-
Selection and metadata extraction
- Select around 10 high-signal papers, not necessarily just rank 1-10. Prioritize agent/search/research automation, robotics/embodied AI, multimodal models, video generation, evaluation, infrastructure, and unusually useful workflow papers.
- For each selected paper, fetch
https://huggingface.co/papers/<arxiv_id> with requests.get(..., headers={'User-Agent':'Mozilla/5.0'}) after browser source verification. Parse title, authors, arXiv ID, HF URL, published date, submitted-by/date, organization/weekly label, and abstract/AI-generated summary.
- Author parsing pitfall: HF pages can show collapsed
+ N authors. Keep the visible names plus 等N位作者 if the full author list is collapsed; do not invent missing names.
- Metadata language pitfall: Feishu must be Chinese-only except paper titles, names, arXiv IDs, URLs, and technical terms. Convert visible metadata labels such as
Published on May 18, Submitted by X on May 19, and Weekly into Chinese labels such as 发布于 5月18日, 提交者 X,提交于 5月19日, and 周榜.
-
Chinese Feishu reading document requirements
- Write polished Chinese prose, not a bare archive stub. Preserve English paper titles and technical terms as names/terms, but avoid bilingual duplicate prose or English archive sections in Feishu.
- Required outline sections for weekly Feishu reading version:
本周一句话结论.
本周先看三类.
来源与作者归因 / 本周先看来源:这些内容分别是谁写的.
分类速览与论文卡片; each card includes 谁写的, 来源, HF 元信息, 贡献, Hermes 判断, 后续看点.
值得优先读.
后续阅读建议.
归档与追溯.
- Every significant claim about a paper must be attributed in the same card: paper authors, arXiv ID, HF URL, and HF published/submitted metadata where visible.
- Group papers by theme rather than blindly listing rank order; top themes often include
Agent、GUI 与自主研究系统, 可信评测与证据归因, and 训练自我改进与生成基础设施.
-
Weekly Feishu docx creation and verification
- Use Feishu OpenAPI with credentials from
/Users/leiyuxuan/.hermes/.env; never print secrets.
- Create docx title
Hugging Face 本周论文速览|YYYY-MM-DD.
- Use true docx heading blocks to generate the Feishu outline: block type 3/
heading1 for H1, 4/heading2 for H2, 5/heading3 for H3. Use paragraph/list/quote blocks for body content only.
- Insert blocks in chunks of about 35-40 under root block id equal to the document id. Use
document_revision_id=-1.
- Verify by listing root children (retry without
document_revision_id if needed). Require at least 25 blocks, block types include 3/4/5, and raw listed block JSON contains explicit 作者: or 谁写的: plus HF URL. If verification fails, recreate/rewrite before reporting success.
- Feishu URL quirk: if
.env has FEISHU_DOMAIN=feishu, still build https://www.feishu.cn/docx/<document_id> rather than https://feishu/docx/....
-
Weekly archive and log
- Save Chinese markdown archive under
/Users/leiyuxuan/Documents/PyCharm_Project/wiki/_global/wiki/queries/hf-weekly-papers/zh/hf-weekly-papers-YYYY-MM-DD.zh.md.
- Save compact raw/source context under
/Users/leiyuxuan/Documents/PyCharm_Project/wiki/_global/raw/hf-weekly-papers/YYYY-MM-DD/hf-weekly-papers-context.json.
- Add
feishu_doc: <url> to archive frontmatter and a visible 飞书文档中文阅读版:<url> line near the top.
- Update
/Users/leiyuxuan/Documents/PyCharm_Project/wiki/_global/log.md with Feishu doc URL, archive path, raw context path, selected paper count, source caveat, and verification result. If rerunning after an imperfect draft, replace the same-date log entry with the latest verified doc URL so the archive/log do not point to rough drafts.
-
Weekly final cron response
- Do not use
send_message; cron final response is auto-delivered.
- Chinese only and short: put the Feishu doc link first, then top 3 themes, then a brief source/permission caveat.
- Mention that the doc contains explicit paper-author/source attribution.
Daily Feishu docx digest workflow
Use this variant when the user asks for a daily Hugging Face Papers digest that must become a Feishu document and local wiki/archive files.
-
Date and source verification
- Interpret the run date in
Asia/Shanghai / Asia/Singapore time: TZ=Asia/Shanghai date +%F.
- Open
https://huggingface.co/papers with the browser first and verify it is the Daily view: page title like Daily Papers - Hugging Face and visible date like May 13 matching the local date.
- If Hugging Face redirects to an older date (common on weekends or when no new papers are posted), still create/archive the run-date digest from the latest visible Daily page, but record a clear source caveat in raw context, markdown archive, Feishu document, log, and final response.
- Extract daily articles via DOM/BeautifulSoup/browser console; the compact accessibility snapshot can omit titles for lower-ranked papers. HF article DOM often has an initial
/papers/<id> anchor with empty text; choose the non-empty link with the same paper URL (or a.line-clamp-3) as the title rather than trusting the first anchor text.
- Idempotency: if a run-date archive/raw file already exists (e.g. after a prior partial cron run), read it before recreating. If it already has a Feishu doc URL and the document verifies successfully (>=25 blocks, block types include 3/4/5, explicit
作者: and HF URL attribution), do not create a duplicate document; report/verify the existing document and ensure the log is present.
-
Select papers
- Select around 6–10 high-signal papers, preserving visible rank/upvote ordering.
- Prioritize: agent memory/privacy, search/research agents, RL/post-training/evaluation, multimodal/video, robotics/embodied AI, and AI workflow infrastructure.
- For each selected
/papers/<arxiv_id> page, fetch the HF page and extract title, authors as displayed, arXiv ID, HF URL, published date, submitter, organization/submitter label if visible, AI-generated summary, and abstract/context.
- Practical extraction note: direct
requests.get(..., headers={'User-Agent':'Mozilla/5.0'}) + BeautifulSoup often works for HF paper pages and is faster than navigating every detail page in the browser after source verification. Use browser first for source verification, then scripted HTTP extraction for scale.
- HTTP fallback learned in practice: if Python
requests.get() fails with SSLError: UNEXPECTED_EOF_WHILE_READING against huggingface.co, use curl -L --http1.1 -A 'Mozilla/5.0' -sS <url> from Python via subprocess.check_output() and parse the returned HTML with BeautifulSoup. This recovered both the Daily list and detail pages when requests failed. Wrap curl fetches in a small retry loop (e.g. 3 attempts with 1-2s sleep), because transient curl: (35) TLS connect error can occur and should not make the whole digest fail.
- Practical author parsing note: on HF detail pages, use the bounded text section between
Authors: and Abstract when both markers are present; this captured the full visible author list in practice. Guard it strictly with the Abstract boundary so it cannot absorb abstract text. The selector button.whitespace-nowrap.underline is useful and often cleaner than raw bounded text for visible author names; if it returns names, prefer it after de-duplication, otherwise fall back to bounded text. For long author lists, write the visible first names plus 等N位作者.
- Practical metadata parsing note:
Submitted by ... on ... · <org> Upvote is not always present and newline-separated parsing can miss dates if whitespace differs. Prefer applying regex to a whitespace-normalized full text such as flat = re.sub(r'\\s+', ' ', page_text), then match Published on\s+([A-Z][a-z]+ \d{1,2}) and Submitted by\s+(.{1,120}?)\s+on\s+([A-Z][a-z]+ \d{1,2})(.*?)(?:\s+Upvote\b|\s+Authors:). Guard metadata captures with maximum length checks; if the detail-page submitter capture is suspiciously shorter than the daily-list handle (e.g. regex captures ssz while the list shows ssz1111), keep the daily-list handle instead. If org is absent, reuse the organization/submitter label from the daily list when available, otherwise write HF 页面未显示明确组织. If the optional organization capture or regex tail starts with Upvote (for pages with no · <org>), treat it as missing organization rather than writing Upvote 89 +81 into the document; strip #N Paper of the day and split on \s+Upvote\b before accepting an org. In the daily list, the first numeric link after Submitted by/login is the visible upvote count; later numeric /papers/<id> links can be comments/artifacts and should not replace it.
- Important pitfall: HF arXiv IDs may be future-looking synthetic/current IDs that are not yet available in the arXiv Atom API. Do not depend on arXiv API for metadata; use HF page content as primary source and only fallback to arXiv when it is clearly available.
- Important pitfall: daily list text may show
58 authors or +N authors; do not treat that as an organization. If no organization is shown, say HF 页面未显示明确组织 rather than inventing one.
-
Chinese synthesis requirements
- Write Chinese-only prose while preserving English titles, names, arXiv IDs, URLs, and necessary technical terms.
- Required sections for Feishu reading version:
阅读说明 with source/raw/wiki paths preserved.
今日一句话结论.
今日先看三条 with 3 concise bullets.
论文卡片; for each paper include 作者, arXiv ID, HF URL, submitted by/org/date, 发生了什么, Hermes 判断.
值得优先读 with 3 papers and reasons.
归档与追溯 with archive path and raw context path.
- Avoid rough dumps: synthesize and prioritize.
-
Create Feishu docx via OpenAPI
- Load Feishu credentials from
/Users/leiyuxuan/.hermes/.env without printing secrets.
- Get tenant token:
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal.
- Create docx:
POST /open-apis/docx/v1/documents with title Hugging Face Daily Papers|YYYY-MM-DD.
- Build the final Feishu URL from the returned
document_id as https://www.feishu.cn/docx/<document_id> before appending blocks, then insert that real URL into the document body and archive frontmatter. If the body template used a placeholder, replace it after doc creation and before block append.
- Append blocks to root block id equal to the
document_id using POST /open-apis/docx/v1/documents/:document_id/blocks/:document_id/children?document_revision_id=-1.
- Use simple block types: 2 text, 3 heading1, 4 heading2, 5 heading3, 12 bullet. Batch about 35-40 blocks per request and sleep about 0.5s between requests to avoid edit rate limits.
- Feishu docx block payloads that worked in practice:
- Paragraph:
{"block_type":2,"text":{"elements":[{"text_run":{"content":"...","text_element_style":{}}}],"style":{}}}
- H1/H2/H3: same shape, with
block_type 3/4/5 and top-level key heading1/heading2/heading3 instead of text.
- Bullet: same shape, with
block_type 12 and top-level key bullet.
- To support a real Feishu outline, put conclusion first, themes second, evidence/source attribution third, follow-up actions fourth, archive/traceability last, and create each outline level as true block types 3/4/5 rather than plain paragraph text.
- After writing, verify by listing root children via OpenAPI, not
feishu_doc_read (that tool may be unavailable outside a Feishu comment context). Require at least 25 blocks, block types include 3/4/5, and the returned block text contains explicit 作者: plus HF URL attribution. If the listing endpoint with document_revision_id=-1 fails, retry the same children-list endpoint without document_revision_id; both forms have worked in practice depending on Feishu API behavior. If permission/listing scopes fail but creation/editing succeeded, report the limitation instead of discarding the document.
-
Archive and log
- Save markdown archive under
/Users/leiyuxuan/Documents/PyCharm_Project/wiki/_global/wiki/queries/hf-daily-papers/zh/hf-daily-papers-YYYY-MM-DD.zh.md.
- Save compact raw/source context under
/Users/leiyuxuan/Documents/PyCharm_Project/wiki/_global/raw/hf-daily-papers/YYYY-MM-DD/hf-daily-papers-context.json.
- Add
feishu_doc: <url> to archive frontmatter and a visible 飞书文档中文阅读版:<url> line near the top.
- Update
/Users/leiyuxuan/Documents/PyCharm_Project/wiki/_global/log.md with Feishu doc URL, archive path, raw context path, selected paper count, source caveat, and verification result. For reruns after an imperfect draft or after a duplicate document was created, replace the same-date ## HF Daily Papers|YYYY-MM-DD log entry with the latest verified doc URL instead of appending another same-date entry. The archive frontmatter and visible Feishu line should also point to the latest verified doc.
- Use direct filesystem reads/writes in scripts; do not write
read_file display prefixes back into markdown.
- Feishu URL quirk: if
/Users/leiyuxuan/.hermes/.env has FEISHU_DOMAIN=feishu, do not build https://feishu/docx/...; use https://www.feishu.cn/docx/<document_id> instead, matching existing archive/log links.
-
Final cron response
- Do not use
send_message; cron final response is auto-delivered.
- Chinese only, short, Feishu doc link first.
- Include top 3 themes, archive path, raw context path, verification status, and any source/permission caveat.
Verification
Before finalizing weekly or daily digests, verify:
- The source page is the intended view: Weekly for weekly jobs; Daily for daily jobs. For daily runs on weekends/no-post days, an older visible date is acceptable only if the document/archive/log/final response clearly record the redirect/source caveat.
- Top papers are ordered by visible ranking/upvotes from the page.
- Each entry has a working Hugging Face paper URL.
- For daily Feishu jobs, the document was created, has at least 25 blocks, and includes explicit paper-author/source attribution.
- The final response is in Chinese and includes the required priority section (
值得重点关注 for weekly, 值得优先读 for daily).