jpskill.com
🛠️ 開発・MCP コミュニティ

writing-bots

パブリックなブロックチェーンネットワーク上のイベントを継続的に監視し、反応するボットを構築することで、ブロックチェーン技術を活用したビジネスチャンスを広げる自動化システムを開発するSkill。

📜 元の英語説明(参考)

Write a bot to continuously listen and respond to events on a public blockchain network.

🇯🇵 日本人クリエイター向け解説

一言でいうと

パブリックなブロックチェーンネットワーク上のイベントを継続的に監視し、反応するボットを構築することで、ブロックチェーン技術を活用したビジネスチャンスを広げる自動化システムを開発するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o writing-bots.zip https://jpskill.com/download/17220.zip && unzip -o writing-bots.zip && rm writing-bots.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17220.zip -OutFile "$d\writing-bots.zip"; Expand-Archive "$d\writing-bots.zip" -DestinationPath $d -Force; ri "$d\writing-bots.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して writing-bots.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → writing-bots フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] writing-bots

このスキルでは、Silverback SDK を使用してボットを作成するタイミングと方法について説明します。

ユーザーは、どのブロックチェーンネットワークで実行したいか、どのスマートコントラクトとやり取りしたいか、どのような種類のアクションを実行したいかなど、運用要件を提供します。 技術的な制約や、回避しなければならないシナリオに関する追加のコンテキストを提供する場合があります。

このスキルの使用

重要: Silverback ボットのコードを記述する前に、必ず以下を実行してください。

  1. web_fetch を使用して、https://docs.apeworx.io/silverback/stable から最新のドキュメントを取得します。
  2. 特に、次のような関連ページを取得します。

Silverback に関する一般的な知識に頼ることは絶対にしないでください。正確性を確保するために、常に最新のドキュメントを最初に取得してください。

ボットの設計

ボットを記述する前に、実行したいアクションの種類と、それらのアクションをトリガーするために監視したいオンチェーンまたはオフチェーンのイベントを理解してください。

  • New Block: すべてのブロックでアクションを実行しますか?
  • Event Log: スマートコントラクトが特定イベントを発行したときにアクションを実行しますか?
  • Cron Job: 時間間隔に基づいてアクションを実行しますか?
  • Metrics: メトリクスが特定の条件を満たしたときにアクションを実行しますか?

重要: コードを記述する前に、要件を十分に理解してください。

次に、イベントハンドラーを実装します。これは、次のようなロジックをトリガーするコールバックとして実装されます。

  • Telegram または Discord でグループまたはチャネルにメッセージを送信する
  • X または Farcaster でソーシャルメディアの投稿を送信する
  • 別のバックエンドサービスに POST リクエストを送信する
  • リスニングチェーンおよび/または他のブロックチェーンでトランザクションに署名してブロードキャストする
  • 単純または派生したメトリクスを測定する
  • 製品またはサービスをプロビジョニングする

メトリクスの定義

ボットの動作を可視化するために、時間の経過とともに監視してボットの実際の動作を理解できる主要な「Metrics」またはシグナル値を定義すると便利なことがよくあります。 これは監視目的にも非常に役立ちますが、Silverback ではメトリクスの値に基づいてイベントトリガーを定義することもできます。 たとえば、最新のブロックで特定の分散型取引所プールで発生している取引量に基づいて複雑なメトリクスを定義した場合、そのボリュームシグナルが特定のしきい値を上回るか下回る場合にアクションをトリガーしたい場合があります。 これにより、基本的なブロックチェーンイベントから得られる情報以上の、より複雑で反応的な動作を作成できます。

状態の維持

ボットで実行するアクションが他のアクションの結果に依存する場合があるため、それらの結果を追跡するために内部状態を維持すると便利です。 内部状態の使用は控えめにして、できる限りブロックチェーンの状態、またはボットと統合した他の外部サービスの状態に依存して、正しい判断を下すようにしてください。

リスク管理

全体として、ボットは潜在的に危険なアクションを実行する可能性があり、重要なユーザーインフラストラクチャの一部になる可能性があります。 トランザクションを送信する署名者を追加したり、重要な通信チャネルへのアクセスを許可したりするなどの、より劇的な手順に進む前に、段階的に実装の正確性をゆっくりと検証することをお勧めします。 最初は print デバッグで簡単に行うことができます。 または、API キーの可用性、bot.signer が構成されているかどうか、またはアカウント残高などの他のオンチェーン情報に基づいて、特定の環境変数の存在に基づいて、組み込みの運用モードを構築します。

また、設定可能な制限(os.environ を介した環境変数を使用)、緊急停止条件(silverback.CircuitBreaker 例外を発生させる)、またはリスクを効果的に管理するためのその他の方法を追加することをお勧めします。

ボットの実行

ユーザーがボットが適切に記述されており、テストの準備ができていると判断した場合にのみ、silverback をインストールして実行する必要があります。

silverback をインストールするには、uv がインストールされた状態で次のコマンドを実行します。

$ uv tool install silverback

これにより、silverback cli コマンドが利用可能になります。 次に、次のコマンドを使用して、目的の ecosystem および network (例: "ethereum:mainnet") でボットを実行できます。

$ silverback run --network <ecosystem>:<network>

ctrl+C を押すか、SHUTDOWN または KILL シグナルをプロセスに送信することで、ボットを手動でシャットダウンできます。

ボットのログを介してボットの動作を監視し、エラーがほとんど発生しなくなるまでエラーを解決してみてください。 Silverback は時折発生するエラーを処理できるため、何かが失敗している理由を正確に把握できない場合は、テストを続行しても問題ない可能性があります。

ユーザーにログを介してボットを監視するように依頼し、ボットの動作が気に入っているかどうかを尋ねます。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

This skill describes when and how to a bot using the Silverback SDK.

The user provides operational requirements such as which blockchain network they want it to run on, which smart contracts they want to interact with, what types of actions they want to take. They may provide additional context about technical constraints, or scenarios it must avoid.

Using This Skill

CRITICAL: Before writing any Silverback bot code, you MUST:

  1. Use web_fetch to retrieve the latest documentation from https://docs.apeworx.io/silverback/stable
  2. Specifically fetch relevant pages like:

DO NOT rely on general knowledge about Silverback - always fetch the current documentation first to ensure accuracy.

Designing a Bot

Before writing the bot, understand the types of actions you want to perform, and which on-chain or off-chain events you might want to monitor in order to trigger them

  • New Block: Do you want to perform an action on every block?
  • Event Log: Do you want to perform an action when a smart contract emits a particular event?
  • Cron Job: Do you want to perform an action on a time-based interval?
  • Metrics: Do you want to perform an action when a metric meets certain conditions?

CRITICAL: Have a good understanding of the requirements first before proceeding to write any code.

Then implement event handlers, which are callbacks implemented that trigger logic which might:

  • send a message on Telegram or Discord to a group or channel
  • send a social media post on X or Farcaster
  • send a POST request to another backend service
  • sign and broadcast a transaction on the listening chain and/or other blockchain(s)
  • measure a simple or derived Metric
  • provision a product or service

Defining Metrics

In order to have visibility into the operation of the bot, it is often useful to define key "Metrics" or signal values that you can monitor over time to understand the real-world operation of the bot. This can also be very useful for monitoring purposes, but Silverback also lets you define event triggers based on the value of the metric. For example, if you've defined a complex metric based on the amount of trading volume occuring on a particular decentralized exchange pool in the latest block, you might want to trigger an action to occur when that volume signal is above or below a certain threshold. This can create more complex, reactive behaviors beyond what basic blockchain events can tell you.

Maintaining State

Sometimes the actions you want to take in a bot depends on the results of other actions, so it is useful to maintain some internal state to track those results. Use internal state sparingly, and try to rely as much as you can on the blockchain state, or the state of other external services you've integrated the bot with in order to make correct decisions.

Managing Risk

Overall, bots can do potentially risky actions and may end up being a part of critical user infrastructure. It is best to advise them on proceeding slowly and verifying the correctness of their implementation in stages, before more drastic steps like adding a signer to submit transactions or giving it access to a critical communications channel. You can easily do this through print debugging at first, or build-in operational modes based on the presence of a specific environment variable such as the availability of an API key, whether the bot.signer is configured, or based on other on-chain information like account balances.

Also, you should suggest things like adding configurable limits (using environment variables via os.environ), emergency stop conditions (raising the silverback.CircuitBreaker exception), or others ways to effectively manage risk.

Running the Bot

Only after the user thinks that the bot seems well-written and ready for testing should you install silverback and run it.

To install silverback, run the following command with uv installed:

$ uv tool install silverback

This will make the silverback cli command available. You can then run the bot on the ecosystem and network they want (such as "ethereum:mainnet") using:

$ silverback run --network <ecosystem>:<network>

You can make the bot shutdown manually via ctrl+C, or sending the SHUTDOWN or KILL signal to the process.

Monitor the bot's operations via it's logs and try to resolve errors until they rarely happen. Silverback can handle the occasional error, so you can't figure out exactly why something is failing, it could be okay to continue testing with.

Ask the user to monitor their bot as well via the logs, and then ask if they like how the bot is working.