Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

cite.skill

中文 | English

An AI Agent Skill that adds Zotero-powered academic citations to existing LaTeX articles. Supports two modes:

  • Full Mode — automatic literature search via ai4scholar + Zotero import via mcp-zotero.
  • Bib Mode — offline mode using your existing .bib file.

Installation

Run one of the following commands in your project root. Adjust paths (like /path/to/SKILL.md) to match where you saved or cloned this repository.

Cursor

mkdir -p .cursor/skills/cite.skill/
cp /path/to/SKILL.md .cursor/skills/cite.skill/SKILL.md

Or configure via Cursor Settings → Agent → Skills.

Claude (Desktop / Code)

mkdir -p ~/.claude/skills/cite/
cp /path/to/SKILL.md ~/.claude/skills/cite/SKILL.md

Other Tools

Most AI assistants that support custom instructions can reference the SKILL.md content directly. Check your tool's documentation for the recommended approach.

Prerequisites

For Full Mode

Two MCP servers must be configured:

Server Installation Purpose
ai4scholar npm install -g ai4scholar, then add to MCP config Searching academic papers by topic
mcp-zotero Follow setup guide, then add to MCP config Interacting with Zotero (collections, items, .bib export)

Zotero desktop app must be running with WebDAV or synced storage.

For Bib Mode

  • A valid .bib file with your references.

Usage

When you ask your AI assistant to add citations to a LaTeX paper, this skill guides the assistant through the following workflow:

Phase 0 — MCP Detection & Mode Selection

The skill first checks whether the required MCP servers (ai4scholar, mcp-zotero) are available.

  • If neither is found: you choose between installing the MCP servers or using an existing .bib file (Bib Mode).
  • If at least one is found: Full Mode with automatic literature search and Zotero import.

Phase 1 — Ask & Setup

  1. Choose your preferred language.
  2. Select the target .tex file from workspace candidates.
  3. A citation.md report is created with the current citation baseline.
  4. (Full Mode) Connect to Zotero and pick or create a collection.
  5. Set scope (full article or specific sections) and target number of new citations.

Phase 2 — Search Literature (Full Mode only)

Keywords are extracted from the article. The assistant searches for relevant papers via ai4scholar and presents them for your selection.

Phase 3 — Import to Zotero (Full Mode only)

Selected papers are imported into your Zotero collection (preferring DOI), then a .bib file is exported next to your .tex file.

Phase 4 — Insert Citations

The assistant inserts \cite{} commands at appropriate locations in the .tex file, following the document's existing citation style — without modifying your prose.

Phase 5 — Report

citation.md is updated with the new citation count, keys added, and session log. A summary is presented to you.

Output Files

File Description
<article-name>-added.bib BibTeX file exported from Zotero (Full Mode only)
citation.md Living record of citation counts and session history

Re-running

The skill can be run multiple times on the same article. Each session appends to the citation.md session log rather than overwriting it.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors