Logo van Hor External Api Client

Hor External Api Client

Organisatie
openreachtech
hor-external-api-client

Implement a client for an external HTTP/REST API using `@openreachtech/mentsu-rocket-client` (the Launcher / Payload / Capsule three-class structure). Use this skill whenever the user asks to add or change an external API integration — a new service client, a new API operation, request/response key conversion, authorization headers, or wrapping a vendor SDK — under `app/<serviceName>Client/`. For the raw source guide see the doc linked at the bottom.

Overzicht

Uitgeveropenreachtech
Repositoryhora-skills-ort-renchan
Skillnaamhor-external-api-client
Sterren
32
Forks
0
Meegeleverde bestanden
9
LicentieApache-2.0
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 9 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door openreachtech op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Hor External Api Client in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-external-api-client
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openreachtech/hora-skills-ort-renchan.git /tmp/hora-skills-ort-renchan
mkdir -p .claude/skills
cp -r /tmp/hora-skills-ort-renchan/kit/skills/hor-external-api-client .claude/skills/hor-external-api-client
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Hor External Api Client in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Hor External Api Client automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Hor External Api Client niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

External API Client

How to implement a client for an external HTTP/REST API with @openreachtech/mentsu-rocket-client (rocket-client from here on). One external request is split across three classes — Launcher / Payload / Capsule. The conventions are divided into the detail files listed at the bottom; read the one that matches what you are doing.

First principle: confine every difference from the external API to Payload / Capsule (anti-corruption layer)

Every convention in this skill follows from one goal: an external API's interface differences must stay out of application code. Key names, value formats, paths, authentication and response shapes of an external API can all change, and they disagree with our own naming conventions anyway. Confine those differences to a single layer (the anti-corruption layer) so the caller (a resolver or a job) never has to know about them.

  • Differences on the way in (key names, value formats, path, query, authentication) belong to Payload.
  • Differences on the way out (response key names, nesting, missing fields) belong to Capsule's extractXxx().
  • The caller only builds a Payload and pulls values out of a Capsule. If the external API's raw shape reaches the caller, this layer has failed.
  • Why: without this layer — or with a thin one — every change to the external API forces edits in resolvers and jobs, and the reach of a change becomes impossible to see. Collecting the differences in one place is what keeps a spec change contained to Payload / Capsule. When an individual rule leaves you unsure, decide it by extending this principle: which class owns this difference?

Cross-cutting rules (they apply to every layer)

HTTP goes through the native fetch only — no axios, no HTTP client of your own

In the direct-HTTP pattern, communication is handled by the Node.js native fetch built into BaseLauncher. Do not add another HTTP client module such as axios, and do not implement an HTTP client or Fetcher class of your own. Wrap an SDK only when the vendor publishes an official one (sdk-wrapper.md — an interim implementation).

  • Why: because the transport is centralized in BaseLauncher, retries, error conversion and swapping in a stub for tests all take effect in one place. If each client brings its own axios, that benefit is gone and the transport ends up implemented differently per operation.

Decide failure with capsule.hasError(), not try-catch

launchRequest() catches fetch exceptions and body-parse failures internally and returns the Capsule for the corresponding error kind. The caller writes no try-catch and decides failure from the returned capsule.hasError().

  • Why: funnelling missing authentication, invalid input, network failure, parse failure and a status >= 400 into one path — the "error Capsule" — is this module's design. A caller that adds try-catch on top handles errors through two channels, the caught exception and the Capsule, and a case will fall through the gap.

Return null (or an empty array) for a missing value, never undefined

When an extractXxx() or a getter cannot produce a value, return null — or an empty array for something that returns an array, or whatever the intended default is — not undefined.

  • Why: undefined cannot be told apart from "undefined behaviour / not implemented yet". null (or an empty array) states the intent: the value was looked for and was not there. Details in capsule.md.

Write comments in code in English

Comments in the real code you generate (.js) — //, /* */, JSDoc — are written in English, to match the rest of the codebase. The js blocks in this skill are real code too, so their JSDoc and comments are shown in English as well.

Naming, and one class per file

One class per file, with a single export default. Name a derived launcher <Operation>Launcher, and the payload and capsule <Operation>Payload / <Operation>Capsule, so the operation is readable from the name. Pick the verb of a retrieval method by where the value comes from (fetch~ = external API, find~ = the database, extract~ = pulled out of a Capsule). The remaining general coding conventions are in conventions.md.

Detail files

  • architecture.md — the whole picture (the three classes, the data flow, directory layout, the classes the module provides)
  • launcher.md — Launcher (base and derived / direct HTTP, the members of BaseLauncher)
  • payload.md — Payload (input definition, method/pathname, schema, key conversion)
  • capsule.md — Capsule (the response wrapper, extractXxx(), null guards)
  • authorization.md — authentication (AuthorizationBuilderCtor / authorizationApiKey)
  • sdk-wrapper.md — the SDK-wrapping pattern (an interim implementation that overrides launchRequest())
  • usage.md — the implementation steps, and use from the caller (resolver / job), DI and hooks
  • testing.md — unit tests for Payload / Capsule / Launcher
  • conventions.md — the naming and coding convention checklist

This skill was made from the repository's external API client implementation guide. For reference material — rocket-client's own export list, its type definitions, examples of existing clients — see the "reference files" section at the end of that guide.

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Hor External Api Client?

Implement a client for an external HTTP/REST API using `@openreachtech/mentsu-rocket-client` (the Launcher / Payload / Capsule three-class structure). Use this skill whenever the user asks to add or change an external API integration — a new service client, a new API operation, request/response key conversion, authorization headers, or wrapping a vendor SDK — under `app/<serviceName>Client/`. For the raw source guide see the doc linked at the bottom.

Waarom Hor External Api Client gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Hor External Api Client bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Hor External Api Client in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-external-api-client. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Hor External Api Client gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Hor External Api Client gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Hor External Api Client ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Hor External Api Client gratis?

Ja. Deze skill is door openreachtech op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇