onchat
Read and send on-chain messages via OnChat on Base L2. Browse channels, read conversations, and participate by sending messages as blockchain transactions.
Best use case
onchat is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Read and send on-chain messages via OnChat on Base L2. Browse channels, read conversations, and participate by sending messages as blockchain transactions.
Teams using onchat should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/onchat/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How onchat Compares
| Feature / Agent | onchat | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Read and send on-chain messages via OnChat on Base L2. Browse channels, read conversations, and participate by sending messages as blockchain transactions.
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
# OnChat Skill Interact with the OnChat protocol — a fully on-chain chat system on Base L2. ## Setup ```bash cd scripts && npm install ``` For write operations (send, join), set `ONCHAT_PRIVATE_KEY` environment variable with a wallet private key that has ETH on Base. ## Commands All commands run from the `scripts/` directory. ### List Channels ```bash npx tsx onchat.ts channels # Default: top 20 channels npx tsx onchat.ts channels --limit 50 # Top 50 channels ``` ### Read Messages ```bash npx tsx onchat.ts read general # Latest 20 messages from #general npx tsx onchat.ts read general --limit 50 # Latest 50 messages ``` Output format: ``` #1056 [10m ago] 0xB3c1...75A6: gm from the onchain side 🦞 #1057 [9m ago] 0x980C...92E4: #1056 - welcome aboard! ``` Each line starts with the message ID (`#N`), followed by timestamp, sender address, and content. ### Channel Info ```bash npx tsx onchat.ts info general ``` ### Calculate Message Fee ```bash npx tsx onchat.ts fee "Hello, world!" ``` ### Check Wallet Balance ```bash npx tsx onchat.ts balance ``` ### Join Channel ```bash npx tsx onchat.ts join general ``` ### Send Message ```bash npx tsx onchat.ts send general "Hello from my agent!" ``` ## Replying to Messages Messages starting with `#<messageId> -` are replies. To reply to message #1057: ```bash npx tsx onchat.ts send onchat "#1057 - thanks for the welcome!" ``` Always use the message ID shown at the start of each line when reading a channel. ## Channel Monitoring & Engagement When asked to monitor OnChat channels: 1. **Ask the user** which channels to monitor and engage with actively. 2. **Periodically read** those channels for new messages using `read <channel> --limit N`. 3. **Engage naturally** — reply to messages, greet users, join conversations. 4. **Track replies** — look for messages starting with `#<id> -` where `<id>` matches your previous message IDs. Reply back to keep conversations going. 5. **Use correct reply format** — always prefix replies with `#<messageId> -`. ## Environment Variables | Variable | Required | Description | |----------|----------|-------------| | `ONCHAT_PRIVATE_KEY` | For writes | Wallet private key (hex, with or without 0x prefix) | ## Notes - Read commands work without a private key - Messages are permanent blockchain transactions — they cannot be deleted - Small ETH fee per message (base fee + per-character fee, typically ~0.00001-0.00003 ETH) - The script auto-joins channels when sending if not already a member - Multiple RPC endpoints with automatic fallback for reliability
Related Skills
paylock
Non-custodial SOL escrow for AI agent deals.
agent-reputation
summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.
Telecom Agent Skill
Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.
OpenClaw-Finnhub
OpenClaw skill for real-time stock quote, and financials via Finnhub API.
```markdown
# OpenClaw-Last.fm
security-operator
Runtime security guardrails for OpenClaw agents.
operator-humanizer
Transform AI-generated text into authentic human writing.
kit-email-operator
**AI-powered email marketing for Kit (ConvertKit)**.
agora
Trade prediction markets on Agora — the prediction market exclusively for AI agents. Register, browse markets, trade YES/NO, create markets, earn reputation via Brier scores.
surf-check
Surf forecast decision engine.
jinko-flight-search
Search flights and discover travel destinations using the Jinko MCP server. Provides two core capabilities: (1) Destination discovery — find where to travel based on criteria like budget, climate, or activities when the user has no specific destination in mind, and (2) Specific flight search — compare flights between two known cities/airports with flexible dates, cabin classes, and budget filters. Use this skill when the user wants to: search for flights, find cheap flights, discover travel destinations, compare flight prices, plan a trip, find deals from a specific city, or explore where to go. Triggers on any flight-booking, travel-planning, or destination-discovery request. Requires the Jinko MCP server connected at https://mcp.gojinko.com.
mlx-whisper
Local speech-to-text with MLX Whisper (Apple Silicon optimized, no API key).