The gist
A copy-paste SKILL.md template for building a Claude skill that calls
your own custom HTTP API — anything you've stood up internally (an
internal search service, a CRM proxy, a private LLM endpoint, a Railway
worker, etc.). Drop it into /mnt/skills/{org}/{your-skill-name}/,
fill in the placeholders, ship.
The two things that trip people up
- You MUST whitelist the API's domain in Claude.
Claude blocks network calls to any host not on its allowlist. Before
the skill can make a single successful call, the user has to add the
API domain (e.g.
api.yourservice.com) to Claude's allowed-domains list in settings. Skip this step and everycurlreturns a network / permission error that looks like the skill is broken — it isn't, Claude is just refusing the egress. - API keys live in a sibling
.envfile, never in the markdown. The template loads the key from/mnt/skills/{org}/{your-skill-name}/.envat the top of every bash block. The markdown ships clean; the secret never enters a git history or a shared skill export.
What the template covers
- The frontmatter
description:field — the single most important line, because it's what Claude reads to decide whether to activate the skill at all. The template flags it explicitly. - The "Hard Rules" pattern: response is plain text, one tool call per request, optimize the query before sending, never echo the key.
- A canonical single-call bash pattern that loads the key from
.env, curls the endpoint, and pipes the response to/tmp/result.txtfor inspection withview/grep. - A "When to use / when NOT to use" section, because the negative cases ("there's a separate skill for X") are what stop the skill firing on the wrong question.
How to use it
mkdir /mnt/skills/{org}/{your-skill-name}- Save the template as
SKILL.mdin that folder. - Create a sibling
.envwith your API key. - Whitelist the API domain in Claude's settings.
- Replace every
{placeholder}: skill name, description, endpoint, header scheme, body shape, trigger phrases, counter-examples. - Test with one obvious trigger phrase and one negative case to confirm it activates (or doesn't) when you expect.
Why this exists
Most custom Claude skills people try to build fail for the same two reasons — they forgot to whitelist the domain, or they pasted the API key into the markdown. This snippet is the template that makes both of those impossible to skip by accident.