/figure-library:figure-libraryfrom figure-library
Search, browse, select, import, review, publish, and materialize reusable scientific-figure assets through the Scientific Figure Library (SFL). Useful for finding plotting references or managing a shared figure library.
Ships in figure-library. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use the connected SFL tools and one user-selected global Library. The MCP App is optional: ordinary MCP tools can supply guidance, candidate thumbnails, pagination, exact previews, and materialization without loading App HTML.
Shell only, metadata needed: use the lowercase sfl executable supplied
by the scientific-figure-library package. The long command name remains
compatible; do not install a separate sfl npm package. The first release
with these commands is v0.11.0.
If they are missing, install the npm tarball from that GitHub Release rather
than assuming the npm registry's latest version includes them. Check sfl --help. Run
sfl search "QUERY" --limit 3 --json to find metadata.
Parse the successful JSON from stdout: a search has candidates (possibly
empty); describe returns item. Exit 2 means bad arguments, UTF-8/JSON or
ref envelope (including mismatched provider IDs). Exit 1 means input/source
unavailable or the provider cannot resolve the exact identity, including
malformed or stale provider-specific identity data. Read error.code and error.message
from the JSON on stdout, not from stderr (extra diagnostics only); never
treat failure as no matches. For a candidate you need to inspect, pass only its complete ref object
(providerId and unchanged exactSelector) as UTF-8 JSON to
sfl describe --ref-file - --json on stdin, or use
--ref-file "path to ref.json". Do not reconstruct identity from a title,
rank or template ID. Literal match evidence quotes catalog text; inferred
evidence is a retrieval explanation, not a quotation or validation result.
These two one-shot commands do not display or confirm an exact image, grant
permission to materialize, or run code.
Shell only, images or approved local operations needed: if the binary
lists session, keep one sfl session child alive
with a host-side driver. Send one JSON object per line to stdin and read one
reply per line; do not start a new command for each step. Ask
{"id":1,"op":"help"} what this build supports and
{"id":2,"op":"help","args":{"op":"preview"}} for actual inputs.
Outside the session, use session --list and session --help <op> for
the same discovery without opening stdin.
ok:false is a request error. For business operations, even with ok:true,
inspect result.isError and the terminal result.structuredContent.envelope
when present. A confirmation-required result is not an applied write.
Use search → images to present candidates. Open the returned image
block's local path using the host's image tool; receiving a path isn't
seeing the image. Keep the result set and exact selector. Once a specific
selection or delegation exists, request its exact preview, review the
actual image, then confirm. Show the materialization plan, destination
and network policy before an approved apply. Never auto-confirm or auto-apply
just because a challenge, receipt or digest is present. Local import and
publish likewise need their own plan/approval; they do not publish to GitHub.
Close stdin after the work and wait for exit. Temporary images disappear on
normal shutdown. Don't carry transient IDs, cursors, challenges or receipts
between processes. If the host cannot keep a child alive or open its images,
use the local app or an MCP-capable host instead of claiming visual review.
For network problems, use figure_library_network_status to inspect this MCP
process's same-user/machine loopback HTTP proxy setting and
figure_library_network_test for a bounded check of the fixed SFL GitHub
Release endpoint. Remote or container MCP processes have separate settings.
figure_library_update_status reports the running version, latest stable
Release cache, freshness, and exact Release link; { "refresh": true } checks
manually. A new-version notice may appear as one additional text item on a
successful tool result; keep the structured result authoritative. Updating is
manual and requires restarting the MCP process.
These three tools return the standard terminal envelope and status fields in
structuredContent. Read envelope.code, terminal, and retrySameCall before
acting; do not repeat a failed diagnostic unchanged. A fresh update result with
cachePersisted: false is still valid for this process; report its cache warning
separately instead of treating the network check as failed.
This is the single Skill entrypoint. Read supporting files locally, or call
figure_library_get_skill with document set to their path relative to this
Skill directory. Calling it with no arguments returns this file plus the
available document IDs, resource URIs, hashes, service version and capabilities.
Resource-capable hosts may read those URIs instead. Resolve relative links
against the current document's directory; use the returned document IDs.
The tool returns the same bundled text, including optional helper source;
reading it does not install a Skill, execute helpers, or grant write approval.
figure_library_export_diagnostics.Use the existing description/style/organization guidance. Propose a readable English subtitle and a source-grounded scientific question; inspect the whole figure and relevant panel/legend/axis crops before and after rendering. The host runs plotting, not SFL. Use figure_library_plan_publish → one human review → figure_library_apply_publish. Default publication is local; open_module is explicit and ends at a PR. See library workflows for proposal fields and recovery. Keep provenance/execution truth in metadata, not repeated template-facing disclaimers.
figure_library_source_status when the effective Library/setup is
unknown. On setup_required, use the binding workflow and ask for the
missing absolute global Library and Local workspace directories. Never
infer either directory from the current project. figure_library_open
opens the optional App when the user requests it.figure_library_list_catalog with limit: 0 to read per-Provider counts and
familyGroup/domain/language facets. Narrow by familyGroup (figure type) or
domain (research field such as single_cell or spatial) only when one
value clearly fits the need — the two combine, and an entry can belong to
several of each (FigureYa entries marked analysis prepare data and draw
no figure) — and by providerIds/language/assetKind only when
the user stated them (other/unclassified hold analysis-only and unlabelled
templates; when unsure, do not narrow), then read the compact entry pages with the returned resultSetId and nextOffset.
Reading these text pages is expected; it shows no images. Pick at most 6
entries that satisfy the core need and give each a one-line reason.
Read the full catalog once per session: for later figure requests, reuse
the entries you already read and call only limit: 0 to compare its
catalogRevision; re-read the pages only when it changed. Listed
candidateIds belong to their listing resultSetId; if image tools report
it stale, list again before displaying.figure_library_search (keyword) only when the user names a template or
chart type, or as a quick first try. Zero or poor keyword hits never mean
the library lacks the figure; fall back to step 3. Only after the default
Providers were listed without filters may you say a figure type is missing.
Both tools return a resultSetId and result-scoped candidateIds; search
also returns provider-qualified exactSelectors and thumbnail URIs. Keep
returned identities unchanged. Default Providers are Local Published,
FigureYa, Open Figure Modules, then opted-in personal sources; bundled
Community is frozen and explicit-only (includeInDefaultSearch: false).figure_library_get_candidate_images with the result set and current-page
or listed candidate IDs (at most 12). Display the returned images with their labels
using the host's image support. This is thumbnail browsing, not exact
preview confirmation. Do not generate replacement images.figure_library_search_page with the original resultSetId and opaque
nextCursor; do not alter the query to simulate pagination. Never walk all
candidate images automatically. Explicit delegation to choose permits reviewing
a small relevant subset. Do not claim the user saw images merely because
the model received them; if the host cannot display them, report that limit.providerId and exactSelector.figure_library_preview_exact_headless for
the selected candidate, actually review the returned image, then call
figure_library_confirm_selection_headless with its previewChallenge.
User selection or explicit delegated review is required. Neither thumbnail
retrieval nor compatibility figure_library_preview creates a receipt.serverTools is absent, 选择并交给 Agent 审核 uses
updateModelContext.text to hand one selection to the headless path.
A capability-denied App call is not a reason to retry the same UI call.previewReceipt.
Call figure_library_plan_materialize with that receipt, the exact identity,
an absolute destination and the intended network policy. Show the concrete
plan and obtain approval before figure_library_apply_materialize; pass its
planDigest, a stable operationId, expectedProviderId and expectedTarget.
Follow library workflows for cache modes,
failures and replay. A lock file alone does not prove a successful Apply.figure_library_create_plot_task_headless uses
figure-library.app-plot-task-handoff.v2. Process every selected taskItems
entry, preserving independent preview/material/execution states. The task
handoff itself creates no receipt or execution approval.OUTCOME, CODE, NEXT_ACTION, and any missing confirmations. Every
response is terminal for that call (RETRY_SAME_CALL: false). Do not repeat
an identical failed, blocked, missing, stale or expired call. A fresh search
after search_results_stale creates new state; other errors follow their
stated next action. Never replace failed materialization with a downloader,
a different Provider, a fabricated lock or a substitute plot.SFL_TOOL_PROFILE (use or author, stated in its instructions). Tell the
user which workflow needs the full profile; never imitate the missing tool.agents/openai.yaml (opens in a new tab)assets/sfl-logo.svg (opens in a new tab)references/figure-description/GUIDE.md (opens in a new tab)references/figure-description/references/figureya-writing-patterns.md (opens in a new tab)references/figure-organization/GUIDE.md (opens in a new tab)references/figure-organization/NOTICE.md (opens in a new tab)references/figure-organization/references/output-binding.md (opens in a new tab)references/figure-organization/references/script-organization.md (opens in a new tab)references/figure-organization/references/source-organization.md (opens in a new tab)references/figure-organization/references/workflow-lineage.md (opens in a new tab)references/figure-style/GUIDE.md (opens in a new tab)references/figure-style/LICENSE (opens in a new tab)references/figure-style/NOTICE.md (opens in a new tab)references/figure-style/kernel.py (opens in a new tab)references/figure-style/references/checks.md (opens in a new tab)references/figure-style/references/python-backend.md (opens in a new tab)references/figure-style/references/r-backend.md (opens in a new tab)references/library-workflows.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
scientific-figures, plotting-references, figure-library, sfl
Generated from the plugin's indexed repository (xuzhougeng/scientificfigurelibrary) — no native marketplace selected
npx claudepluginhub p/xuzhougeng-figure-libraryOther plugins' skills for the same job