api-setup

A setup procedure for adding an API connection to a project. An API is a way for one program to request data or actions from another service.

In plain words
What is it for?
Use it to create an integration directory, fill in the API key and endpoint, set a request timeout, validate the JSON configuration, and test the connection.
Why use it?
It removes the repeated setup work and checks involved in configuring a new connection. It also helps identify missing credentials, invalid configuration, and connection or permission errors.

Skill for Claude CodeCodex

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 skills/block/agent-skills/api-setup
Any agent
npx skills add block/agent-skills --skill api-setup
Clone the repo
git clone --depth 1 https://github.com/block/agent-skills

Made for: Claude Code, Codex.

Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 276 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.00013 $0.00276
Opus 5 $0.00006 $0.00138
Sonnet 5 $0.00003 $0.00055
Haiku 4.5 $0.00001 $0.00028

Measured 2d ago against content hash 1766b70c735c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-setup 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (setup.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

api-setup/SKILL.md · 56 lines

What it actually says

API Setup

This skill helps you set up a new API integration with our standard configuration.

Steps

  1. Run setup.sh <api-name> to create the integration directory
  2. Copy templates/config.template.json to your integration directory
  3. Update the config with your API credentials
  4. Test the connection

Configuration

The config template includes:

  • api_key: Your API key (get from the provider's dashboard)
  • endpoint: API endpoint URL
  • timeout: Request timeout in seconds (default: 30)

Verification

After setup, verify:

  • Config file is valid JSON
  • API key is set and not a placeholder
  • Test connection succeeds

Troubleshooting

Connection Timeout

If you experience connection timeouts:

  1. Check your network connection
  2. Verify the endpoint URL is correct
  3. Increase the timeout value in config

Authentication Errors

If you get 401/403 errors:

  1. Verify your API key is correct
  2. Check if the key has the required permissions
  3. Ensure the key hasn't expired
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 56 lines · 13 tokens per session scan A 1766b70c735c

Subscribe to this mod's changes

api-setup is a skill published in the GitHub repository block/agent-skills (23 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 276 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.