# K3 Blockchain Agent Skill

The K3 Blockchain Agent is a skill for Claude Code that turns your AI coding assistant into a full blockchain workflow builder. Describe what you want to automate in plain language — monitoring a wallet, tracking a DeFi pool, sending daily crypto reports — and Claude will build, deploy, and verify the workflow for you on K3.

No workflow builder UI required. No manual node configuration. Just describe what you want, and Claude handles the rest.

***

### What You Can Build <a href="#what-you-can-build" id="what-you-can-build"></a>

Any combination of data source, AI analysis, and delivery channel:

**Monitoring & Alerts**

* Alert me on Telegram when this wallet moves more than 10 ETH
* Notify me on Slack when a large swap happens on this Uniswap pool
* Watch this smart contract and alert me when a specific event fires

**Scheduled Reports**

* Send me a daily email with a summary of the top Uniswap V3 pools by volume
* Every morning, pull the latest metrics for my DeFi portfolio and email me a report
* Weekly recap of what's happening with this token — TVL, volume, price action

**Conversational Bots**

* Build a Telegram bot I can chat with to check wallet balances
* Create a bot that answers questions about any token's market data
* Telegram assistant that lets me query on-chain data by sending a message

**Data Collection**

* Track this pool's TVL daily and store the data in Google Sheets
* Collect hourly price data for these tokens and save to my database

**Automated Trading**

* Swap tokens on Uniswap when the price hits a target
* Rebalance my portfolio on a weekly schedule
* Transfer tokens automatically when a condition is met

***

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

**1. K3 MCP must be connected**

The skill requires the K3 MCP server to be active. If you haven't set it up yet, follow the [K3 MCP Server setup guide](/introduction/connect-your-ai-tool/k3-mcp-server.md) first — the steps vary by client.

**2. Skill must be installed**

See the Installation section below for your client.

***

### Installation <a href="#installation" id="installation"></a>

#### Claude Code <a href="#claude-code" id="claude-code"></a>

Copy the skill folder into your project's `.claude/skills/` directory:

```bash
mkdir -p .claude/skills
cp -r /path/to/k3-blockchain-agent .claude/skills/
```

The skill is automatically loaded when you open a Claude Code session in that project. No additional configuration is needed. Verify it's active by running `/mcp` to confirm the K3 server is connected.

***

#### OpenClaw <a href="#openclaw" id="openclaw"></a>

Copy the skill folder into your OpenClaw skills directory:

```bash
# Global (available to all agents)
mkdir -p ~/.openclaw/skills
cp -r /path/to/k3-blockchain-agent ~/.openclaw/skills/

# Or project-level (available in a specific workspace)
mkdir -p ./skills
cp -r /path/to/k3-blockchain-agent ./skills/
```

Then restart the Gateway so OpenClaw picks up the new skill:

```bash
openclaw gateway restart
```

Verify the skill is loaded:

```bash
openclaw skills list --eligible | grep k3
```

You should see `k3-blockchain-agent` in the output. The skill is now available to any agent in your OpenClaw config that has the K3 MCP connected.

***

### How to Use It <a href="#how-to-use-it" id="how-to-use-it"></a>

Once the skill and MCP are active, just describe what you want in plain language. Your assistant will ask any clarifying questions it needs, then build and deploy the workflow.

**Example prompts to get started:**

```
Send me a daily Telegram message with the top 5 Uniswap V3 pools by volume on Ethereum
```

```
Monitor wallet 0x... on Arbitrum and alert me on Telegram whenever it moves more than 5 ETH
```

```
Build a Telegram bot I can chat with to check token prices and wallet balances
```

```
Every morning, email me a report on the WETH/USDC pool — TVL, volume, fees, and any notable changes
```

```
Alert me on Slack if any swap over $500k happens on this pool: 0x...
```

Your assistant will work through the request with you, confirm the details, and then build the workflow. Expect a short back-and-forth — 2–4 rounds is normal before the workflow is ready to deploy.

#### Using with OpenClaw <a href="#using-with-openclaw" id="using-with-openclaw"></a>

With OpenClaw, you interact through your connected messaging app (Telegram, Discord, WhatsApp, etc.) rather than a terminal. Send the same natural language requests directly to your OpenClaw bot:

> *"Set up a daily DeFi report for me — WETH/USDC pool on Uniswap V3, email me every morning"*

OpenClaw will use the K3 skill to build and deploy the workflow, then confirm when it's live. You can manage and iterate on workflows entirely from within the chat, without opening a terminal.

***

### What Happens Under the Hood <a href="#what-happens-under-the-hood" id="what-happens-under-the-hood"></a>

Your assistant uses the K3 MCP tools to orchestrate everything:

1. **Understands your request** — identifies the data source, schedule, analysis, and delivery channel
2. **Finds the right data** — checks your team's connected integrations, searches for relevant APIs or subgraphs, and tests the data before building
3. **Builds the workflow** — calls `generateWorkflow` with a detailed prompt describing exactly what to build
4. **Reviews and refines** — iterates with the orchestrator via `editGeneratedWorkflow` until the config is correct
5. **Deploys and verifies** — deploys the workflow, runs a manual test, and confirms the full chain worked

***

### Workflow Building Blocks <a href="#workflow-building-blocks" id="workflow-building-blocks"></a>

Understanding what's available helps you ask for more specific things.

#### Triggers — what starts the workflow <a href="#triggers--what-starts-the-workflow" id="triggers--what-starts-the-workflow"></a>

| Trigger                  | When to use                                                      |
| ------------------------ | ---------------------------------------------------------------- |
| **Scheduled**            | Daily digests, hourly monitors, periodic reports                 |
| **Smart Contract Event** | React to swaps, transfers, mints, liquidations, governance votes |
| **Wallet Activity**      | Whale watching, portfolio alerts, incoming payment detection     |
| **Telegram Chatbot**     | Conversational AI bot — responds to messages from users          |
| **On-Demand / Manual**   | Ad-hoc queries, tools you run when you want                      |

#### Data Sources — where the workflow gets its data <a href="#data-sources--where-the-workflow-gets-its-data" id="data-sources--where-the-workflow-gets-its-data"></a>

| Source                  | What it fetches                                          |
| ----------------------- | -------------------------------------------------------- |
| **Read Market Data**    | Token prices, volume, market cap                         |
| **Read Wallet**         | Balances, token holdings, transaction history            |
| **Read Smart Contract** | On-chain contract state, pool reserves, interest rates   |
| **Read Graph**          | DeFi metrics from TheGraph subgraphs (TVL, volume, fees) |
| **Read NFT**            | Collection data, floor prices, traits, holders           |
| **Read API**            | Any REST or GraphQL API                                  |
| **AI Web Scraper**      | Structured data extracted from any web page              |
| **AI Agent with tools** | AI that decides what to fetch and calls multiple sources |

#### AI Functions — how the workflow thinks <a href="#ai-functions--how-the-workflow-thinks" id="ai-functions--how-the-workflow-thinks"></a>

| Function           | What it does                                            |
| ------------------ | ------------------------------------------------------- |
| **AI Service**     | Summarizes, analyzes, or formats data                   |
| **AI Agent**       | Autonomous reasoning with tool access for complex tasks |
| **AI Conditional** | Branches workflow logic based on AI judgment            |

#### Delivery & Actions — what the workflow does with results <a href="#delivery--actions--what-the-workflow-does-with-results" id="delivery--actions--what-the-workflow-does-with-results"></a>

| Output                             | Use case                                       |
| ---------------------------------- | ---------------------------------------------- |
| **Email**                          | Reports, daily digests, alert emails           |
| **Telegram**                       | Instant alerts, bot replies, real-time updates |
| **Slack**                          | Team notifications, shared monitoring          |
| **Google Sheets / API**            | Data collection, dashboards, external systems  |
| **Uniswap / Coinbase / Kyberswap** | Automated trading and swaps                    |
| **Token Transfer**                 | Automated payments and treasury management     |
| **Write Smart Contract**           | On-chain actions triggered by workflow logic   |

***

### Example Workflows <a href="#example-workflows" id="example-workflows"></a>

#### Daily DeFi Pool Report <a href="#daily-defi-pool-report" id="daily-defi-pool-report"></a>

*"Send me a daily email with metrics for the WETH/USDC pool on Uniswap V3"*

```
[Daily schedule] → [Read Graph: query Uniswap V3 subgraph] → [AI Service: summarize TVL, volume, fees, highlight changes] → [Email]
```

***

#### Whale Wallet Alert <a href="#whale-wallet-alert" id="whale-wallet-alert"></a>

*"Alert me on Telegram when wallet 0x... moves more than 10 ETH"*

```
[Wallet Activity trigger] → [Read Wallet: get transaction details] → [AI Conditional: check if amount > 10 ETH] → [Telegram alert]
```

***

#### Telegram On-Chain Assistant <a href="#telegram-on-chain-assistant" id="telegram-on-chain-assistant"></a>

*"Build a Telegram bot I can ask about token prices and wallet balances"*

```
[Telegram Chatbot trigger] → [AI Agent with tools: CoinGecko + Read Wallet] → [Telegram reply]
```

***

#### Multi-Protocol Yield Comparison <a href="#multi-protocol-yield-comparison" id="multi-protocol-yield-comparison"></a>

*"Every Monday, compare yields across Uniswap, Aave, and Curve and email me the best opportunities"*

```
[Weekly schedule] → [Read Graph: Uniswap pools] → [Read API: Aave rates] → [Read API: Curve pools] → [AI Service: compare and rank] → [Email]
```

***

### Tips for Best Results <a href="#tips-for-best-results" id="tips-for-best-results"></a>

**Be specific about delivery.** Tell your assistant exactly where you want results — email address, Telegram bot name, Slack channel. It won't guess.

**Name the protocol and chain.** "Uniswap V3 on Arbitrum" is better than "Uniswap". Pool addresses and contract addresses are chain-specific — include them if you have them.

**Describe the analysis you want.** "Summarize the pool" is vague. "Flag any TVL change over 5% and compare volume to the 7-day average" gives the assistant something concrete to work with.

**For trading workflows, review carefully.** Automated trading involves real funds. Your assistant will explain exactly what conditions trigger what actions before deploying — read this carefully.

**Iterate freely.** The workflow builder is conversational. If the first version isn't quite right, just say what to change. There's no need to start over.

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

**"K3 MCP isn't connected" (Claude Code)**

Run `/mcp` to check which servers are connected. If K3 isn't listed, follow the [K3 MCP Server setup guide](/introduction/connect-your-ai-tool/k3-mcp-server.md).

**"K3 MCP isn't connected" (OpenClaw)**

Check that the K3 MCP is configured in your `~/.openclaw/openclaw.json` under the `mcpServers` block for the relevant agent, and that you've run `openclaw gateway restart`. See the [K3 MCP Server setup guide](/introduction/connect-your-ai-tool/k3-mcp-server.md) for the full config.

**Skill not found in OpenClaw**

Run `openclaw skills list --eligible | grep k3`. If it doesn't appear, confirm the skill folder is in `~/.openclaw/skills/` or `<workspace>/skills/` and that it contains a `SKILL.md` file. Restart the gateway after adding it.

**Workflow deployed but data is empty**

The most common cause is a wrong API endpoint, subgraph URL, or contract address. These are chain-specific — the same pool has a different address on Ethereum vs. Arbitrum. Tell your assistant what you expected to see and it will investigate and fix.

**AI analysis is too generic**

Add more detail to your request. Instead of "analyze the pool", say "highlight any TVL change over 5%, compare this week's volume to last week, and flag any unusual fee spikes." The more specific your intent, the better the analysis.

**Telegram or email notification didn't arrive**

Check that the integration is connected in K3 (**Integrations** in the left sidebar). For Telegram, also verify the bot token and chat ID. For email, check your spam folder.

**Scheduled workflow stopped running**

Ask your assistant to check the workflow status — it will call `getWorkflowById` and `getWorkflowRuns` to diagnose whether it's paused or erroring.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.k3-labs.com/introduction/connect-your-ai-tool/k3-blockchain-agent-skill.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
