Hor Subscription Resolver logo

Hor Subscription Resolver

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

Overview

Publisheropenreachtech
Repositoryhora-skills-ort-renchan
Skill namehor-subscription-resolver
Stars
32
Forks
0
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by openreachtech on GitHub. Read the source before you install it.

Installation

Install the Hor Subscription Resolver AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hor Subscription Resolver in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hor Subscription Resolver on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hor Subscription Resolver is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hor Subscription Resolver AI skill do?

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.

Why use Hor Subscription Resolver on TypingMind?

Because you install it once and use it with any model. Hor Subscription Resolver is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hor Subscription Resolver in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hor Subscription Resolver?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hor Subscription Resolver?

As many as you like. As long as a model supports skills, you can use Hor Subscription Resolver with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hor Subscription Resolver AI skill free?

Yes. It is published on GitHub by openreachtech under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇