writing-bots

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

242 stars

Best use case

writing-bots is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Write a bot to continuously listen and respond to events on a public blockchain network.

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

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "writing-bots" skill to help with this workflow task. Context: Write a bot to continuously listen and respond to events on a public blockchain network.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/writing-bots/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/apeworx/writing-bots/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/writing-bots/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How writing-bots Compares

Feature / Agentwriting-botsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

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:
   - Development guide: https://docs.apeworx.io/silverback/stable/userguides/development
   - API reference: https://docs.apeworx.io/silverback/stable/methoddocs

**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](#defining-metrics) 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](#defining-metrics)
- 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:

```bash
$ 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:

```bash
$ 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.

Related Skills

user-guide-writing

242
from aiskillstore/marketplace

Write clear and helpful user guides and tutorials for end users. Use when creating onboarding docs, how-to guides, or FAQ pages. Handles user-focused documentation, screenshots, step-by-step instructions.

technical-writing

242
from aiskillstore/marketplace

Write clear, comprehensive technical documentation. Use when creating specs, architecture docs, runbooks, or API documentation. Handles technical specifications, system design docs, operational guides, and developer documentation with industry best practices.

postmortem-writing

242
from aiskillstore/marketplace

Write effective blameless postmortems with root cause analysis, timelines, and action items. Use when conducting incident reviews, writing postmortem documents, or improving incident response processes.

plan-writing

242
from aiskillstore/marketplace

Structured task planning with clear breakdowns, dependencies, and verification criteria. Use when implementing features, refactoring, or any multi-step work.

azure-mgmt-botservice-py

242
from aiskillstore/marketplace

Azure Bot Service Management SDK for Python. Use for creating, managing, and configuring Azure Bot Service resources. Triggers: "azure-mgmt-botservice", "AzureBotService", "bot management", "conversational AI", "bot channels".

azure-mgmt-botservice-dotnet

242
from aiskillstore/marketplace

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

technical-blog-writing

242
from aiskillstore/marketplace

Technical blog post writing with structure, code examples, and developer audience conventions. Covers post types, code formatting, explanation depth, and developer-specific engagement patterns. Use for: engineering blogs, dev tutorials, technical writing, developer content, documentation posts. Triggers: technical blog, dev blog, engineering blog, technical writing, developer tutorial, tech post, code tutorial, programming blog, developer content, technical article, engineering post, coding tutorial, technical content

writing-page-layout

242
from aiskillstore/marketplace

Use this skill when you need to write code for a page layout in the Next.js

writing-lib-functions

242
from aiskillstore/marketplace

Use this skill when you need to write lib functions in `srs/lib` for the Next.js app

writing-data

242
from aiskillstore/marketplace

Use this skill when you need to structure data in `srs/data` for the Next.js app

writing-config-files

242
from aiskillstore/marketplace

Use this skill when you need to write configuration files in `src/config` for the Next.js app

report-writing

242
from aiskillstore/marketplace

작업 완료 후 상세 리포트 문서를 작성. 변경 이력, 영향도 분석, 검증 결과를 문서화할 때 사용. 파일명 규칙 YYYY-MM-DD-<제목>-report.md