Logo de Hor External Api Client

Hor External Api Client

Organização
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.

Visão geral

Publicado poropenreachtech
Repositóriohora-skills-ort-renchan
Nome da habilidadehor-external-api-client
Estrelas
32
Forks
0
Arquivos incluídos
9
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • 9 arquivos incluídos

    Scripts, modelos de documentos e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente leitura e nunca são executados.

  • Código aberto

    Publicada por openreachtech no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Hor External Api Client no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-external-api-client
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Hor External Api Client em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Hor External Api Client automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Hor External Api Client não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu 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.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Hor External Api Client faz?

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 que usar Hor External Api Client no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Hor External Api Client é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Hor External Api Client no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-external-api-client. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Hor External Api Client?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Hor External Api Client?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Hor External Api Client com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Hor External Api Client é gratuita?

Sim. A habilidade é publicada no GitHub por openreachtech sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇