Логотип Hor Subscription Resolver

Hor Subscription Resolver

Організація
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.

Огляд

Видавецьopenreachtech
Репозиторійhora-skills-ort-renchan
Назва навичкиhor-subscription-resolver
Зірки
32
Форки
0
Файли в пакеті
3
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 3

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем openreachtech. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Hor Subscription Resolver у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Hor Subscription Resolver в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Hor Subscription Resolver, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Hor Subscription Resolver не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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)

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ 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.

Навіщо використовувати Hor Subscription Resolver у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Hor Subscription Resolver — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Hor Subscription Resolver у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-subscription-resolver. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Hor Subscription Resolver?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Hor Subscription Resolver?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Hor Subscription Resolver — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Hor Subscription Resolver?

Так. Навичку опубліковано на GitHub: openreachtech, за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇