Inserts, formats, and cross-references academic citations in docx. Invoke when user needs to insert references, fix citation order, add cross-reference hyperlinks, or reformat bibliography to Chinese (GB/T 7714) or international (IEEE/APA) standards.
A comprehensive tool for inserting, formatting, and cross-referencing academic references in Word (.docx) documents. Supports Chinese national standard GB/T 7714-2015 and major international journal formats (IEEE, APA 7th).
Invoke this skill when the user:
| Format | Region | Common In | Ordering | In-text style | |--------|--------|-----------|----------|---------------| | GB/T 7714-2015 | China (中文) | 计算机工程与应用, 自动化学报 | Sequential [1][2][3] | [N] | | IEEE | International | Engineering, CS journals | Sequential [1][2][3] | [N] | | APA 7th | International | Psychology, Education, Business | Alphabetical | (Author, Year) |
Before making any changes, ALWAYS run the analysis script to understand the current state:
python scripts/insert_refs.py analyze --input <paper.docx>
This will output:
Ask the user which format they need (if not already specified):
If the document already has references, auto-detect the format.
Run the reformat command:
# GB/T 7714-2015
python scripts/insert_refs.py reformat --input <paper.docx> --format gbt7714
# IEEE
python scripts/insert_refs.py reformat --input <paper.docx> --format ieee
# APA 7th
python scripts/insert_refs.py reformat --input <paper.docx> --format apa7
If the format requires sequential numbering (GB/T 7714, IEEE), reorder references to match first citation order in text:
python scripts/insert_refs.py reorder --input <paper.docx>
Add bookmarks to each bibliography entry and convert all in-text citations to clickable hyperlinks:
python scripts/insert_refs.py hyperlink --input <paper.docx>
Run comprehensive validation:
python scripts/insert_refs.py validate --input <paper.docx> --format gbt7714
Checks performed:
Provide the user with a clear summary of:
[序号] 作者. 题名[J]. 刊名, 出版年, 卷(期): 起止页码.
Rules:
Lastname FirstInitial SecondInitial (e.g., Wang Y, Wu H)刘云) in Chinese journals, use pinyin Liu Y in English journals, et al.Examples:
[1] Wang Y, Wu H, Dong J, et al. TimeXer: Empowering transformers for time series forecasting with exogenous variables[J]. Advances in Neural Information Processing Systems, 2024, 37: 469-498.
[2] 刘云, 胡涛, 张华, 等. 基于深度学习的空气质量预测综述[J]. 计算机工程与应用, 2024, 60(2): 1-15.
[序号] 作者. 题名[C]//会议录名称. 出版地: 出版者, 出版年: 起止页码.
Example:
[3] Zeng A, Chen M, Zhang L, et al. Are transformers effective for time series forecasting?[C]//Proceedings of the AAAI Conference on Artificial Intelligence. 2023: 11121-11128.
[序号] 作者. 书名[M]. 出版地: 出版者, 出版年.
Example:
[4] Box G E, Jenkins G M, Reinsel G C, et al. Time series analysis: forecasting and control[M]. John Wiley & Sons, 2015.
[序号] 作者. 题名[D]. 出版地: 出版单位, 出版年.
[序号] 发布机构. 标准编号 标准名称[S]. 出版地: 出版者, 出版年.
[序号] 作者. 题名[EB/OL]. (发布日期)[引用日期]. URL.
Treat as [J] with journal name arXiv preprint arXiv:XXXX:
[5] Liu Y, Hu T, Zhang H, et al. iTransformer: Inverted transformers are effective for time series forecasting[J]. arXiv preprint arXiv:2310.06625, 2023.
| Tag | Document Type | |-----|--------------| | [J] | Journal article | | [C] | Conference paper | | [M] | Monograph (book) | | [D] | Dissertation | | [N] | Newspaper | | [S] | Standard | | [P] | Patent | | [R] | Report | | [EB/OL] | Electronic resource |
Last F M format. between fields, not ;.[1] A. Author, B. Author, and C. Author, "Title of article," Journal Name, vol. X, no. Y, pp. Z1-Z2, Month, Year.
Rules:
F. Lastname (initial then last name), between authors, and before lastvol., no., pp. abbreviations[2] A. Author and B. Author, "Title," in Conference Proceedings, Year, pp. X-Y.
[3] A. Author, Book Title, Xth ed. City, State: Publisher, Year.
Author, A. A., & Author, B. B. (Year). Title of article. Journal Name, Volume(Issue), page-page. https://doi.org/xxxx
Rules:
Last, F. M. format& before last authorAuthor, A. A. (Year). Title of work: Capital letter also for subtitle. Publisher.
| Issue | Detection | Fix |
|-------|-----------|-----|
| Missing type tag | [J] not found in ref | Auto-detect from source pattern |
| Author name format wrong | Name has incorrect capitalization or order | Normalize to target format |
| No matching citation | Ref in bib but never cited | Either remove ref or add citation with [TODO: add citation context] |
| No matching ref | Citation [N] in text but not in bib | Add placeholder ref entry |
| Duplicate citation numbers | Two refs with same number | Renumber sequentially |
| Gaps in numbering | [1], [2], [4] without [3] | Compact to sequential |
If any step fails:
_backup_refs.docx)After running the full workflow:
| File | Description |
|------|-------------|
| paper.docx (original) | Updated with hyperlinks |
| paper_backup_refs_YYYYMMDD_HHMMSS.docx | Timestamped pre-modification backup |
| paper_analysis.json | Citation analysis report |
Before reporting completion, verify ALL of:
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/academic-ref-inserter · pinned to the source commit
git clone https://github.com/fuwenhao12/academic-ref-inserter.git
cd academic-ref-inserter
git checkout dfa079ec9be76d30a2053522fdc8bb7fc986c136
mkdir -p ".claude/skills/academic-ref-inserter"
cp -r . ".claude/skills/academic-ref-inserter"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit dfa079ec9be7. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.