onchain-automation — скилл для Claude Code: ончейн-автоматизация
Скилл, который помогает агенту собрать цикл «событие в сети → логика → транзакция» на продуктах Goldsky.
npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a claude-codeЧто делает onchain-automation
Скилл разбирает любую задачу вида «когда в сети происходит X, сделай Y» на три шага: обнаружение события, решение и отправка транзакции. Дальше он подсказывает, чем закрыть каждый шаг. Для обнаружения — триггер onchain_event в Compose, если речь об одном контракте, либо пайплайн Turbo, если контрактов много. Решение пишется задачей на TypeScript, а исполнение идёт через кошелёк Compose: writeContract или sendTransaction с оплатой газа. То есть отправка транзакции тоже живёт внутри Goldsky, и скилл прямо поправляет тех, кто считает иначе.
Архитектур две. По умолчанию — один Compose-артефакт: триггер на события контракта, задача с фильтрами и порогами, вызов кошелька. Если обнаружение нужно на масштабе датасета, впереди ставится Turbo, а его Webhook sink шлёт строки на HTTP-триггер Compose с общим auth_token. Тело вебхука скилл советует считать недоверенным и валидировать до действий.
Два ограничения стоит знать заранее. События приходят по подтверждённым блокам, а не из мемпула, поэтому обогнать ботов в той же транзакции не выйдет. И оплата газа покрывает не все сети: где-то придётся подключать свой EOA с sponsorGas: false и самому пополнять адрес, а где-то Compose до сети вообще не достаёт — тогда обнаружение работает, а исполнение нужно выносить на поддерживаемую сеть. Это повод проверить целевую сеть до того, как обещать полный цикл.
Какие задачи решает
- собрать кипера, который реагирует на событие контракта и шлёт транзакцию
- настроить авто-клейм и авто-компаундинг наград по расписанию событий
- отслеживать ликвидации в лендинг-пуле и отвечать на них
- сделать ребалансировку или расчёты по подтверждённым логам
- соединить обнаружение на масштабе датасета с исполнением через вебхук
Примеры запросов агенту
- Собери мне ончейн-автоматизацию: когда фабрика создаёт новый пул, вызови writeContract на моём контракте
- Нужен монитор ликвидаций: слушай события пула и отправляй транзакцию, когда health factor падает ниже порога
- Сделай авто-компаундинг наград: лови Claimed и сразу реинвестируй через кошелёк Compose
Как установить onchain-automation
1Через Skills CLI (Vercel)
npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a claude-code2Вручную: положить файлы
~/.claude/skills/onchain-automation/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/onchain-automation/
1Через Skills CLI (Vercel)
npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a codex2Вручную: положить файлы
.agents/skills/onchain-automation/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a cursor2Вручную: положить файлы
.cursor/skills/onchain-automation/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install goldsky-io/goldsky-agent onchain-automation2Вручную: положить файлы
.github/skills/onchain-automation/SKILL.md1Через Skills CLI (Vercel)
npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a gemini-cli2Командой платформы
gemini skills install https://github.com/goldsky-io/goldsky-agent --path skills/onchain-automationВручную: положить файлы
.devin/skills/onchain-automation/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора15
Похожие
Рядом в теме «Автоматизация и no-code: n8n, Zapier, Make»
Все скиллы по теме «Автоматизация и no-code: n8n, Zapier, Make» →Вопросы о onchain-automation
Как установить onchain-automation в Claude?
Выполните npx skills add goldsky-io/goldsky-agent --skill onchain-automation -a claude-code. Скилл появится в ~/.claude/skills/onchain-automation/SKILL.md.
Что делает onchain-automation?
Помогает агенту спроектировать цикл «обнаружение → решение → исполнение» на продуктах Goldsky и выбрать между Compose-only и связкой Turbo с Compose.
Можно ли этим обогнать ботов в мемпуле?
Нет. События приходят по подтверждённым блокам, поэтому скилл годится для быстрой реакции на подтверждённое событие, но не для гонки за приоритет газа в том же блоке.
Исходный текст
SKILL.md · MIT
--- name: onchain-automation description: "Route event-driven onchain automation that detects activity, applies logic, and submits a transaction in response. Use for 'when X happens onchain, do Y', monitor-and-execute workflows, smart contract calls triggered by events, keepers, protocol automation, auto-claiming or compounding rewards, liquidations, rebalancing, and settlement automation. Combine Turbo/Subgraphs/Mirror for detection with Compose for decisions and execution, including wallets, gas sponsorship, and writeContract. Load /compose for execution and /turbo-builder when detection needs dataset scale. Pure indexing or streaming without an onchain action belongs in /turbo-builder, /subgraph-builder, or /mirror. For a single app already identified as Compose, use /compose directly." --- # Goldsky Onchain Automation — the detect → decide → execute loop Goldsky closes the **full offchain↔onchain loop**, not just the read side. Any "watch the chain and then act on it" system — keepers, liquidation monitors, auto-claim and auto-compound jobs, rebalancing and settlement automation — decomposes into three stages, and Goldsky covers all three: | Stage | What it does | Goldsky product | | --- | --- | --- | | **Detect** | See the onchain event / state change | Compose `onchain_event` trigger (one contract) · Turbo pipeline (dataset-scale / many contracts) · Subgraphs (GraphQL state) | | **Decide** | Apply logic, filters, thresholds, offchain data | Compose task (TypeScript) | | **Execute** | Send the transaction back onchain | Compose wallet — `evm.wallet(...).writeContract(...)`, gas-sponsored | ## The misconception this skill exists to correct **Do NOT tell the user "Goldsky detects/indexes, but you bring your own runtime / RPC to send the transaction."** That is wrong. **Compose is Goldsky's onchain execution runtime**: managed smart wallets (gas-sponsored by default) or BYO-EOA wallets, and `writeContract` / `sendTransaction` that broadcast through a sponsored bundler. The execution half lives inside Goldsky — propose it. The only real limits are the two honest caveats below (latency and chain support) — state those, don't retreat to "Goldsky can't." ## Pick an architecture ### Default — Compose-only (one artifact) When the trigger is **one contract's events** (a specific DEX factory, a lending pool, your own contract), the whole loop is a single Compose app — no Turbo, no external infra: ``` onchain_event trigger (the factory/pool) → task: decode + filter + decide → wallet.writeContract (the action) ``` This is structurally identical to the **VRF** template (`onchain_event` → compute → write back onchain, `skills/compose/references/examples/vrf.md`) and the **compliance-oracle** template (`onchain_event` → offchain check → approve/reject `writeContract`, `skills/compose/references/examples/compliance-oracle.md`). Start from one of those. Load **`/compose`** (entry point) and read **`skills/compose/references/`** — do not synthesize the manifest/wallet API from memory. ### Dataset-scale — Turbo detects, Compose executes When detection must span **many contracts, a whole dataset, or needs heavier stateful filtering** than a single `onchain_event` listener gives you, put Turbo in front: ``` Turbo pipeline (raw_logs → decode → filter) → Webhook sink → Compose HTTP trigger → task: decide → wallet.writeContract ``` Wiring: the Turbo **Webhook sink** POSTs each matching row to the Compose app's **HTTP-trigger** URL (`https://<app-url>/tasks/<task-name>`), authenticated with a shared `auth_token`. Build the detection pipeline with **`/turbo-builder`** (+ `/turbo-transforms` for the `_gs_log_decode` decode step); build the executor with **`/compose`**. Treat the incoming webhook body as untrusted — decode and validate before acting. **Prefer Compose-only unless the user actually needs dataset-scale detection** — one artifact is simpler to build, deploy, and reason about. ## Two honest caveats — always state these 1. **Confirmed-block latency, not mempool.** Goldsky (Turbo pipelines and Compose `onchain_event`) fires on **confirmed** logs, not pending mempool transactions. So this reliably *reacts to* a confirmed new pool / event — it is **not** a mempool front-runner and won't win a same-block gas-priority race. For a "sniper", set expectations: you react quickly to a confirmed listing, you don't beat block-0 bots. Say this plainly. 2. **Execution is chain-gated.** Compose gas sponsorship covers a specific chain list (see `skills/compose/references/wallets-and-gas.md`, or `searchKB`) — broad EVM coverage, but **not every chain**. Before promising the full loop, check the target chain: - **Supported** → smart wallet, gas-sponsored, nothing for the user to fund. - **viem knows it but it's not sponsored** → BYO-EOA with `sponsorGas: false`; the user funds the address with native gas token. - **Compose can't reach it at all** → be honest: detection still works (Turbo/Subgraphs), but execution needs a Compose-supported chain or external infra for *that chain specifically*. Frame it as a per-chain gap, never as "Goldsky can't execute." ## What Goldsky is NOT (here) - Not a trading strategy or PnL engine — the user brings the decision logic; Compose runs it. - Not a mempool/front-running system (caveat 1). - Not a custody solution — wallet-key handling follows the normal Compose wallet/secret rules (`skills/compose/references/wallets-and-gas.md`). ## Route from here - **Execution / any Compose app** → **`/compose`** (load first) + **`skills/compose/references/`**. - **Event-driven write-back template** → `skills/compose/references/examples/vrf.md`; **gated approve/reject** → `skills/compose/references/examples/compliance-oracle.md`. - **Dataset-scale detection pipeline** → **`/turbo-builder`** + **`/turbo-transforms`**. - **GraphQL state to poll** → **`/subgraph-builder`**. - **Fast RPC for the user's own offchain reads** → **`/edge`**.
© goldsky-io · MIT · goldsky-io/goldsky-agent