自然语言构建链上数据自动化工作流
简介
将自然语言指令转化为自动化区块链分析工作流,支持链上数据抓取、AI智能分析及多渠道报告推送,实现DeFi监控、钱包追踪等场景的零代码自动化。
原始描述
Build automated blockchain analysis workflows on K3 — from natural language requests to deployed, running automations that fetch on-chain data, analyze it wi...
通过你的 Agent 添加
安装目录:k3-blockhain-agent-skill/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
K3 Blockchain Agent 是一个面向区块链数据自动化的工作流构建技能。用户通过自然语言描述需求(如"每日推送 WETH/USDC 池的 TVL 变化"),系统自动生成、部署并运行完整的工作流。核心流程遵循 UNDERSTAND → FIND DATA → TEST → BUILD → DEPLOY 五步闭环。
关键操作能力
阶段
核心动作
需求理解
解析数据目标、协议、链、调度频率、分析类型、交付方式等 8 大参数
数据源发现
调用 listTeamMcpServerIntegrations() 探测团队已集成的 MCP 数据源(TheGraph、CoinGecko 等)
数据测试
先构建最小化测试工作流,验证数据返回后再完整构建,避免空数据部署
工作流构建
通过 generateWorkflow() 提交详细配置,经多轮 editGeneratedWorkflow() 对话精调
部署验证
手动触发 executeWorkflow(),用 getWorkflowRunById() 核验数据→分析→通知全链路
数据获取能力
| 阶段 | 核心动作 |
|---|---|
| 需求理解 | 解析数据目标、协议、链、调度频率、分析类型、交付方式等 8 大参数 |
| 数据源发现 | 调用 listTeamMcpServerIntegrations() 探测团队已集成的 MCP 数据源(TheGraph、CoinGecko 等) |
| 数据测试 | 先构建最小化测试工作流,验证数据返回后再完整构建,避免空数据部署 |
| 工作流构建 | 通过 generateWorkflow() 提交详细配置,经多轮 editGeneratedWorkflow() 对话精调 |
| 部署验证 | 手动触发 executeWorkflow(),用 getWorkflowRunById() 核验数据→分析→通知全链路 |
内置 8 类数据函数:Read API(任意 REST/GraphQL)、Read Smart Contract(直接链上查询)、Read Market Data(代币价格/市值)、Read Wallet(钱包余额/交易历史)、Read NFT(地板价/持有者)、Read Graph(TheGraph 子图查询)、Read Deployment(自有部署代码输出)、AI Web Scraper(网页结构化提取)。
典型应用场景
- DeFi 协议监控(TVL、交易量、费率变化)
- 钱包活动追踪(大额转账、异常交互预警)
- 代币价格与流动性池分析
- NFT 藏品地板价与持有分布追踪
- 智能合约事件监听与自动化响应
显著优点
- 自然语言转自动化:零代码将口语化需求转为可运行系统,降低区块链分析门槛
- 多源数据融合:支持链上合约、子图索引、市场 API、网页抓取等多渠道数据整合
- AI 驱动分析:内置 AI 节点可对原始数据进行异常检测、趋势总结、交易信号生成
- 灵活交付渠道:支持 Email、Telegram、Slack、Google Sheets 等多种通知方式
- 可扩展架构:通过 MCP 机制接入团队自定义数据源,每个团队的集成能力可差异化配置
- 测试优先设计:强制要求先验证数据源有效性,减少无效部署
潜在缺点与局限性
- 依赖外部 MCP 连接:必须预先配置 K3 Development MCP,否则无法调用核心工具
- 多轮对话开销:复杂工作流需 2-4 轮
editGeneratedWorkflow 交互,无法一键生成
- 数据源可靠性差异:不同协议 API/子图质量参差不齐,需人工评估和维护
- 链上查询成本:高频读取智能合约可能产生 Gas 或节点调用费用
- 无内置回滚机制:工作流部署后若逻辑有误,需手动编辑修复而非自动回滚
- 上下文窗口限制:工具调用需避免批量 dump 大量响应,复杂查询需分步处理
适合人群
- DeFi 研究员与分析师:需要自动化采集多协议数据并生成定期报告
- 交易团队:希望构建自定义监控预警系统(钱包追踪、价格异动)
- 项目运营方:需向社区或投资人推送协议数据仪表板
- 开发者:希望通过低代码方式快速验证链上数据自动化想法
- 风控与合规团队:监控可疑钱包活动或协议异常事件
常规风险
风险类别
具体描述
缓解建议
数据准确性风险
子图索引延迟、API 数据错误可能导致分析结论偏差
多源交叉验证,设置数据新鲜度检查
密钥与权限泄露
工作流中可能配置 API Key、私钥等敏感信息
使用 MCP 集成而非硬编码,定期轮换凭证
自动化执行风险
误配置可能导致意外交易执行或资金操作
沙箱环境充分测试,生产环境启用人工确认节点
服务可用性依赖
依赖 TheGraph、CoinGecko 等第三方服务稳定性
设计降级策略,主源失效时切换备用源
合规与隐私
钱包追踪可能涉及敏感地址监控,存在法律边界问题
明确告知用户用途,遵守当地数据保护法规
来源与可信度说明
- 自然语言转自动化:零代码将口语化需求转为可运行系统,降低区块链分析门槛
- 多源数据融合:支持链上合约、子图索引、市场 API、网页抓取等多渠道数据整合
- AI 驱动分析:内置 AI 节点可对原始数据进行异常检测、趋势总结、交易信号生成
- 灵活交付渠道:支持 Email、Telegram、Slack、Google Sheets 等多种通知方式
- 可扩展架构:通过 MCP 机制接入团队自定义数据源,每个团队的集成能力可差异化配置
- 测试优先设计:强制要求先验证数据源有效性,减少无效部署
潜在缺点与局限性
- 依赖外部 MCP 连接:必须预先配置 K3 Development MCP,否则无法调用核心工具
- 多轮对话开销:复杂工作流需 2-4 轮
editGeneratedWorkflow 交互,无法一键生成
- 数据源可靠性差异:不同协议 API/子图质量参差不齐,需人工评估和维护
- 链上查询成本:高频读取智能合约可能产生 Gas 或节点调用费用
- 无内置回滚机制:工作流部署后若逻辑有误,需手动编辑修复而非自动回滚
- 上下文窗口限制:工具调用需避免批量 dump 大量响应,复杂查询需分步处理
适合人群
- DeFi 研究员与分析师:需要自动化采集多协议数据并生成定期报告
- 交易团队:希望构建自定义监控预警系统(钱包追踪、价格异动)
- 项目运营方:需向社区或投资人推送协议数据仪表板
- 开发者:希望通过低代码方式快速验证链上数据自动化想法
- 风控与合规团队:监控可疑钱包活动或协议异常事件
常规风险
风险类别
具体描述
缓解建议
数据准确性风险
子图索引延迟、API 数据错误可能导致分析结论偏差
多源交叉验证,设置数据新鲜度检查
密钥与权限泄露
工作流中可能配置 API Key、私钥等敏感信息
使用 MCP 集成而非硬编码,定期轮换凭证
自动化执行风险
误配置可能导致意外交易执行或资金操作
沙箱环境充分测试,生产环境启用人工确认节点
服务可用性依赖
依赖 TheGraph、CoinGecko 等第三方服务稳定性
设计降级策略,主源失效时切换备用源
合规与隐私
钱包追踪可能涉及敏感地址监控,存在法律边界问题
明确告知用户用途,遵守当地数据保护法规
来源与可信度说明
editGeneratedWorkflow 交互,无法一键生成- DeFi 研究员与分析师:需要自动化采集多协议数据并生成定期报告
- 交易团队:希望构建自定义监控预警系统(钱包追踪、价格异动)
- 项目运营方:需向社区或投资人推送协议数据仪表板
- 开发者:希望通过低代码方式快速验证链上数据自动化想法
- 风控与合规团队:监控可疑钱包活动或协议异常事件
常规风险
风险类别
具体描述
缓解建议
数据准确性风险
子图索引延迟、API 数据错误可能导致分析结论偏差
多源交叉验证,设置数据新鲜度检查
密钥与权限泄露
工作流中可能配置 API Key、私钥等敏感信息
使用 MCP 集成而非硬编码,定期轮换凭证
自动化执行风险
误配置可能导致意外交易执行或资金操作
沙箱环境充分测试,生产环境启用人工确认节点
服务可用性依赖
依赖 TheGraph、CoinGecko 等第三方服务稳定性
设计降级策略,主源失效时切换备用源
合规与隐私
钱包追踪可能涉及敏感地址监控,存在法律边界问题
明确告知用户用途,遵守当地数据保护法规
来源与可信度说明
| 风险类别 | 具体描述 | 缓解建议 |
|---|---|---|
| 数据准确性风险 | 子图索引延迟、API 数据错误可能导致分析结论偏差 | 多源交叉验证,设置数据新鲜度检查 |
| 密钥与权限泄露 | 工作流中可能配置 API Key、私钥等敏感信息 | 使用 MCP 集成而非硬编码,定期轮换凭证 |
| 自动化执行风险 | 误配置可能导致意外交易执行或资金操作 | 沙箱环境充分测试,生产环境启用人工确认节点 |
| 服务可用性依赖 | 依赖 TheGraph、CoinGecko 等第三方服务稳定性 | 设计降级策略,主源失效时切换备用源 |
| 合规与隐私 | 钱包追踪可能涉及敏感地址监控,存在法律边界问题 | 明确告知用户用途,遵守当地数据保护法规 |
本技能基于 K3 官方 MCP 文档生成,技术细节来源于 node-types.md、data-sources.md 等参考手册。因附带的《安全认证报告》为系统自动生成的占位文本(明确标注"未执行安全扫描"),实际安全等级需以真实扫描结果为准。建议用户在处理资金相关工作流前,进行独立的安全审计。
技能正文
name: k3-blockchain-agent
description: >
Build automated blockchain analysis workflows on K3 — from natural language
requests to deployed, running automations that fetch on-chain data, analyze it
with AI, and deliver insights via email, Telegram, or Slack. Use this skill
whenever the user mentions blockchain workflows, on-chain analytics, DeFi
monitoring, token tracking, wallet alerts, pool analysis, protocol dashboards,
NFT tracking, automated trading, smart contract monitoring, or wants to automate
anything involving blockchain data. Also trigger when the user mentions K3,
workflow builder, or wants scheduled crypto/DeFi reports. Even if they just say
"monitor this wallet" or "track this token" — this skill applies.
K3 Blockchain Agent
Transform requests like "Send me daily updates about the WETH/USDC pool on Uniswap" into fully deployed workflows that fetch data, run AI analysis, and deliver reports automatically.
Setup
This skill requires the K3 Development MCP to be connected. The MCP provides
tools like generateWorkflow, executeWorkflow, findAgentByFunctionality, and
others that let you create and manage blockchain workflows programmatically.
If the K3 MCP isn't connected yet, tell the user they need to add it before
proceeding. Once connected, verify by calling listTeamMcpServerIntegrations() —
this confirms the connection and shows what data source integrations (TheGraph,
CoinGecko, etc.) the user's team has wired up. Every team's integrations will be
different — discover what's available rather than assuming.
How Workflow Building Works
The K3 orchestrator is conversational. You describe what you want in plain language, and the orchestrator asks clarifying questions, then builds and deploys the workflow. Your job is to show up with the right information so the conversation is productive.
The loop:
UNDERSTAND → what does the user actually want?
FIND DATA → how do we get that information into the workflow?
TEST → does the data actually come back correctly?
BUILD → give the orchestrator everything it needs
DEPLOY → launch it and verify it works
Skipping "test" is the most common mistake — you end up with a deployed workflow that returns empty data.
Step 1: Understand the Request
When a user asks for a workflow, figure out these parameters. Ask if anything is unclear — don't guess on addresses or emails.
| Parameter | What to find out | Examples |
|---|---|---|
| Data target | What blockchain data do they need? | pool metrics, token price, wallet balance, NFT data |
| Protocol | Which DeFi protocol or chain feature? | Uniswap, Aave, SushiSwap, native transfers |
| Chain | Which blockchain? | Ethereum, Arbitrum, Polygon, Base, Stellar |
| Schedule | How often / what triggers it? | daily, hourly, on-demand, on wallet activity, on contract event, Telegram chatbot |
| Analysis | What kind of insights? | performance summary, anomaly alerts, trend report, trade signal |
| Delivery | How should results arrive? | email, Telegram, Slack, Google Sheets |
| Actions | Should the workflow do anything? | execute a swap, transfer tokens, write to a contract |
| Specifics | Any addresses or IDs? | pool address, token contract, wallet address |
If the user is new to DeFi, briefly explain relevant concepts as you go (what TVL means, what a liquidity pool is, etc.). Don't assume they know the jargon.
Step 2: Find the Right Data
This is the critical step. K3 has many ways to get data into a workflow, and you need to figure out which approach works for the user's specific request.
K3 data functions
These are the built-in functions for getting data into a workflow. Read
references/node-types.md for full details on each.
| Function | What it does |
|---|---|
| Read API | Call any REST/GraphQL API — the most flexible option |
| Read Smart Contract | Query any smart contract directly on-chain |
| Read Market Data | Get token prices, volumes, market metrics |
| Read Wallet | Wallet balances, transfers, transaction history |
| Read NFT | NFT collections, floor prices, traits, holders |
| Read Graph | Query TheGraph subgraphs with custom GraphQL |
| Read Deployment | Pull output from your own deployed code on K3 |
| AI Web Scraper | Extract structured data from any web page |
| AI Agent with tools | AI that dynamically decides what to fetch |
How to find the data you need
The goal is to figure out the best way to get the specific data the user wants. Think of it as problem-solving — there are multiple valid approaches and you should explore them:
-
Check what the team already has — call
listTeamMcpServerIntegrations()to see what MCP data sources are connected. If they have TheGraph, CoinGecko, or other integrations set up, those are the easiest path. -
Search for existing templates — call
findAgentByFunctionality()with the user's intent. If someone already built a similar workflow, use it as a starting point. -
Think about which K3 function fits:
- Need on-chain contract data? → Read Smart Contract can query it directly
- Need token prices or market data? → Read Market Data has it built in
- Need complex DeFi metrics (TVL, volume, fees)? → Read Graph with the right subgraph, or Read API to a protocol's analytics endpoint
- Need wallet info? → Read Wallet for balances and history
- Need NFT data? → Read NFT for collections and metadata
- Need data from any public API? → Read API can call anything
- Need to scrape a website? → AI Web Scraper can extract and structure it
-
Search the web for the right endpoint. If you need a specific protocol's data, look up
{protocol name} API,{protocol name} subgraph, or{protocol name} GraphQL endpoint. Many protocols publish public APIs and subgraphs. -
Ask the user — they may know the API endpoint, have an API key, or know exactly which smart contract to read from.
The key insight: there's rarely just one way to get the data. A Uniswap pool's TVL could come from Read Graph (subgraph query), Read API (calling an analytics endpoint), or even Read Smart Contract (reading the pool contract directly). Pick whichever is most reliable and gives you the data format you need.
Test before you build
Before constructing the full workflow, verify the data source actually returns what you expect:
1. Create a minimal test workflow with generateWorkflow()
— just a trigger + one data fetch step, nothing else
2. Deploy and run it with executeWorkflow()
3. Check the output with getWorkflowRunById() (set includeWorkflowData: true)
4. If the data looks right → proceed to full build
5. If empty or wrong → try a different approach and test again
This saves a lot of debugging later. A deployed workflow with bad data is worse than no workflow.
Step 3: Build the Workflow
Now give the K3 orchestrator everything it needs. Use generateWorkflow() with
a detailed prompt that includes:
- Trigger type and schedule (e.g., "runs daily" or "triggers on wallet activity")
- Data source and how to query it (e.g., "use Read Graph to query pool X" or "use Read Smart Contract to get the pair's reserves")
- What the AI should analyze (e.g., "highlight TVL changes over 5%")
- Any actions to take (e.g., "execute a swap on Uniswap if condition is met")
- How to deliver results (e.g., "send Telegram alert" or "email the report")
- Any MCP integration IDs the orchestrator needs (from team integrations)
Set deployWorkflow: false on the first call so you can review before deploying.
The orchestrator will likely ask follow-up questions — answer them using
editGeneratedWorkflow() with the same generatedWorkflowId. This back-and-forth
is normal; expect 2-4 rounds.
Once the configuration looks correct, call editGeneratedWorkflow() one final time
with deployWorkflow: true.
For the full list of available functions, triggers, AI models, and output options,
read references/node-types.md.
Step 4: Deploy and Verify
After deploying:
- Run it manually with
executeWorkflow()to trigger an immediate test - Check the run with
getWorkflowRuns()orgetWorkflowRunById() - Verify the full chain: Did data fetch? Did AI analyze? Did notification send?
If something failed, use editGeneratedWorkflow() to fix it — you don't need to
start over. See references/troubleshooting.md for common issues.
Tell the user what happened: "Your workflow is live and will run daily. I just ran a test — here's what the first report looks like: [summary]."
K3 MCP Tool Reference
Tool
What it does
generateWorkflow
Start building a workflow from natural language
editGeneratedWorkflow
Continue the conversation with the orchestrator
executeWorkflow
Run a workflow manually
getWorkflowById
Get workflow details and config
getWorkflowRuns
List execution history
getWorkflowRunById
Get a specific run's details and output
updateWorkflow
Pause/unpause a scheduled workflow
findAgentByFunctionality
Search for existing workflow templates
listAgentTemplates
Browse all available templates
getAgentTemplateById
Get details on a specific template
listTeamMcpServerIntegrations
See what data sources the team has connected
listMcpServerIntegrations
Browse all available MCP data sources
Important Rules
- Always test data sources before building the full workflow. A quick test
fetch saves a lot of debugging time.
- The orchestrator is conversational — expect multiple rounds of back-and-forth
via
editGeneratedWorkflow. That's how it's designed to work.
- Ask the user for anything you can't look up — never guess email addresses,
Telegram handles, or wallet addresses.
- Discover team integrations — call
listTeamMcpServerIntegrations() to see
what's available. Every team is different.
- Verify workflows work before telling the user it's done. Run it, check the
output, confirm delivery.
- Be mindful of context — don't call many K3 MCP tools at once or dump large
responses. Fetch what you need, check it, move on.
- Use web search to find API endpoints, subgraph URLs, and smart contract
addresses when you don't know them. The web is your research tool.
Going Deeper
references/node-types.md — All trigger types, data functions, AI functions,
DeFi/trading actions, and notification options
references/data-sources.md — How to discover and evaluate data sources for
different blockchain data needs
references/workflow-patterns.md — Common workflow architectures and when to
use each one
references/troubleshooting.md — Diagnosing and fixing common workflow issues
| Tool | What it does |
|---|---|
generateWorkflow |
Start building a workflow from natural language |
editGeneratedWorkflow |
Continue the conversation with the orchestrator |
executeWorkflow |
Run a workflow manually |
getWorkflowById |
Get workflow details and config |
getWorkflowRuns |
List execution history |
getWorkflowRunById |
Get a specific run's details and output |
updateWorkflow |
Pause/unpause a scheduled workflow |
findAgentByFunctionality |
Search for existing workflow templates |
listAgentTemplates |
Browse all available templates |
getAgentTemplateById |
Get details on a specific template |
listTeamMcpServerIntegrations |
See what data sources the team has connected |
listMcpServerIntegrations |
Browse all available MCP data sources |
- Always test data sources before building the full workflow. A quick test fetch saves a lot of debugging time.
- The orchestrator is conversational — expect multiple rounds of back-and-forth
via
editGeneratedWorkflow. That's how it's designed to work. - Ask the user for anything you can't look up — never guess email addresses, Telegram handles, or wallet addresses.
- Discover team integrations — call
listTeamMcpServerIntegrations()to see what's available. Every team is different. - Verify workflows work before telling the user it's done. Run it, check the output, confirm delivery.
- Be mindful of context — don't call many K3 MCP tools at once or dump large responses. Fetch what you need, check it, move on.
- Use web search to find API endpoints, subgraph URLs, and smart contract addresses when you don't know them. The web is your research tool.
Going Deeper
references/node-types.md — All trigger types, data functions, AI functions,
DeFi/trading actions, and notification options
references/data-sources.md — How to discover and evaluate data sources for
different blockchain data needs
references/workflow-patterns.md — Common workflow architectures and when to
use each one
references/troubleshooting.md — Diagnosing and fixing common workflow issues
references/node-types.md — All trigger types, data functions, AI functions,
DeFi/trading actions, and notification optionsreferences/data-sources.md — How to discover and evaluate data sources for
different blockchain data needsreferences/workflow-patterns.md — Common workflow architectures and when to
use each onereferences/troubleshooting.md — Diagnosing and fixing common workflow issues正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。