شعار Api Connection

Api Connection

مؤسسة
rejot-dev
api-connection

اضبط اتصالات API في Backoffice واستخدمها. استخدمها عند إنشاء عمليات تكامل مع HTTP API الصادر، أو إعداد المصادقة باستخدام OAuth أو bearer، أو بدء تدفقات OAuth لـ API، أو التحقق من حالة المصادقة، أو تنفيذ طلبات API موثّقة من عمليات الأتمتة.

Add to TypingMind

نظرة عامة

الناشرrejot-dev
المستودعfragno
اسم المهارةapi-connection
النجوم
62
التفريعات
6
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها rejot-dev على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Api Connection في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/api-connection
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rejot-dev/fragno.git /tmp/fragno
mkdir -p .claude/skills
cp -r /tmp/fragno/apps/backoffice/content/static/skills/api-connection .claude/skills/api-connection
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Api Connection في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Api Connection تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Api Connection بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

API Connection

Use this skill for scope-aware outbound HTTP API connections, OAuth PKCE authentication, bearer tokens, client credentials, and API requests through Backoffice runtimes.

API configuration

The API capability is available automatically for the current scope. Create each external API connection with a stable lowercase slug and a base URL.

  • Use api.* methods for API connections.
  • Register the public OAuth callback route /api/http/:scope/oauth/callback for scoped OAuth connections.
  • Use relative request paths, for example /v1/customers. If the user gives https://example.com/v1/customers and the connection base URL is https://example.com, call api.request with path: "/v1/customers".
  • Let stored connection auth replace caller-provided Authorization headers.
  • If the user supplies a client secret in the session and asks you to configure the connection, pass it to api.createConnection and keep the final response secret-free.

Rules:

  • When configuring a new OAuth connection, ALWAYS immediately start OAuth and give the user the returned authorizationUrl in a clickable way.
  • When the user says anything after you've presented them with the link, ALWAYS check status of the connection and report back to the user.

Typical OAuth setup flow:

  1. Create the API connection with the requested auth configuration.
  2. For OAuth connections, immediately start OAuth after creating the connection and give the returned authorization URL to the user:
js
const connection = await api.createConnection({
  slug: "example-api",
  name: "Example API",
  baseUrl: "https://api.example.com",
  auth: {
    type: "oauth",
    authorizationEndpoint: "https://api.example.com/oauth/authorize",
    tokenEndpoint: "https://api.example.com/oauth/token",
    clientId: "example-client",
    clientSecret: "example-client-secret",
    scopes: ["profile", "email", "read"],
    tokenEndpointAuthMethod: "client_secret_post",
  },
});

const oauth = await api.startOAuth({ slug: connection.slug });
return { connection, authorizationUrl: oauth.authorizationUrl };
  1. When the user responds after opening the OAuth URL, always check authentication status:
js
const status = await api.getAuthStatus({ slug: "example-api" });
return status;
  1. If authentication is successful, tell the user the connection is authenticated and ask whether they want to try an API call.
  2. When the user wants to test an API call, call api.request with a relative path and include Accept: "application/json" for JSON APIs.

Bearer setup example:

js
await api.createConnection({
  slug: "stripe",
  name: "Stripe",
  baseUrl: "https://api.stripe.com",
  auth: { type: "bearer", token: process.env.STRIPE_TOKEN },
});

OAuth setup example for a confidential server-side client:

js
await api.createConnection({
  slug: "example-api",
  name: "Example API",
  baseUrl: "https://api.example.com",
  auth: {
    type: "oauth",
    authorizationEndpoint: "https://api.example.com/oauth/authorize",
    tokenEndpoint: "https://api.example.com/oauth/token",
    clientId: "example-client",
    clientSecret: "example-client-secret",
    scopes: ["profile", "email", "read"],
    tokenEndpointAuthMethod: "client_secret_post",
  },
});

const auth = await api.startOAuth({ slug: "example-api" });
return auth.authorizationUrl;

OAuth connections run server-side in Backoffice. Use the token endpoint auth method configured for the provider's OAuth app registration. Confidential clients usually use tokenEndpointAuthMethod: "client_secret_post" or "client_secret_basic" with clientSecret. Public PKCE client registrations use tokenEndpointAuthMethod: "none" with client id and scopes.

OAuth restart and troubleshooting notes:

  • To restart OAuth with unchanged settings, call api.startOAuth({ slug }) and give the user the newest authorizationUrl.
  • To restart OAuth after auth settings were removed or the connection shows authMode: "none", recreate the connection with the full OAuth config and then call api.startOAuth({ slug }).
  • After changing tokenEndpointAuthMethod, client secret, scopes, endpoints, or redirect route, start OAuth again and tell the user to use the newest OAuth tab. Old authorization URLs contain old state, redirect URI, and PKCE challenge data.
  • If the callback reports The client cannot authenticate with methods: [...], the authorization step succeeded and the token exchange failed. Align the configured tokenEndpointAuthMethod with the provider-side OAuth app registration. Use "client_secret_post" or "client_secret_basic" for confidential client registrations, and use "none" for public PKCE client registrations.
  • If a previously failing client starts working after provider-side changes, recreate or update the connection and generate a fresh authorization URL before retesting.

API events

Cataloged automation events:

  • source: api, eventType: connection.changed — fires when an API connection is created or its configuration changes.
  • source: api, eventType: connection.deleted — fires when an API connection is deleted.
  • source: api, eventType: connection.available — fires when auth becomes usable after bearer setup, OAuth callback, or client-credentials token acquisition. Connection hook payloads include connectionId and a connection snapshot with slug, name, baseUrl, authMode, and status.

API tools

API tools can:

  • list configured API connections;
  • create and delete outbound HTTP API connections;
  • inspect auth status;
  • store bearer tokens;
  • start OAuth login;
  • delete stored auth;
  • execute authenticated HTTP requests through a configured connection.

Use codemode first. The api provider methods are listConnections, createConnection, deleteConnection, getAuthStatus, setToken, startOAuth, deleteAuth, and request.

Examples:

js
await api.listConnections();
await api.getAuthStatus({ slug: "example-api" });
await api.request({
  slug: "example-api",
  method: "GET",
  path: "/v1/resources",
  headers: { Accept: "application/json" },
  timeoutMs: 30_000,
});

For JSON request bodies, use api.request --json '{"key":"value"}'. For text bodies, use --body.

Request debugging notes:

  • Always check api.getAuthStatus({ slug }) before debugging an API request. authenticated: true means OAuth credentials are stored; returned HTTP 404, 405, or 500 statuses are upstream API responses.
  • Treat upstream 4xx and 5xx responses from api.request as response data with status, statusText, headers, and body.
  • If a user provides a full URL, convert it to a relative path for the configured connection base URL.
  • For endpoints like token introspection, inspect the upstream Allow and WWW-Authenticate headers. A 405 with Allow: OPTIONS, POST means retry with POST; a 401 invalid_client means that endpoint requires its own client authentication and often a form body such as a token parameter.
  • If you see a runtime validation error about missing statusText, rebuild or restart the API fragment/runtime; current API responses include statusText.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Api Connection؟

اضبط اتصالات API في Backoffice واستخدمها. استخدمها عند إنشاء عمليات تكامل مع HTTP API الصادر، أو إعداد المصادقة باستخدام OAuth أو bearer، أو بدء تدفقات OAuth لـ API، أو التحقق من حالة المصادقة، أو تنفيذ طلبات API موثّقة من عمليات الأتمتة.

لماذا تستخدم Api Connection على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Api Connection عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Api Connection في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/api-connection. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Api Connection؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Api Connection؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Api Connection معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Api Connection مجانية؟

نعم. نشرها rejot-dev على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل
شعار affaan-m

Quarkus Verification

affaan-m
المجتمعشائع

حلقة تحقق لمشاريع Quarkus: البناء، والتحليل الثابت، والاختبارات مع قياس التغطية، وفحوصات الأمان، والتجميع الأصلي، ومراجعة الفروقات قبل الإصدار أو طلب الدمج (PR).

39.1K
261.1K
التعليمات
عرض
شعار affaan-m

Springboot Security

affaan-m
المجتمعشائع

أفضل ممارسات Spring Security للمصادقة والتفويض، والتحقق من الصحة، وCSRF، والأسرار، والترويسات، وتحديد معدل الطلبات، وأمان التبعيات في خدمات Java Spring Boot.

39.1K
261.1K
التعليمات
عرض
شعار affaan-m

Agent Architecture Audit

affaan-m
المجتمعشائع

تشخيص متكامل لتطبيقات الوكلاء وتطبيقات LLM. يدقّق تراجعات الأغلفة، وتلوث الذاكرة، وإخفاقات انضباط الأدوات، وحلقات الإصلاح المخفية، وأعطال العرض عبر طبقات مجموعة الوكلاء الـ12. ينشئ نتائج مرتبة حسب الأهمية مع إصلاحات تركّز على الكود. لا غنى عنه للمطورين الذين يبنون تطبيقات الوكلاء أو الحلقات المستقلة أو الميزات المدعومة بـ LLM.

39.1K
261.1K
التعليمات
عرض
شعار NousResearch

Antigravity Cli

NousResearch
مؤسسةشائع

تشغيل Antigravity CLI (agy): الإضافات والمصادقة وبيئة الاختبار المعزولة.

53.5K
250.4K
الملفات: 1
عرض

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇