huggingface

S2 CLI — Development skill for Claude Code

Development community

A Command-Line Interface (CLI) and Skill to query Semantic Scholar.

How to install S2 CLI

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

What S2 CLI does

A Command-Line Interface (CLI) and Skill to query Semantic Scholar. For agents and humans.

Alternatives in Development

  • Notebooklm Skill — Use this skill to enable Claude Code to communicate directly with your Google NotebookLM notebooks 5.9k ★
  • Claude Scholar — Semi-automated research assistant for academic research and software development 3k ★
  • Cq — An open standard for shared agent learning 1.3k ★

README

s2 CLI and Skill

A fast, read-only command-line client for the [Semantic Scholar Graph API](https://api.semanticscholar.org/api-docs/graph), alongside a Skill for coding agents.

Built to power [Papers with Code](https://paperswithcode.co)'s chat interface.

Use `s2` to:

  • list the papers a work cites (s2 refs)
  • list the papers that cite a work (s2 citations)
  • search the Semantic Scholar graph when a paper may not be in a local catalog

This CLI requires an API key. Set `PWC_SEMANTIC_SCHOLAR_API_KEY` or `S2_API_KEY`. Request a key at [Semantic Scholar's API page](https://www.semanticscholar.org/product/api).

s2 refs "Attention is All You Need"
s2 citations ARXIV:1706.03762 --limit 50
s2 search "image dehazing" --year 2025-2026 --limit 100 --json

Installation

Python 3.10 or newer is required.

With [`uv`](https://docs.astral.sh/uv/):

uv tool install git+https://github.com/huggingface/s2-cli.git

Or with [`pipx`](https://pipx.pypa.io/):

pipx install git+https://github.com/huggingface/s2-cli.git

From a clone:

git clone https://github.com/huggingface/s2-cli.git
cd s2-cli
uv tool install .

Confirm the installation:

s2 version

Add the CLI Skill

Copy [`SKILL.md`](SKILL.md) into your agent's skills directory:

mkdir -p .agents/skills/s2-cli
curl -LsSf https://raw.githubusercontent.com/huggingface/s2-cli/main/SKILL.md \
  -o .agents/skills/s2-cli/SKILL.md

Quick start

export S2_API_KEY=...   # or PWC_SEMANTIC_SCHOLAR_API_KEY

s2 refs "Attention is All You Need"
s2 refs 1706.03762 --limit 50 --offset 20
s2 citations ARXIV:1706.03762 --json
s2 search "scene graph generation" --limit 100
s2 search "scene graph generation" --year 2025-2026 --limit 100 --json

`PAPER` accepts a quoted title, an arXiv ID (`1706.03762`, `arXiv:1706.03762`), a DOI, a 40-character Semantic Scholar paper ID, a prefixed ID (`ARXIV:`, `DOI:`, `CorpusId:`, `PMID:`, `URL:`), or an