Zoteroのロゴ

Zotero

コミュニティ
congcongwang0122
zotero

Use Zotero Desktop to enable/probe the local API, search a local Zotero library, list items/collections/tags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text and PDF content when requested, and import BibTeX/RIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.

概要

公開者congcongwang0122
リポジトリzotero-skill
スキル名zotero
スター
200
フォーク
4
同梱ファイル
5
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 5個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    congcongwang0122がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Zotero」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/congcongwang0122/zotero-skill/tree/main
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/congcongwang0122/zotero-skill.git \
  .claude/skills/zotero
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでZoteroを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にZoteroを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Zoteroは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Zotero

Use this skill to operate a user's local Zotero Desktop library.

Connection Setup

Before any operation, ensure Zotero is running and the local API is enabled:

  1. Open Zotero Desktop application
  2. Enable Local API: Edit > Preferences > Advanced > check "Allow other applications on this computer to communicate with Zotero" (可用于 http://localhost:23119/api/)
  3. Verify connection:

PowerShell (Windows)

powershell
Invoke-WebRequest -Uri "http://127.0.0.1:23119/api/users/0/collections" -Headers @{ "Zotero-API-Version" = "3" } -UseBasicParsing

curl (cross-platform)

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections"

If the connection fails with "connection closed":

  • The local API preference is not yet enabled
  • Close and reopen Zotero after checking the preference
  • Or manually add to prefs.js: user_pref("extensions.zotero.httpServer.localAPI.enabled", true);

Direct HTTP API Usage

When the Python helper script is unavailable or fails, use direct HTTP calls to the Zotero local API (port 23119).

List collections (folders)

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections"

Response includes key, name, and meta.numItems for each collection.

List items in a collection

bash
# Top-level items only
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{collectionKey}/items/top?limit=25"

# All items (including attachments)
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{collectionKey}/items?limit=25"

Search across library

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items?q=transformer&limit=10"

Export BibTeX

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items?format=bibtex&limit=100"

Get item children (attachments)

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{itemKey}/children"

Get attachment file URL

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{attachmentKey}/file/view/url"

Reading PDFs from Zotero

Zotero stores PDFs in its local storage. To read PDF content:

1. Find the PDF local path

Zotero stores attachments under %USERPROFILE%\Zotero\storage\{attachmentKey}\.

Get the attachment key from the item's children:

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{itemKey}/children"

The response includes links.attachment.href and data.filename.

2. Locate the PDF file

The PDF is typically at:

%USERPROFILE%\Zotero\storage\{attachmentKey}\{filename}.pdf

Example:

powershell
Get-ChildItem "$env:USERPROFILE\Zotero\storage\HQV9AFD4"

3. Read PDF content with pdfplumber

Install pdfplumber (requires Python):

bash
py -m pip install pdfplumber

Extract text:

python
import pdfplumber
pdf_path = r"C:\Users\{user}\Zotero\storage\{attachmentKey}\{filename}.pdf"
with pdfplumber.open(pdf_path) as pdf:
    for i, page in enumerate(pdf.pages[:5]):  # first 5 pages
        text = page.extract_text()
        print(f"--- Page {i+1} ---")
        print(text[:2000] if text else "(no text)")

4. Alternative: Use Codex bundled Python

If system Python lacks pip, use Codex's bundled Python:

powershell
$python = "C:\Users\{user}\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe"
& $python -m pip install pdfplumber
& $python -c "import pdfplumber; ..."

Python Helper Script

When available, the stdlib-only helper script provides convenience:

bash
py <skill-root>/scripts/zotero.py <command>

Note for macOS/Linux users: Use python3 instead of py if the py launcher is not available.

Fast starts

Check readiness:

bash
py scripts/zotero.py status --json

Enable local API and restart Zotero:

bash
py scripts/zotero.py enable --restart

Search and export:

bash
py scripts/zotero.py search "transformer" --json
py scripts/zotero.py export-bibtex --out references.bib

Workflow

  1. Verify Zotero is running and local API is enabled.
  2. Choose connection method:
    • Prefer direct HTTP API calls when the Python helper is unavailable
    • Use the helper script when available for convenience
  3. Read-only operations (safe by default):
    • List collections/items via HTTP API
    • Search library
    • Export BibTeX
    • Read PDFs from local storage
  4. Attachment/PDF access: Only retrieve when explicitly requested
  5. Write operations: Confirm with user before import/save actions

Common HTTP API Patterns

Summarize a collection

bash
# 1. Get collection key
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections"

# 2. Get items in collection (extract title, abstract, creators)
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{key}/items/top?limit=50"

# 3. For each item, get children to find PDF attachment key
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/items/{itemKey}/children"

# 4. Read PDF from %USERPROFILE%\Zotero\storage\{attachmentKey}\

Export collection to BibTeX

bash
curl -s -H "Zotero-API-Version: 3" "http://127.0.0.1:23119/api/users/0/collections/{key}/items?format=bibtex" > collection.bib

Output standards

  • For inventory/search, return title, creators, year, Zotero item key, and BibTeX key when available.
  • For PDF reading, summarize key findings: research question, method, results, and conclusions.
  • For .bib export, return the absolute output path and entry count.
  • For blockers, name the exact gate: Zotero app missing, local API disabled, port closed, no matching item, or PDF not found.

Route details

Read references/local-api-routes.md for complete endpoint documentation.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Zotero」では何ができますか?

Use Zotero Desktop to enable/probe the local API, search a local Zotero library, list items/collections/tags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text and PDF content when requested, and import BibTeX/RIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.

TypingMindでZoteroを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Zoteroはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにZoteroをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/congcongwang0122/zotero-skill/tree/mainを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Zoteroを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Zoteroで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもZoteroを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Zotero」は無料ですか?

congcongwang0122がGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇