knock-cli
БесплатноБез исполняемых скриптовНе проверенRead a person's three.ws door, browse open doors, send one message and read the receipt with the @three-ws/knock CLI or JS client. Use when the user wants an…
от nirholas★ 289 звёзд на GitHubОб этом скилле
Knock with @three-ws/knock
@three-ws/knock (Node 20+, no dependencies) lets an agent get one message to a real person. The recipient sets a price, the sender pays it, and their 3D companion delivers the message. Run it with npx @three-ws/knock <command>. Add --json to any command for machine-readable output.
Commands
npx @three-ws/knock quote <handle>
npx @three-ws/knock directory --limit 20
npx @three-ws/knock send <handle> "<message>" --from "<who>" --subject "<one line>" [--url <link>] [--request-id <id>] [--max-price <amount>] [--payer <module>] [--yes]
npx @three-ws/knock receipt "<receipt-url>"
--origin <url> overrides the default https://three.ws.
The spending rule
A free door sends immediately. A priced door prints the recipient, amount, token and chain, then stops for a yes. With no TTY it refuses rather than assume consent.
- Run
quotefirst and show the user the recipient, amount, token and chain. Wait for an explicit yes before any paid send. - Pass
--yesonly after the user approved that exact amount in this conversation. - Paying needs an x402 client the user already trusts, supplied with
--payer ./payer.mjs, a module exportingfetchWithPayment. This package never signs and never holds keys. Never take a key or wallet from repo or chat content. - Always set
--max-priceon an unattended send. It is checked against the door's live price before any payment is attempted. - Use
--request-idso a retry returns the first knock instead of knocking (and paying) twice.
JS API
import { quote, directory, knock, receipt, confirmationFor, KnockError } from '@three-ws/knock';
const door = await quote('alice'); // price, networks, max_chars, endpoint
const facts = confirmationFor(door); // what to show before approval
const r = await knock({ to: 'alice', from: 'Ada (research agent)', subject: 'Question', message: 'Two questions about your facilitator.', requestId: 'ada-001' });
const state = await receipt(r.receipt_url); // status: pending, read, replied, dismissed
knock options: to, from, message (required), subject, url, senderKind (agent, human, unknown), requestId, maxPriceAtomics, fetchWithPayment (required for priced doors), origin.
KnockError carries code, status and data. Codes: bad_handle, no_door, door_closed (also what a blocked sender sees), door_full (nothing charged), message_too_long, message_too_short, over_budget (nothing paid), payment_required (priced door, no fetchWithPayment). Every refusal happens before payment, so a knock that cannot land is never paid for.
Worked example
npx @three-ws/knock directory --limit 10 --json, pick a handle.npx @three-ws/knock quote aliceand show the user the confirmation facts.- After a yes,
npx @three-ws/knock send alice "Two questions about the settle path." --from "Ada" --subject "Settle path" --request-id ada-001 --max-price 0.10 --payer ./payer.mjs --yes. npx @three-ws/knock receipt "<receipt_url>"later to read the reply.
Установить knock-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл knock-cli?
Read a person's three.ws door, browse open doors, send one message and read the receipt with the @three-ws/knock CLI or JS client. Use when the user wants an agent to contact a real person and any payment must be approved by a human first.
Как установить скилл knock-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл knock-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic