Logo di Hor Subscription Resolver

Hor Subscription Resolver

Organizzazione
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.

Panoramica

Autoreopenreachtech
Repositoryhora-skills-ort-renchan
Nome della skillhor-subscription-resolver
Stelle
32
Fork
0
File inclusi
3
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 3 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da openreachtech su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Hor Subscription Resolver in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'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-subscription-resolver .claude/skills/hor-subscription-resolver
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Hor Subscription Resolver in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Hor Subscription Resolver non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Hor Subscription Resolver non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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)

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Hor Subscription Resolver su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Hor Subscription Resolver è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Hor Subscription Resolver in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Hor Subscription Resolver?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Hor Subscription Resolver?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Hor Subscription Resolver: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Hor Subscription Resolver è gratuita?

Sì. È pubblicata su GitHub da openreachtech con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇