Community编程与开发github.com

GreenWich-art/agent-skills

参考文献的 GB/T 7714-2015 著录规范化,以及 URL / DOI / PMID / PMC 链接的 可访问性批量核验与"假失效"识别。 触发场景: - 论文 / 综述 / 作业要交,需要核对参考文献格式 - "帮我按国标改一下参考文献" - 要交付一份文献清单,需要确认链接没死 - 已经有一堆 links,要批量验证哪些还能打开 含一个可复用脚本 `scripts/check_refs.py`,能自动判别 URL / DOI / PMID / PMC 并并发核验,且能区分「真死」与「被反爬」——后者不该判为失效。 不适用:从零生成一份带引文的正文(那是写作任务); Zotero 样式定制(见正文第六节,按需手工改 CSL)。

agent-skills 是什么?

agent-skills is a Claude Code agent skill that 参考文献的 GB/T 7714-2015 著录规范化,以及 URL / DOI / PMID / PMC 链接的 可访问性批量核验与"假失效"识别。 触发场景: - 论文 / 综述 / 作业要交,需要核对参考文献格式 - "帮我按国标改一下参考文献" - 要交付一份文献清单,需要确认链接没死 - 已经有一堆 links,要批量验证哪些还能打开 含一个可复用脚本 `scripts/check_refs.py`,能自动判别 URL / DOI / PMID / PMC 并并发核验,且能区分「真死」与「被反爬」——后者不该判为失效。 不适用:从零生成一份带引文的正文(那是写作任务); Zotero 样式定制(见正文第六节,按需手工改 CSL)。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/GreenWich-art/agent-skills/tree/HEAD/skills/gbt7714-reference-check

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

GB/T 7714-2015 Reference Standardization & Link Validation

1. Why This Deserves Its Own Skill

This task has three characteristics: many detailed rules (document type identifiers, citation dates for electronic resources, different treatments for more than three authors), prone to error and silent (a mistake among dozens of strings is hard to spot), and once written incorrectly, hard to detect with the naked eye. Therefore, the focus is not on "remembering the rules" but on the programmatic write, read-back validation, and link verification workflow.

2. Key Points of GB/T 7714-2015 Description

Basic Structure

[Serial Number] Primary Author. Title[Document Type Identifier/Carrier Identifier]. Source, Year, Volume(Issue): Page Numbers.

Common Type Identifiers

TypeIdentifierElectronic Format
Regular Book[M][M/OL]
Journal Article[J][J/OL]
Newspaper Article[N][N/OL]
Thesis/Dissertation[D][D/OL]
Report[R][R/OL]
Standard[S]—
Electronic Bulletin[EB/OL]—
Patent[P][P/OL]

Three Critical Rules

  1. Electronic resources must include the access date and access path — per Section 4.9 of GB/T 7714-2015. For resources with URL/DOI, the standard format should be [J/OL]. Journal Name, Year, Volume(Issue): Page Numbers[Access Date]. https://.... Conversely, if the target journal/institution does not require it, removing the access date is acceptable, but you must be aware that this is a trade-off you are making.
  2. When there are more than 3 authors, write "Primary Author, et al." for Chinese references and "Primary Author, et al" for Western references. The standard allows listing all authors, but the style must be consistent throughout the same document.
  3. Western authors: surname first, given name abbreviated: Büller HR, Verhamme P, Weitz JI. Do not simply copy Buller HR from PubMed and drop the umlaut, and do not write HR Büller.

3. Link Validation (Core Tool)

# One item per line: URL / DOI / PMID / PMC ID; the script auto-detects the type
python3 scripts/check_refs.py refs.txt

# JSON input, supports explicit type specification
python3 scripts/check_refs.py refs.json --timeout 20 --workers 8

Exit code: 0 = no clearly failed items; 1 = failed items exist.

Supported input formats:

InputParsed Result
10.1056/NEJMoa2513880 or https://doi.org/...DOI link
25482425 (pure number)PubMed link
PMC2909362PMC link
https://... or bare domainAccessed as-is

Judgment Logic (Important)

The script divides results into three buckets. Do not flag a non-200 response as a failure immediately:

BucketConditionAction
Directly accessible200 / 203 / 30xPass
Suspected anti-crawl403 / 412 / 429 / 503 / 000 (no fatal error)Recheck via browser, not a broken link
Likely deadcurl clearly reports could not resolve host or similar DNS/certificate errorsConfirm, then replace or delete the link

Two tested pitfalls:

  • PubMed returns 203, which is not a failure. 203 was once treated as a failure, wasting a round of troubleshooting
  • curl -s silences DNS errors, causing "domain does not exist" and "network blocked" — two completely different situations — to both show as 000. The script now uses -sS and differentiates via stderr

Access Characteristics of Common Sites

SiteCharacteristics
nhc.gov.cn (National Health Commission)curl often returns 412 (anti-crawl), browser can open it normally
Wanfang med. domainHas anti-crawl measures; can instead use d.wanfangdata.com.cn/periodical/<xxx> format
CNKIUsually does not provide direct links; as long as the document can be retrieved, a URL is not strictly necessary
NEJM / LancetPaywall; curl often returns 403; having the DOI is sufficient

4. Writing Process: Preventing Character Corruption

This is the most easily overlooked and potentially harmful aspect of this skill.

Do not use long heredocs to write long lists of references directly into docx / json / py files. In practice, character corruption has occurred multiple times: wrong DOI prefix (e.g., 10.19546 instead of 10.7723), misspelled author names, garbled policy document numbers — and the writing process does not report errors.

Correct approach:

# 1) Construct the reference list as a Python data structure and write it programmatically as a whole block
refs = [
    {"id": 1, "text": "Büller HR, ...", "url": "https://...", "doi": "10.1056/..."},
    ...
]

# 2) Define a verification checklist
must_have = ["25482425", "10.1056/NEJMoa2513880", "Guoweiyifa", "Büller"]
bads      = ["10.7723", "management guideline", "ERUOIMMUON"]

# 3) Read back and verify immediately after writing
content = read_back()
missing = [s for s in must_have if s not in content]
leaked  = [s for s in bads if s in content]
assert not missing and not leaked, (missing, leaked)

must_have includes key identifiers (PMID, DOI, document numbers, difficult names/places); bads includes known incorrect forms. Both are necessary: the former prevents content loss; the latter prevents the generation of erroneous content.

5. Common Error Checklist (Review One by One)

ErrorExampleCorrect Approach
Merging data from different measurement methodsCombining "2-4% (RCT)" and "2-5% (real-world)" into a single numberKeep the methodological differences and write them separately
Incorrect volume/issue/page numbersBüller written as 2009;361:1722Actually from NEJM 2015;372:232-240
Citing a secondary source as primaryQuoting a number from a secondary review but citing the original RCTTrace back to the original source, or clearly state "quoted from"
Policy documents without a sourceFive documents cited in the text, but none listed in the reference listEvery policy/report cited in the text must appear in the reference list
Title in citation does not match actual publicationThe title of reference [1] does not match the actual published articleVerify the title of each entry individually
Misspelling of proper nounsEUROIMMUN written as ERUOIMMUONVisually verify proper nouns for each entry

6. Zotero / CSL Related

When you need to adjust the Zotero citation style, it is more controllable to directly modify the .csl file than to use plugin configurations. For example, the GB/T 7714-2015 numeric style includes [Access Date] at the end of each entry. To remove it from the entire style (a one-place change), locate the accessed-date macro and clear its content to <group/>. Also modify id / title / updated to avoid conflicts with the official style.

But remind yourself: GB/T 7714-2015 requires the access date for electronic resources (Section 4.9). Removing it may not comply with the standards of formal journals/dissertations. This is the user's own trade-off, and you should clearly communicate this decision, not silently remove it.

The one remaining access-date fallback in the issued-year macro (using the access year when issued is missing) is reasonable — do not delete it along with the others.

7. Verification Checklist

  • The document type identifier of each reference is consistent with whether /OL is present
  • The treatment of more than 3 authors is consistent throughout
  • Western names: surname first, given name abbreviated; diacritical marks are not lost
  • Electronic resources include access date (unless explicitly decided not to) and access path
  • DOI prefix is correct; no mixing of full-width and half-width characters
  • Links have been run through check_refs.py; "suspected anti-crawl" items have been rechecked with a browser
  • Passed the must_have / bads read-back check after writing
  • Every reference cited in the text appears in the reference list, and vice versa

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

GreenWich-art/agent-skills

桌面 GUI 操作的统一编排入口。当用户要求操作一个只有图形界面的应用(改设置、点按钮、填表单、操作无 CLI/连接器的软件)时使用此 skill。提供四级能力:①路由决策——判断任务该走连接器、浏览器控制、Office 技能、命令行还是 computer use 桌面接管;②授权引导——检测并引导用户完成 macOS 辅助功能/屏幕录制权限授权,处理授权不生效等常见坑;③任务派发与验证——按目标/边界/失败处理三段式描述派发 GUI 任务,并以最终截图为准确认结果;④AX 兜底层——内置 axctl 工具做元素级无障碍读写(AXPress 语义点击,不碰鼠标不抢焦点),适用于 computer use 不可用或轻量场景。台前调度全场景实测(macOS 15 + 27.0.1 复检)。触发词:操控电脑、操作某个软件、点某个按钮、GUI 操作、电脑设置。

GreenWich-art/agent-skills

按学术论文规范(小三黑体一级标题/四号黑体二级/小四正文宋体1.5倍行距/三线表/中西文混排Times New Roman/统计量斜体) 批量重整 Markdown 或已有 docx 的格式。用户说"按学术格式排版""三线表""小三号黑体标题""1.5倍行距" "数字英文用Times New Roman""P值斜体"时使用。基于 python-docx 直接生成 docx,不走逐段插入。 不适用:高校课程论文/作业的字体字号约定(标准不同);党政机关公文国标 GB/T 9704 (又是另一套标准)。三套标准不可混用。

GreenWich-art/agent-skills

Local OCR using the macOS Vision framework. Triggers: OCR, 识别图片文字, 提取截图内容, 扫描件转文字, 图片转文字, 扫描版PDF转文字, read text from image/screenshot/photo/scanned PDF. Local-first and offline; prefer it over cloud OCR whenever data is sensitive or the machine is offline.

GreenWich-art/agent-skills

Download open-access biomedical article PDFs from PMC with offline Proof-of-Work solving. Triggers: 下载文献PDF, PMC PDF, 403/404 on PDF link, Preparing to download, reCAPTCHA page, OA full text, supplementary files, download paper PDF.

相关技能