Skills

Write Provider Skill

Build a treg provider skill, the endpoint map + mistake map that lets an agent do real...

Install

npx skills add superdesigndev/treg --skill write-provider-skill -g -a claude-code -y
Category
AI and agents
Updated
3d ago
License
See repository
Context cost
Mediumabout 1,577 tokens
Runs scripts
No, instructions only

What it does

Build a treg provider skill, the endpoint map + mistake map that lets an agent do real work on a platform API through treg's proxy. Use when adding a skill for a connected provider (Google Ads, LinkedIn, Meta Ads, TikTok, X, Instagram, Search Console), or when an existing provider skill needs verifying or extending.

Writing a provider skill

A provider skill is an MCP server made of documentation. An MCP server gives a model a tool list and typed parameters. We can't ship a server per platform, so the skill carries the same payload as prose: which endpoints matter, what the parameters really are, and where the API lies to you.

The third part is the one MCP can't give you, and it's where nearly all the value is.

The rule that decides what goes in

Document what produces a wrong answer without producing an error.

Ranked by value to an agent:

ClassWhy it mattersExample
Silent wrong answersAgent reports confidently false results. Unrecoverable alone.GA4: incompatible dimension+metric returns "0" per row, not an error, reads as "no revenue"
Wrong-shaped errorsError doesn't describe the real cause, so retries go sidewaysGA4: bad path returns a Google HTML 404 page, not JSON, a JSON parse throws something unrelated
Unguessable identifiersAgent invents an ID and gets 403/404 foreverGA4 needs properties/123456789; GSC needs sc-domain:x.com vs https://x.com/
Host splitsEndpoint exists but not on the bound hostGA4 Admin API is analyticsadmin, tool is bound to analyticsdata → 404
Capability limitsAgent attempts work the scope can't doGA4 connection is read only
Endpoint listFindable in official docs,

Anything in the bottom row: link to the docs, don't restate them. A skill that paraphrases the API reference is worse than a URL, it goes stale and it's longer.

Verification protocol, non-negotiable

Every endpoint and every example body in the skill must have been executed. Not adapted from docs, not plausible, run.

scripts/dev-local.sh up
scripts/dev-local.sh cli connections ls          # confirm health + resource_ref
scripts/dev-local.sh cli call <provider> <path>  # always via /call/, never direct
Read the whole SKILL.md on GitHub

More in AI and agents