write-provider-skill
ما الذي تفعله
توضح هذه المهارة كيفية كتابة مهارة لواجهة برمجية لمنصة واحدة، تسرد النقاط المهمة والأفخاخ التي تنتج نتائج خاطئة. وهي لمن يريد أن يستخدم وكلاؤه واجهة منصة بشكل جيد عبر وسيط.
متى تستخدمها
- ✓عندما تريد أن يقوم وكيلك بعمل فعلي على واجهة منصة، مثل خدمة إعلانات أو تحليلات.
- ✓عندما تحتاج مهارة مزود موجودة إلى مراجعة أو توسيع بنقاط جديدة.
- ✓عندما يستمر وكيلك في أخطاء المعرّفات أو المضيفين مع منصة ويحتاج إلى دليل واضح.
رابط المهارة
https://github.com/superdesigndev/treg/blob/main/.agents/skills/write-provider-skill/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل تكتب لي مهارة تساعد وكيلي على استخدام واجهة LinkedIn البرمجية بشكل جيد، بما في ذلك الأخطاء التي يميل إلى ارتكابها؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يحدد الوكيل النقاط التي تهم المهام الشائعة، ثم يسجّل الأفخاخ: الإجابات الخاطئة بصمت، والأخطاء المضللة، والمعرّفات الصعبة التخمين، وحدود القدرات. ويرتّبها بحيث تأتي الأخطاء الأكثر كلفة أولًا.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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:
- Get an explicit designated target from the human (throwaway account, sandbox ad account)
- Get explicit per-provider go-ahead
- 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_urlbinds one host; the other is unreachable via/call/. Expect this on Google Ads (googleads vs googleadsapi surfaces) and Meta (graph vs business). - **Resource i
الأسئلة الشائعة
ما القاعدة الأساسية لما يُدرج؟
تقول المهارة وثّق ما يعطي إجابة خاطئة دون خطأ، لأنها الأصعب في الكشف.
هل هي خادم MCP؟
تصف المهارة مهارة المزود بأنها شبيهة بخادم MCP ومكوّنة من وثائق.
أي منصات ذُكرت أمثلة؟
تشمل الأمثلة Google Ads وLinkedIn وMeta Ads وTikTok وX وInstagram وSearch Console.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 7.0k
- الترتيب
- #13702
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
code-quality
7.0kيعلّم وكيلك معايير كتابة الكود الواضحة: فرض القواعد بالأدوات، وقلة التعليقات، واختبارات قادرة على الفشل، ووثائق قصيرة.
google-ads
7.0kيساعد وكيلك على تشغيل تقارير إعلانات Google وتغييراتها بأمان، متجنبًا أخطاء إصدار الواجهة البرمجية وأخطاء الميزانية الشائعة التي تهدر المال.
google-analytics
7.0kيساعد وكيلك على الحصول على أرقام دقيقة للزيارات والتحويلات والإيرادات من Google Analytics 4، متجنبًا الأيام الناقصة والأصفار الكاذبة.
google-search-console
7.0kيساعد وكيلك على تقديم النقرات والظهور والترتيب العضوي من Search Console دون أن يخلط بين الأيام الأخيرة الناقصة وبين انخفاض حقيقي.
مهارات مشابهة
writing-skills
311kيعلّم وكيلك كتابة مهارات جديدة واختبار كل واحدة أولًا، والتأكد من أنها تغيّر سلوك الوكيل فعلًا.
writing-for-agents
310kيشرح كيفية كتابة تعليمات واضحة لوكلاء الذكاء الاصطناعي، بما في ذلك ملفات المهارات وAGENTS.md وCLAUDE.md، ليتصرف الوكيل بشكل متوقع.
bengali-nlp
280kيعالج وكيلك النصوص البنغالية، فيفهمها ويتعامل معها، ويعيد تنسيقها ويعالج خصائصها اللغوية الخاصة.