Fin Ref Paper logo

Fin Ref Paper

Community
csmar432
fin-ref-paper

从LIT_REVIEW.md和IDEA_REPORT.md中提取参考文献,自动生成符合JF/JFE/RFS/GB-T-7714格式的references.bib,并管理引用一致性。

Overview

Publishercsmar432
Repositoryfinai-research
Skill namefin-ref-paper
Stars
108
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by csmar432 on GitHub. Read the source before you install it.

Installation

Install the Fin Ref Paper AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/csmar432/finai-research/tree/main/.agents/skills/fin-ref-paper
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/csmar432/finai-research.git /tmp/finai-research
mkdir -p .claude/skills
cp -r /tmp/finai-research/.agents/skills/fin-ref-paper .claude/skills/fin-ref-paper
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Fin Ref Paper in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Fin Ref Paper on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Fin Ref Paper is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

fin-ref-paper

从LIT_REVIEW.md和IDEA_REPORT.md中提取参考文献,自动生成符合JF/JFE/RFS/GB-T-7714格式的references.bib,并管理引用一致性。

触发条件

  • 关键词: 参考文献 ref bib 引用格式 citation reference 文献引用 BibTeX
  • Skill语法: Skill: fin-ref-paper
  • 前置条件: 已有研究输出文件 (LIT_REVIEW.md, IDEA_REPORT.md 等)

参考文献管理流程

第一步:提取参考文献

从现有文档中自动提取参考文献信息:

python
from scripts.ref_paper import ReferenceExtractor, ExtractedReference

extractor = ReferenceExtractor()

# 从多个来源提取
extracted = extractor.extract_from_multiple(
    sources=[
        "output/fin-literature/LIT_REVIEW.md",
        "output/fin-ideas/IDEA_REPORT.md",
        "output/fin-novelty/NOVELTY_REPORT.md",
    ]
)

print(f"提取到 {len(extracted)} 条参考文献")
for ref in extracted[:3]:
    print(f"  - {ref.author} ({ref.year}). {ref.title}. {ref.journal}.")

提取的信息:

字段说明示例
author作者"Zhang, Y. and Li, X."
title标题"The Effect of Carbon Trading"
year年份2023
journal期刊"Journal of Finance"
volume卷"78"
issue期"3"
pages页码"1234-1289"
doiDOI"10.1111/jofi.12345"
urlURL(optional)

第二步:Enrich元数据

使用CrossRef API自动补全缺失信息:

python
import requests

def get_crossref_metadata(doi: str) -> dict:
    """通过DOI获取完整的文献元数据"""
    resp = requests.get(
        f"https://api.crossref.org/works/{doi}",
        headers={"User-Agent": "fin-research/1.0 (mailto:research@example.com)"}
    )
    if resp.status_code == 200:
        return resp.json()["message"]
    return {}

def enrich_reference(ref: ExtractedReference) -> ExtractedReference:
    """补全缺失字段"""
    if ref.doi:
        meta = get_crossref_metadata(ref.doi)
        ref.volume = meta.get("volume", ref.volume)
        ref.issue = meta.get("issue", ref.issue)
        ref.pages = meta.get("page", ref.pages)
        ref.publisher = meta.get("publisher", "")
        # 规范化作者列表
        authors_raw = meta.get("author", [])
        ref.author = "; ".join([
            f"{a['family']}, {a['given'][0]}." 
            for a in authors_raw
        ])
    return ref

API调用示例:

GET https://api.crossref.org/works/10.1111/jofi.12345

Response:
{
  "message": {
    "title": ["The Effect of Carbon Trading on Innovation"],
    "author": [
      {"family": "Zhang", "given": "Yi"},
      {"family": "Li", "given": "Xiao"}
    ],
    "container-title": ["Journal of Finance"],
    "volume": "78",
    "issue": "3",
    "page": "1234-1289",
    "DOI": "10.1111/jofi.12345",
    "published": {"date-parts": [[2023, 6]]}
  }
}

第三步:转换为BibTeX格式

python
def to_bibtex(ref: ExtractedReference, style: str = "jf") -> str:
    """将参考文献转换为BibTeX格式"""
    
    # 生成唯一引用键
    first_author = ref.author.split(";")[0].split(",")[0].strip()
    key = f"{first_author}{ref.year}"
    
    # 期刊缩写映射 (常见金融期刊)
    journal_abbr = {
        "Journal of Finance": "J. Finance",
        "Journal of Financial Economics": "J. Financ. Econ.",
        "Review of Financial Studies": "Rev. Financ. Stud.",
        "Quarterly Journal of Economics": "Q. J. Econ.",
        "American Economic Review": "Am. Econ. Rev.",
        "经济研究": "J. Econ. (China)",
        "金融研究": "J. Finance (China)",
    }
    
    journal = journal_abbr.get(ref.journal, ref.journal)
    
    bib_entry = f"""@article{{{key},
  author = {{{'; '.join([a.strip() for a in ref.author.split(';')])}}},
  title = {{{ref.title}}},
  journal = {{{journal}}},
  year = {{{ref.year}}},
  volume = {{{ref.volume or ''}}},
  number = {{{ref.issue or ''}}},
  pages = {{{ref.pages or ''}}},
  doi = {{{ref.doi or ''}}},
}}"""
    
    return bib_entry

生成的BibTeX示例:

bibtex
@article{Zhang2023,
  author = {Zhang, Y. and Li, X.},
  title = {The Effect of Carbon Trading on Innovation: Evidence from China},
  journal = {J. Finance},
  year = {2023},
  volume = {78},
  number = {3},
  pages = {1234--1289},
  doi = {10.1111/jofi.12345},
}

@article{Li2022,
  author = {Li, H. and Wang, J.},
  title = {Digital Finance and Corporate Innovation: A Panel Study},
  journal = {J. Financ. Econ.},
  year = {2022},
  volume = {145},
  number = {2},
  pages = {567--589},
  doi = {10.1016/j.jfineco.2022.01.001},
}

第四步:按目标期刊格式化

python
from scripts.ref_paper import ReferenceFormatter

formatter = ReferenceFormatter()

# JF/JFE/RFS格式 (AEA/biblio style)
jf_refs = formatter.format(refs, style="jf")
# 输出: Author (Year). Title. Journal Volume: Pages.

# GB/T 7714-2015格式 (中文顶刊)
cn_refs = formatter.format(refs, style="gb7714")
# 输出: [序号] 作者. 题目[文献类型]. 期刊名, 年, 卷(期): 页.

# 经济研究格式
jjyj_refs = formatter.format(refs, style="经济研究")

格式对比:

风格格式示例
JF/JFEZhang, Y. and Li, X. (2023). The effect of carbon trading. Journal of Finance, 78(3): 1234–1289.
GB/T 7714张三, 李四. 碳排放权交易对企业创新的影响[J]. 经济研究, 2023, 58(3): 1234-1289.
AEAZhang, Y., and X. Li. 2023. "The Effect of Carbon Trading on Innovation." Journal of Finance 78(3): 1234–1289.

第五步:一致性审计

python
from scripts.ref_paper import ReferenceAuditor

auditor = ReferenceAuditor()

# 检查项
issues = auditor.audit(
    bib_file="references.bib",
    tex_file="paper.tex"
)

# 问题类型
# - UNUSED_REF: .bib中有但.tex中未引用
# - MISSING_REF: .tex中引用但.bib中缺失
# - DUPLICATE: 重复条目
# - FORMAT_ERROR: 格式错误
# - CASE_MISMATCH: 作者姓名大小写不一致

for issue in issues:
    print(f"[{issue.severity}] {issue.type}: {issue.message}")
    print(f"  Location: {issue.location}")

审计检查项:

检查项:
□ 所有 \cite{} 键存在于 references.bib
□ 所有 references.bib 条目在 .tex 中被引用
□ 无重复条目
□ 作者姓名一致 (检查大小写)
□ DOI格式正确
□ 年份格式一致
□ 期刊名称标准化
□ 页码格式正确 (无"1234-89"应为"1234-1289")

期刊格式规范

Journal of Finance (JF)

Author, A. B. and Author, C. D. (Year). Title of the article. Journal Name Volume(Number): Pages.

Journal of Financial Economics (JFE)

Author, A. B. and C. D. Author (Year). Title. Journal Name Volume: Pages.

Review of Financial Studies (RFS)

Author, A. B., and C. D. Author (Year). "Title of the Article." Journal Name Volume(Number): Pages.

经济研究 (GB/T 7714-2015)

[1] 作者1, 作者2. 文章标题[J]. 期刊名称, 年, 卷(期): 页码.

金融研究

[1] 作者1, 作者2. 文章标题[J]. 期刊名称, 年, 卷(期): 页码.

输出文件

references.bib

主BibTeX文件,包含所有参考文献:

bibtex
% 生成时间: 2026-06-13
% 目标期刊: 经济研究
% 参考文献数量: 45

@article{Zhang2023,
  author = {Zhang, Y. and Li, X.},
  title = {碳排放权交易对企业绿色创新的影响},
  journal = {经济研究},
  year = {2023},
  volume = {58},
  number = {3},
  pages = {1234--1289},
  doi = {10.1111/j.1245-2823.2023.01234},
}

ref_index.md

按主题分类的文献索引:

markdown
# 参考文献索引

## 理论基础
- Zhang2023: 碳排放权交易理论
- Li2022: 绿色创新理论框架

## 实证方法
- Callaway2021: CS-DID方法
- Sun2021: 事件研究估计

## 核心实证
- Wang2023: 碳交易对企业创新的正向影响
- Chen2022: 政策效果异质性分析

ref_audit.md

一致性审计报告:

markdown
# 参考文献一致性审计报告

## 审计时间
2026-06-13

## 问题汇总
| 问题类型 | 数量 | 严重程度 |
|----------|------|----------|
| UNUSED_REF | 3 | WARNING |
| MISSING_REF | 1 | ERROR |
| DUPLICATE | 0 | - |
| FORMAT_ERROR | 2 | WARNING |

## 详细问题

### ERROR: 引用缺失
- \cite{Huang2022} 在正文中引用但bib中不存在

### WARNING: 未使用文献
- Borusyak2024 在bib中但未在正文中引用

交互流程

[CHECKPOINT] 参考文献管理完成

审计结果:
✅ 所有引用键匹配
⚠️ 3条文献未使用 (可保留供附录)
✅ 格式正确

请选择:
1. 生成/更新 references.bib
2. 查看参考文献索引
3. 查看审计报告
4. 添加新文献

依赖项

  • scripts/ref_paper.py — 参考文献管理核心
  • scripts/journal_template.py — 期刊格式验证
  • scripts/research_framework/modern_did.py — DID相关文献

约束

  1. DOI优先 — 有DOI时自动补全所有元数据
  2. 格式标准化 — 按目标期刊格式输出
  3. 一致性必查 — 每条引用必须有对应bib条目
  4. 作者姓名规范 — 使用 "Last, First" 格式
  5. 期刊缩写 — 英文期刊使用标准缩写

Frequently asked questions

What does the Fin Ref Paper AI skill do?

从LIT_REVIEW.md和IDEA_REPORT.md中提取参考文献,自动生成符合JF/JFE/RFS/GB-T-7714格式的references.bib,并管理引用一致性。

Why use Fin Ref Paper on TypingMind?

Because you install it once and use it with any model. Fin Ref Paper is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Fin Ref Paper in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/csmar432/finai-research/tree/main/.agents/skills/fin-ref-paper. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Fin Ref Paper?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Fin Ref Paper?

As many as you like. As long as a model supports skills, you can use Fin Ref Paper with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Fin Ref Paper AI skill free?

Yes. It is published on GitHub by csmar432 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇