npx skills add command isn’t enough. Claude needs the skill uploaded through its UI. This guide walks through the full flow: enabling capabilities, uploading the ZIP, and allowlisting the API domain.
This guide is for Claude.ai. If you use Claude Code, Cursor, Codex, Windsurf, or any CLI
that supports Agent Skills, use
npx skills add cnpj-api/skills (see here).Prerequisites
- A Claude account (Free, Pro, or Max, works on all individual plans)
- A cnpj-api token (create one for free)
Step-by-step
Enable code execution
The skill makes HTTP calls to our API, so Claude needs “Code execution” enabled.
- Open claude.ai/settings/capabilities
- Turn on Code execution and file creation
Download the skill ZIP
- Open the repo: github.com/cnpj-api/skills
- Click the Download skill.zip button
Upload to Claude
- Open claude.ai and go to Customize → Skills (on desktop, click the settings icon → Customize)
- Click + Create skill
- Select Upload a skill
- Drag in
cnpj-api.zip(or click to choose the file) - Confirm. The skill appears in your custom skills list
Allowlist the API domain
The skill calls
https://api.cnpj-api.com. By default, Claude only allows package
managers, so you need to add the domain to the allowlist.- Go back to claude.ai/settings/capabilities
- Find the Domain allowlist section (inside “Code execution and file creation”)
- In Additional allowed domains, paste:
- Click Add
Provide the token
The agent reads
CNPJ_API_TOKEN from the runtime environment. In Claude, paste the
token in the first message of your chat (or configure it in the project’s system prompt):Test the skill
In a new Claude chat, ask:
“Look up CNPJ 82.845.322/0001-04”Claude should detect the skill, call
/v1/cnpj/82845322000104 with the api-token
header, and return data for “SOFTPLAN PLANEJAMENTO E SISTEMAS S/A”Other quick tests:- “Is this company in Simples Nacional?” → uses
/v1/simples/{cnpj} - “Show me the partners of this company” → uses
/v1/socios/{pessoaId} - “Check my current plan” → uses
/v1/usage
Common issues
Error: 'ZIP file is invalid'
Error: 'ZIP file is invalid'
The
cnpj-api/ folder must be at the root of the ZIP. If you zipped the whole
repository, extract it, go into skills-main/skills/, and re-zip just cnpj-api/ from there.Error: '403 blocked-by-allowlist'
Error: '403 blocked-by-allowlist'
You skipped Step 4: adding
api.cnpj-api.com to
Capabilities → Domain allowlist. Without it, Claude blocks every HTTP request.Error: '401 TOKEN_MISSING'
Error: '401 TOKEN_MISSING'
The agent never received
CNPJ_API_TOKEN. Paste the token in the first chat message
or add it to the project’s system prompt.The skill doesn't appear in the list
The skill doesn't appear in the list
Refresh claude.ai/settings/capabilities.
If it still doesn’t show, verify that Code execution and file creation is enabled.
Claude doesn't activate the skill automatically
Claude doesn't activate the skill automatically
Mention the context explicitly: “Look up CNPJ X”, “company data…”,
“Simples Nacional”. Claude uses the
description field in SKILL.md to decide.References
- Skills in Claude (official): support.claude.com · Use Skills in Claude
- Creating custom skills: support.claude.com · How to create custom skills
- Agent Skills specification: agentskills.io/specification
- Skill CNPJ repository: github.com/cnpj-api/skills