Logotipo de Hor External Api Client

Hor External Api Client

Organización
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.

Descripción general

Editoropenreachtech
Repositoriohora-skills-ort-renchan
Nombre de la habilidadhor-external-api-client
Estrellas
32
Forks
0
Archivos incluidos
9
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 9 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por openreachtech en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Hor External Api Client en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-external-api-client
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Hor External Api Client en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Hor External Api Client automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Hor External Api Client no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA 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.

¿Por qué usar Hor External Api Client en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Hor External Api Client está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Hor External Api Client en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-external-api-client. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Hor External Api Client?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Hor External Api Client?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Hor External Api Client con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Hor External Api Client?

Sí. openreachtech la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇