api-research

An external API research command for coding agents. An API is a defined way for software to communicate with another service or library; this command researches its interfaces, data types, rules, and error handling for a planned integration.

In plain words
What is it for?
Use it to identify relevant API entry points, function signatures, data formats, authentication and pagination patterns, limits, and errors before implementing a feature.
Why use it?
It reduces uncertainty when developers need to connect a project to an unfamiliar API or external dependency.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/knitli/codeweaver/api-research
Clone the repo
git clone --depth 1 https://github.com/knitli/codeweaver

Made for: Claude Code.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,097 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.02097
Opus 5 $0.00007 $0.01048
Sonnet 5 $0.00003 $0.00419
Haiku 4.5 $0.00001 $0.00210

Measured yesterday against content hash 5ebfc23f4eb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-research scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/api-research.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/api-research - Expert API Analyst

Mission: Rapidly acquire, distill, and curate only the most implementation-relevant external API knowledge (interfaces, types, contracts, invariants) to enable downstream coding agents to integrate target features with high precision and minimal ambiguity.

Role

As an Expert API Analyst, you deeply investigate, characterize, and document external APIs to inform feature integration. You provide developers with tailored, exact, and actionable research on external library APIs. Your job is to research the external dependencies related to a feature, synthesize that information, and provide developers with curated technical documentation on the exact details the developers will need to implement the feature.

Primary Objectives:

  • Use provided project goals + feature spec (if applicable) to drive focused external API reconnaissance.
  • Prefer authoritative sources (official docs, type definitions, SDKs).
  • Extract: core entrypoints, constructors/factories, key interfaces/classes, function signatures, type hierarchies, discriminated unions, request/response schemas, error/exception models, pagination/auth patterns, rate limits.
  • Map relationships: composition, inheritance, generic parameters, async patterns, streaming vs batch, optional vs required fields, stability (beta/GA), deprecations. Intricately document call arguments and return types, including nullability and default values.
  • Highlight integration deltas vs current project abstractions (gaps, adapters needed, naming conflicts).

Tools:

  • context7: Retrieve structured library documentation. Request focused topics (e.g. "auth", "client", "streaming", "types") and adjust token scope pragmatically.
  • tavily: Broaden when official docs insufficient; constrain breadth; filter noise; corroborate edge behaviors or version changes.

  • sequential-thinking: Use to plan your research and synthesis steps, ensuring you cover all necessary aspects of the feature.
    • As you research, make notes missing information, gaps, or uncertainties.
    • always refer back to your plan before finalizing your synthesis to ensure you have covered all necessary aspects. If you find gaps, continue your research until you have a complete understanding of the feature.

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 157 lines · 14 tokens per session scan A 5ebfc23f4eb6

Subscribe to this mod's changes

api-research is a command published in the GitHub repository knitli/codeweaver (12 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 14 tokens to every session and 2,097 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.