Logo vun Hor Subscription Resolver

Hor Subscription Resolver

Organisatioun
openreachtech
hor-subscription-resolver

Implement a GraphQL subscription resolver — a class extending the framework's base subscription resolver that declares the subscription operation, scopes its channel per subscriber, and gates who may subscribe. Use this skill whenever the user asks to add or change a subscription, scope or authorize a subscription channel, or wire the publish side that pushes events to subscribers.

Iwwersiicht

Editeuropenreachtech
Repositoryhora-skills-ort-renchan
Skill-Nummhor-subscription-resolver
Stären
32
Forks
0
Matgeliwwert Fichieren
3
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum openreachtech op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Hor Subscription Resolver an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-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-subscription-resolver .claude/skills/hor-subscription-resolver
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Hor Subscription Resolver an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Hor Subscription Resolver automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Hor Subscription Resolver net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Subscription Resolver

A skill for GraphQL subscription resolvers: the class that lets a client subscribe to a channel and receive a stream of pushed events. It declares the operation, decides which channel a caller listens on, and whether they may. The events themselves are published by whatever changes state (a mutation or a background worker), through a PubSub broker — the subscription resolver and the publisher meet on a named channel, never calling each other directly.

This overview maps each topic to a section; the details are in the detail files under references/.

This skill states a general, project-independent rule — a refined best practice, not a description of any one project's code, so it need not match a given repo's existing notation. The class and field names (OnReceiveMessageSubscriptionResolver, onReceiveMessage, roomId, …) are illustrative fakes; use your project's own names and never bake its domain or file paths into the rule. The framework base is shown as BaseSubscriptionResolver; treat it as "your framework's base subscription resolver". Sample code follows the project's lint style (no semicolons, 2-space indent, a space before the parameter parenthesis, trailing commas).

Grand principle: the resolver owns the channel; the state-changer publishes to it

A subscription resolver is a read-only push endpoint. It does two things: name and scope the channel a subscriber listens on, and decide if that subscriber is allowed. It never mutates state and it does not produce the events — a mutation or worker publishes them onto the same channel, and the broker fans them out to every matching subscriber.

  • The subscription resolver is the single source of truth for the channel contract. The channel name is derived from the resolver's schema (the prefix) plus its generateChannelQuery (the scope). The publisher builds its message via the same class (buildTopic), so the two sides can never disagree on the channel — that is why a publisher imports the subscription resolver.
  • The broker decouples the two sides. Subscriber and publisher share only a channel string; they can live in different processes (e.g. a background worker publishes; the API process serves the subscription).
  • Keep it thin. Scope, authorize, unwrap. No business logic, no writes.

1. Basic notation

A subscription resolver extends the framework base and overrides a small, fixed set of members. Every per-call method receives the same four arguments — { variables, context, information, parent } (destructure what you need). The essential members:

MemberOverride?Role
static get schema ()requiredthe subscription operation name — also the channel prefix and the message key
generateChannelQuery ({ variables, context, … })usuallykey/value hash that scopes the channel per subscriber; default {} = broadcast to all
async canSubscribe ({ variables, context, … })for auth (§2)boolean subscribe-time gate; default true
static get errorCodeHash ()when adding authmerge ...super.errorCodeHash + the subscribe-denied code
resolve (payload)rarelymaps the published message to the returned value; the base unwraps payload[schema]
static get operation / channelPrefix / subscribe / buildTopic / publishTopicnoprovided by the base — the subscribe flow, channel building, and publish helpers

The class skeleton, the common-arguments table, the full example, and the @typedef shapes are in basic-notation.md.

2. Adding authentication

Authorization happens once, at subscribe time, in canSubscribe — a boolean gate. Returning false makes the base throw the subscribe-denied error, so also declare that error code in errorCodeHash. Authenticated-only is return context.hasAuthenticated(); resource-scoped access combines the principal with the input; private streams are additionally scoped by principal in generateChannelQuery.

The full canSubscribe / errorCodeHash example, the authenticated / resource-scoped / identity patterns, and the once-per-subscribe note are in authentication.md.

3. Design philosophy

  • Read-only push; the state-changer publishes. The resolver opens a scoped, authorized channel; the mutation/worker that changes state publishes to it after the change commits.
  • One channel contract, one owner. Both sides derive the channel from the same subscription resolver class — the subscriber via generateChannelQuery, the publisher via buildTopic — so the prefix and scope can never drift.
  • Scoping = per-subscriber isolation, and the broker lets the publisher run in a separate process from the API. Keep the payload minimal and resolve thin.

The publish-side example and the full rationale are in design-philosophy.md.

Finishing checklist

  • static get schema returns the subscription operation name (= channel prefix = message key) (§1).
  • generateChannelQuery scopes the channel per subscriber (or {} only for a true broadcast).
  • The resolver does no writes and no business logic — it scopes, authorizes, and unwraps.
  • If access is restricted: canSubscribe returns the boolean gate and errorCodeHash declares the subscribe-denied code (§2); private channels are also scoped by principal.
  • The publisher (mutation/worker) builds its topic via this class's buildTopic and publishes through the broker — no hand-written channel string (§3).
  • The published payload is minimal; resolve is left to the base unless a reshape is needed.

Detail files

  • basic-notation.md — the class skeleton, the common { variables, context, information, parent } arguments, the member table in full, the example, and the @typedef input/response shapes (§1)
  • authentication.md — canSubscribe as the boolean gate, errorCodeHash, the authenticated / resource-scoped / identity-scoping patterns, subscribe-time timing (§2)
  • design-philosophy.md — read-only push, the single channel contract and the publish-side example, per-subscriber isolation, broker decoupling, minimal payload (§3)

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Hor Subscription Resolver?

Implement a GraphQL subscription resolver — a class extending the framework's base subscription resolver that declares the subscription operation, scopes its channel per subscriber, and gates who may subscribe. Use this skill whenever the user asks to add or change a subscription, scope or authorize a subscription channel, or wire the publish side that pushes events to subscribers.

Firwat Hor Subscription Resolver op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Hor Subscription Resolver besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Hor Subscription Resolver an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Hor Subscription Resolver benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Hor Subscription Resolver benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Hor Subscription Resolver domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Hor Subscription Resolver gratis?

Jo. De Skill gëtt vum openreachtech ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇