科研 Skill

法律研究插件初始化配置

setup

One-time, conversational setup for the legal-research plugin: saves and tests a CourtListener token and checks Zotero credential availability. Use to set up this plugin’s CourtListener access.

发布者 Codar安全审核通过v0.1.0更新于 2026-11-18

SKILL.md

Setup

The user is probably a law professor, not a programmer. Do the work for them, explain each step in one plain sentence, and never ask them to open a file, the Terminal, or a text editor unless a step says so explicitly. Everything below is done with ../setup/setup.py (adjust the path to wherever this plugin's files actually live if the current agent does not expose ${CLAUDE_PLUGIN_ROOT}), which backs up any file it rewrites.

This script is agent-neutral: it never reads or writes a host agent's own settings file. It does not touch ~/.claude/settings.json, ~/.claude.json, or any marketplace/auto-update registry — those are specific to one Claude Code install, and either do not exist or mean something different in another agent. Two things the original upstream version of this skill used to configure automatically are not handled here and are instead the user's own job, in whatever menu the current agent exposes for it:

  • Web access permissions — if the current agent asks for approval before WebFetch/WebSearch calls, a long research run can be interrupted by that prompt. Tell the user (once, briefly) to check whether their agent offers a way to pre-approve those tools for a session (in Claude Code: permissions.allow in Settings, or picking "Always" the first time it asks) so a long run isn't interrupted partway through.
  • Multi-agent / workflow features — if cite-check, proofread, or legal-research dispatch multiple subagents or a bundled .workflow.js script and the current agent has a setting that gates that (Claude Code's Dynamic workflows), tell the user to check their agent's own settings for it; this script does not flip that switch.

Run the steps below in order. Skip anything the status report shows is already done, and say so in a few words, such as "CourtListener, already working." Keep the whole exchange short.

1. Take stock

python3 "../setup/setup.py" status
  • If python3 is missing or the command fails to start: on a Mac the first use of python3 opens a dialog offering to install the command line developer tools. Tell the user to click Install, wait for it to finish (a few minutes), then ask again. On Windows, tell them to install Python from python.org (tick the option that adds python to PATH), restart their terminal/app, and run setup again.
  • If python.ok is false (older than 3.11): same advice, with the current python.org installer.
  • Do not paste the raw JSON at the user. Summarize it as a short checklist with a tick or cross per line: Python, CourtListener, Zotero (marked optional), git.

2. CourtListener token (required for case checking)

If courtlistener.works is true, say so and move on.

Otherwise explain, in two sentences, that CourtListener is the free, nonprofit case-law database the skills use to confirm that a cited case exists and says what the draft claims, and that it needs a free account. Then give the user these exact steps and wait for their reply:

  1. Open https://www.courtlistener.com/register/ and create a free account (or sign in).
  2. Open https://www.courtlistener.com/profile/api-token/ and copy the long string of letters and numbers shown there.
  3. Paste it here, into this chat, and press Return.

When they paste it, run:

python3 "../setup/setup.py" courtlistener "<token>"

The script tests the token with a live lookup of Brown v. Board of Education before saving it to ~/.config/courtlistener/token, readable only by the user. Exit 0 means it works, and it works immediately, with no restart. On HTTP 401 the token was mistyped or truncated: ask them to copy it again. On a network error, say CourtListener could not be reached and offer to retry.

Tell the user, once, that the token now lives on their own computer, that the pasted copy also sits in this conversation's history, and that if that ever worries them they can generate a new token on the same CourtListener page and run setup again.

3. Zotero (optional; many users do not have it, and nothing else depends on it)

Say first that this step is optional and that every skill except build-library works without Zotero, checking articles against the open web instead. Then ask whether they keep their sources in Zotero, and say that if so, cite-check and find-cite can search it before the web once it is configured — and that they can answer skip now and come back later. Treat anything but a clear yes as skip, and never present a missing Zotero as a problem in the final checklist; show it as not connected (optional).

Run python3 "../setup/setup.py" zotero-check (read-only) to see whether ZOTERO_API_KEY / ZOTERO_LIBRARY_ID / ZOTERO_LIBRARY_TYPE are already set as environment variables. If configured is already true, say so and move on.

Otherwise, this script cannot set those variables for the user — doing so would mean writing to a file specific to one agent (e.g. Claude Code's MCP server config), which this plugin no longer assumes. Instead:

  1. Have the user get their numeric Zotero userID and a private API key from https://www.zotero.org/settings/keys (for a shared group library, the group's number from its zotero.org/groups/NNNN URL instead of the personal userID, plus ZOTERO_LIBRARY_TYPE=group).
  2. Tell them to set ZOTERO_API_KEY, ZOTERO_LIBRARY_ID, and (for a group library) ZOTERO_LIBRARY_TYPE=group as environment variables in however the current agent exposes that — a shell profile, a .env file the agent loads, or that agent's own settings UI for environment variables or MCP servers. Point them at that agent's own documentation rather than guessing a path; this plugin's own scripts (build-library/attach_pdf.py, cite-check's Zotero lookup) read those same three variable names directly, so no further configuration inside this plugin is needed once they are set.
  3. Tell them the variables take effect the next time a script in this plugin runs that needs them — usually immediately in a fresh terminal/session, or after the current agent restarts if it caches its environment at startup.

4. Finish

Re-run status and show the final checklist (Python, CourtListener, Zotero). Then, in two sentences: they are ready; to try it, open a folder that holds a short draft and ask to cite-check it. If this run set up Zotero, remind them it takes effect next time a script needs it, per step 3.

Do not install anything else, do not touch files other than the CourtListener token file, and do not read or echo the token or key back after saving them.

示例提示词

帮我配置好CourtListener令牌并完成法律研究插件的初始设置。

所属插件

法学与知识产权面向法学研究与知识产权:中国法律检索、法学研究备忘录、引注查找与核验、案例准备,以及专利新颖性扫描与验证。

安装该插件会一并获得同领域的 13 个 Skill / MCP。

同插件的其他科研 Skill

常见问题

法律研究插件初始化配置能做什么?

One-time, conversational setup for the legal-research plugin: saves and tests a CourtListener token and checks Zotero credential availability. Use to set up this plugin’s CourtListener access。

如何安装法律研究插件初始化配置?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「法律研究插件初始化配置」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

法律研究插件初始化配置需要哪些权限?

该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。

法律研究插件初始化配置经过官方审核吗?

是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。