Zotero Csl Skill banner
cookjohn cookjohn

Zotero Csl Skill

Design community

Description

Claude Code Skill: Generate Zotero-compatible CSL citation style files from natural language descriptions

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

CSL Style Generator — Claude Code Skill

[English](#english) | [中文](#中文)

公众号 / WeChat Official Account 微信群 / WeChat Group Discord
Join Discord
未来论文实验室 / Future Paper Lab 扫码加入交流群 / Scan to join English & 中文

中文

简介

这是一个 [Claude Code](https://claude.com/claude-code) Skill,用于根据用户描述的引用格式,自动生成 [Zotero](https://www.zotero.org/) 可用的 CSL(Citation Style Language)样式文件。

支持从标准预设(GB/T 7714、APA、IEEE 等)一键生成,也支持根据用户提供的参考文献示例反推格式参数,生成完全自定义的 `.csl` 文件。

功能特性

  • 7 种内置预设:GB/T 7714 顺序编码 / 著者-出版年、APA 7、Chicago Notes、IEEE、MLA 9、中文社科脚注
  • 模块化组件:作者、标题、日期、容器、卷期页、出版信息、DOI/URL、正文引用、文献列表、中英文 locale,共 11 个可组合组件
  • 中英文双语支持:支持按 language 字段自动切换中英文格式(中文顿号、书名号、"等" vs 英文逗号、斜体、"et al.")
  • 三阶段自动校验:XML 语法检查 → CSL RelaxNG Schema 验证 → 逻辑规则审核(R1-R6)
  • 实时预览:基于 citeproc-py 渲染真实的 citation 和 bibliography 输出
  • 内置测试数据:包含 10 条覆盖期刊、书籍、会议、章节、网页、学位论文、报纸、报告以及中文条目的测试数据

项目结构

csl-skill/
├── SKILL.md                  # Skill 入口定义与工作流
├── presets/                   # 预设格式配方
│   ├── gbt7714-numeric.md     #   GB/T 7714 顺序编码
│   ├── gbt7714-author-date.md #   GB/T 7714 著者-出版年
│   ├── apa7.md                #   APA 第 7 版
│   ├── chicago-notes.md       #   Chicago 脚注
│   ├── ieee.md                #   IEEE
│   ├── mla9.md                #   MLA 第 9 版
│   └── chinese-note.md        #   中文社科脚注
├── components/                # 可组合的组件模板
│   ├── name.md                #   作者/姓名格式
│   ├── title.md               #   标题格式
│   ├── date.md                #   日期格式
│   ├── container.md           #   期刊/书籍容器
│   ├── locators.md            #   卷/期/页码
│   ├── publisher.md           #   出版信息
│   ├── access.md              #   DOI/URL
│   ├── citation.md            #   正文引用布局
│   ├── bibliography.md        #   参考文献列表布局
│   ├── locale-zh.md           #   中文本地化术语
│   └── locale-en.md           #   英文本地化术语