Chuyển đến nội dung
Skillpedia
Prompt và LLM7.0k · #13702

write-provider-skill

Skill này làm gì

Skill này giải thích cách viết một skill cho API của một nền tảng, liệt kê các endpoint quan trọng và các bẫy tạo ra kết quả sai. Nó dành cho người muốn agent của họ dùng API nền tảng tốt qua một proxy.

Khi nào nên dùng

  • ✓Khi bạn muốn agent làm việc thực tế trên API của một nền tảng như dịch vụ quảng cáo hoặc phân tích.
  • ✓Khi một skill nhà cung cấp hiện có cần được kiểm tra hoặc mở rộng với endpoint mới.
  • ✓Khi agent liên tục gặp lỗi ID hoặc host từ một nền tảng và cần một hướng dẫn rõ ràng.

Liên kết skill

https://github.com/superdesigndev/treg/blob/main/.agents/skills/write-provider-skill/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/superdesigndev/treg/blob/main/.agents/skills/write-provider-skill/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể viết một skill giúp agent của tôi dùng API LinkedIn đúng cách, kể cả những lỗi nó hay mắc không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent ánh xạ các endpoint quan trọng cho các công việc phổ biến, rồi ghi lại các bẫy: kết quả sai im lặng, lỗi gây hiểu nhầm, định danh khó đoán và giới hạn năng lực. Nó xếp hạng chúng để những lỗi tốn kém nhất đứng đầu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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:

Class Why it matters Example
Silent wrong answers Agent reports confidently false results. Unrecoverable alone. GA4: incompatible dimension+metric returns "0" per row, not an error — reads as "no revenue"
Wrong-shaped errors Error doesn't describe the real cause, so retries go sideways GA4: bad path returns a Google HTML 404 page, not JSON — a JSON parse throws something unrelated
Unguessable identifiers Agent invents an ID and gets 403/404 forever GA4 needs properties/123456789; GSC needs sc-domain:x.com vs https://x.com/
Host splits Endpoint exists but not on the bound host GA4 Admin API is analyticsadmin, tool is bound to analyticsdata → 404
Capability limits Agent attempts work the scope can't do GA4 connection is read only
Endpoint list Findable 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

Call through /call/ rather than curl-with-a-token: that exercises binding injection, token refresh, and the audit trail, which is where treg bugs surface.

Mark every endpoint ✅ verified or ⚠️ unverified, and date the skill. An unverified endpoint is allowed — an unmarked one is not.

Read the audit log when something 404s. It records the exact upstream URL, which catches client-side path mangling that the terminal output hides:

sqlite3 treg-dev.db "select method,path,status_code from callrecord order by id desc limit 5"

That's how the zsh :r bug below was found: the terminal showed a plausible Google error, the audit log showed the request had gone to ...123456789unRealtimeReport.

Write-side testing

Read endpoints: call freely. Write endpoints publish real things to real accounts and are not reversible. Before any POST/PUT/DELETE that creates content or spends money:

  1. Get an explicit designated target from the human (throwaway account, sandbox ad account)
  2. Get explicit per-provider go-ahead
  3. If neither exists, mark the endpoint ⚠️ unverified and document it from the API reference

Never publish to a production account to satisfy a checkbox.

Skill structure

Follow this order — it matches how an agent actually reads under time pressure:

frontmatter: name + description (description = the trigger; list the words a user would say)
# <Platform> via treg
  one line: you call X through treg's proxy, you never hold a credential
  "All examples verified live on <date>"
## Setup (once per team)      — connect command, what capability you get
## Which <resource> to use    — how to READ the id, never guess it
## The endpoints              — table: path | method | purpose | verified?
## Common jobs                — 4-6 real tasks, full runnable bodies
## Reading the response       — shape gotchas (positional arrays, strings-not-numbers, timezone)
## Pitfalls                   — the silent-wrong-answer list. The most valuable section.
## Full documentation         — links out

Pitfall classes that recur across providers

Check each one explicitly when building a new skill. Confirmed on GA4; expected but unconfirmed elsewhere until tested.

  • Host split — is there an admin/management API on a different hostname than the data API? The tool's base_url binds one host; the other is unreachable via /call/. Expect this on Google Ads (googleads vs googleadsapi surfaces) and Meta (graph vs business).
  • **Resource i
Câu hỏi thường gặp

Quy tắc chính để quyết định nên đưa gì vào là gì?

Skill nói hãy ghi lại những gì cho kết quả sai mà không có lỗi, vì đó là loại khó phát hiện nhất.

Đây có phải là một máy chủ MCP không?

Skill mô tả một skill nhà cung cấp là một máy chủ giống MCP, gồm các tài liệu.

Những nền tảng nào được nêu làm ví dụ?

Ví dụ gồm Google Ads, LinkedIn, Meta Ads, TikTok, X, Instagram và Search Console.

Chi tiết

Mô tả gốc của tác giả

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.

repo: superdesigndev/treg

Độ phổ biến

Sao GitHub
7.0k
Vị trí xếp hạng
#13702
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự