hoc-async
Conventions for writing asynchronous code: how a promise is written, and what becomes of a value that crosses the boundary one makes. Use when writing or…
от openreachtech★ 17 звёзд на GitHub
Установить hoc-async в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Shared: Async
Conventions related to writing asynchronous code.
Promise
- When writing Promises, use
async/awaitwhenever possible.
A value that crosses the boundary a promise makes
Making one member async is not a local change. Every caller becomes async with it, and the value it hands back now travels through a promise instead of being returned directly — so properties of that value which nothing used to inspect begin to matter.
What inspects it is the promise itself, and what it looks for is then. A value answering
that lookup with a function is taken for a thenable: the promise calls it as
then(resolve, reject) and settles to whatever that call passes on, so the value is replaced by
something it was never meant to produce.
Nothing reports it. The call lands inside the value's own code carrying arguments it has no
reason to expect, and the failure surfaces wherever that code first reads one of them — a long
way from the await that caused it, and wearing the shape of an ordinary bug.
- A value that answers every property lookup must refuse
then. Where a lookup is answered by producing something — a handler built per key, a member resolved on demand —thenis produced too, and the value becomes a thenable by accident. Answer it as absent, and answer the symbol keys the same way. - The hazard is the probe, not whatever answered it. Any value carrying a
thenmember meets it, so a class that happens to define one is caught in the same way. The rule is about what crosses the boundary, never about how the value was built. - It appears only once the boundary is there. The same value returned directly is never probed, which is why making a member async is where this is met rather than where the value was written.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл hoc-async?
Conventions for writing asynchronous code: how a promise is written, and what becomes of a value that crosses the boundary one makes. Use when writing or awaiting a promise, when making an existing member async, or when a value returned through one stops behaving like itself. Test doubles for async members belong to the Jest convention.
Как установить скилл hoc-async?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл hoc-async запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…