// agent_skill for refhub.io
agent skill for operating refhub through its public api (v2). agents load SKILL.md to discover workflows and consult docs/ for exact route contracts and behavioral rules. no implementation code — the skill is the contract.
with a scoped refhub api key, an agent can:
- manage vaults (create, update, delete, visibility, collaborators)
- add, update, delete, search, and bulk-upsert papers
- import references from a doi, bibtex string, or url
- manage tags and relations as first-class objects
- sync incrementally via the changes feed
- export vaults as json or bibtex
- read audit logs
SKILL.md ← skill entry point
AGENTS.md ← instructions for cursor, windsurf, codex, and others
docs/
api-mapping.md ← endpoint/scope/constraint reference
spec.md ← per-workflow behavioral contracts
agents use a pre-issued refhub api key (rhk_<publicId>_<secret>). key creation and revocation are human-managed through the refhub ui — not part of the agent runtime.
the refhub cli is the recommended execution layer:
npm i -g @refhub/cliwhen available, agents use it instead of making http calls directly. the cli handles authentication, error formatting, and consistent output.
export REFHUB_API_KEY=rhk_<publicId>_<secret>
refhub vaults list
refhub --help # discover commands
refhub vaults --help # group-level helpexit codes: 0 success · 1 api error · 2 bad arguments · 3 auth error.
agents without the cli fall back to direct http as documented in docs/.
claude plugin marketplace add refhub-io/refhub-marketplace
claude plugin install refhub-skill@refhub-marketplaceavailable in the next session. automatically invoked when you ask claude to work with refhub vaults or papers.
mkdir -p ~/.gemini/skills/refhub-skill
curl -o ~/.gemini/skills/refhub-skill/SKILL.md \
https://raw.githubusercontent.com/refhub-io/refhub-skill/main/SKILL.mdmkdir -p ~/.config/opencode/skills/refhub-skill
curl -o ~/.config/opencode/skills/refhub-skill/SKILL.md \
https://raw.githubusercontent.com/refhub-io/refhub-skill/main/SKILL.mdrestart opencode to load the skill.
mkdir -p ~/.codex/skills/refhub-skill
curl -o ~/.codex/skills/refhub-skill/SKILL.md \
https://raw.githubusercontent.com/refhub-io/refhub-skill/main/SKILL.mdcopy AGENTS.md to your project root:
curl -O https://raw.githubusercontent.com/refhub-io/refhub-skill/main/AGENTS.mdor add it globally via your agent's rules/settings ui.
refhub api → refhub-skill → refhub cli → mcp server (planned)
the api is canonical. the skill adapts its surface into agent-friendly workflows without inventing behavior the api does not support.