nft-skill
Autonomous AI Artist Agent for generating, evolving, minting, listing, and promoting NFT art on the Base blockchain. Use when the user wants to create AI art, mint ERC-721 NFTs, list on marketplace, monitor on-chain sales, trigger artistic evolution, or announce drops on X/Twitter.
- License 许可
- MIT
- 最近更新
- 2026-05-17
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- nft-skill
- metadata
- { "author": "AI Artist", "license": "MIT", "version": "1.1.0", "openclaw": { "env": { "BASE_RPC_URL": "${BASE_RPC_URL}", "GROQ_API_KEY": "${GROQ_API_KEY}", "LLM_PROVIDER": "${LLM_PROVIDER}", "PINATA_SECRET": "${PINATA_SECRET}", "IMAGE_PROVIDER": "${IMAGE_PROVIDER}", "OPENAI_API_KEY": "${OPENAI_API_KEY}", "PINATA_API_KEY": "${PINATA_API_KEY}", "X_ACCESS_TOKEN": "${X_ACCESS_TOKEN}", "X_CONSUMER_KEY": "${X_CONSUMER_KEY}", "OLLAMA_BASE_URL": "${OLLAMA_BASE_URL}", "X_ACCESS_SECRET": "${X_ACCESS_SECRET}", "BASE_PRIVATE_KEY": "${BASE_PRIVATE_KEY}", "STABILITY_API_KEY": "${STABILITY_API_KEY}", "X_CONSUMER_SECRET": "${X_CONSUMER_SECRET}", "OPENROUTER_API_KEY": "${OPENROUTER_API_KEY}", "MARKETPLACE_ADDRESS": "${MARKETPLACE_ADDRESS}", "NFT_CONTRACT_ADDRESS": "${NFT_CONTRACT_ADDRESS}" }, "emoji": "🎨", "install": [ { "id": "npm-install", "bins": [ "node" ], "kind": "shell", "label": "Install NFT Skill dependencies", "command": "cd {baseDir} && npm install && npm run build" } ], "homepage": "https://github.com/Numba1ne/nft-skill", "requires": { "bins": [ "node", "npm" ] } } }
- description
- Autonomous AI Artist Agent for generating, evolving, minting, listing, and promoting NFT art on the Base blockchain. Use when the user wants to create AI art, mint ERC-721 NFTs, list on marketplace, monitor on-chain sales, trigger artistic evolution, or announce drops on X/Twitter.
02 资源文件 33
- 参考文档_meta.json301 B
- 其他.gitignore33 B
- 参考文档config/evolution-rules.json424 B
- 参考文档contracts/NFTArt.sol.txt1.6 KB
- 参考文档contracts/NFTMarketplace.sol.txt3.1 KB
- 参考文档env-example.txt1.7 KB
- 脚本hardhat.config.ts1.3 KB
- 脚本jest.config.js215 B
- 许可证LICENSE.txt1.0 KB
- 参考文档package-lock.json161.1 KB
- 参考文档package.json1.0 KB
- 参考文档README.md6.3 KB
- 脚本scripts/deploy.ts2.3 KB
- 脚本src/cli.ts4.8 KB
- 脚本src/index.ts283 B
- 脚本src/skills/evolve.ts7.6 KB
- 脚本src/skills/generateArt.ts10.3 KB
- 脚本src/skills/imageAI.ts2.8 KB
- 脚本src/skills/listNFT.ts3.5 KB
- 脚本src/skills/llm.ts3.2 KB
- 脚本src/skills/mintNFT.ts4.3 KB
- 脚本src/skills/monitorSales.ts3.2 KB
- 脚本src/skills/social.ts3.7 KB
- 脚本test/evolve.test.ts9.1 KB
- 脚本test/generateArt.test.ts6.8 KB
- 脚本test/integration.test.ts4.7 KB
- 脚本test/listNFT.test.ts5.3 KB
- 脚本test/llm.test.ts6.3 KB
- 脚本test/mintNFT.test.ts4.4 KB
- 脚本test/monitorSales.test.ts5.8 KB
- 脚本test/social.test.ts5.8 KB
- 脚本test/utils/mocks.ts5.1 KB
- 参考文档tsconfig.json337 B
03 SKILL.md 正文
NFT Skill for OpenClaw
Allows an OpenClaw agent to autonomously generate art, mint NFTs, list on marketplace, monitor sales, evolve based on milestones, and post social updates.
When to Use This Skill
- User asks to generate AI art or procedural digital art
- User wants to mint an NFT on Base
- User wants to list an NFT for sale on the marketplace
- User wants to monitor on-chain NFT sales
- User wants to evolve art style after a sales milestone
- User wants to tweet or announce a new NFT drop on X (Twitter)
- User mentions "NFT", "mint", "Base blockchain", "AI art", "digital art", or "marketplace listing"
Setup (First Run)
Before first use, ensure the project is built:
cd {baseDir} && npm install && npm run build
The user must populate a .env file with their keys:
cp {baseDir}/.env.example {baseDir}/.env
Required variables: BASE_RPC_URL, BASE_PRIVATE_KEY, NFT_CONTRACT_ADDRESS,
MARKETPLACE_ADDRESS, PINATA_API_KEY, PINATA_SECRET, LLM_PROVIDER.
To deploy contracts (one-time setup):
cd {baseDir} && npm run deploy:testnet # Base Sepolia testnet
cd {baseDir} && npm run deploy:mainnet # Base mainnet
Contract addresses are automatically written to .env after deployment.
Tools
All tools output JSON. The agent should look for the final line matching {"status":"success",...} or {"status":"error",...}.
1. generate — Generate Art
Generate new art and upload to IPFS.
cd {baseDir} && npm run cli -- generate --generation <number> --theme "<description>"
Parameters:
| Flag | Type | Required | Description |
|---|---|---|---|
-g, --generation |
number | yes | Generation number (determines evolution state) |
-t, --theme |
string | yes | Art theme description sent to LLM |
Output:
{"status": "success", "result": {"imagePath": "...", "metadata": {...}, "metadataUri": "Qm..."}}
Example:
cd {baseDir} && npm run cli -- generate --generation 1 --theme "neon cyberpunk city"
2. mint — Mint NFT
Mint a new ERC721 token on Base with an IPFS metadata URI.
cd {baseDir} && npm run cli -- mint --metadata-uri <uri>
Parameters:
| Flag | Type | Required | Description |
|---|---|---|---|
-m, --metadata-uri |
string | yes | IPFS metadata URI (e.g. Qm... or ipfs://Qm...) |
Output:
{"status": "success", "result": {"tokenId": "1", "txHash": "0x...", "blockNumber": 12345, "gasUsed": "80000"}}
Example:
cd {baseDir} && npm run cli -- mint --metadata-uri QmXyz123abc
3. list — List NFT on Marketplace
List a minted NFT for sale on the marketplace.
cd {baseDir} && npm run cli -- list --token-id <id> --price <eth>
Parameters:
| Flag | Type | Required | Description |
|---|---|---|---|
-i, --token-id |
string | yes | Token ID to list |
-p, --price |
string | yes | Listing price in ETH (e.g. "0.05") |
Output:
{"status": "success", "result": {"success": true, "price": "0.05", "txHash": "0x..."}}
Example:
cd {baseDir} && npm run cli -- list --token-id 1 --price 0.05
4. monitor — Monitor Sales
Watch for sales events in real-time. Streams JSON to stdout until interrupted (Ctrl+C).
cd {baseDir} && npm run cli -- monitor [--from-block <number>]
Parameters:
| Flag | Type | Required | Description |
|---|---|---|---|
-f, --from-block |
number | no | Replay missed sales from this block before live monitoring |
Output (per sale):
{"status": "sale", "result": {"buyer": "0x...", "tokenId": "1", "price": "0.05", "txHash": "0x...", "blockNumber": 12345}}
Example:
cd {baseDir} && npm run cli -- monitor --from-block 12000000
5. evolve — Evolve Agent
Trigger the evolution logic when sales milestones are met.
cd {baseDir} && npm run cli -- evolve --proceeds <eth> --generation <number> --trigger "<reason>"
Parameters:
| Flag | Type | Required | Description |
|---|---|---|---|
-p, --proceeds |
string | yes | Total ETH proceeds earned so far |
-g, --generation |
number | yes | Current generation number |
--trigger |
string | yes | Human-readable reason for evolution |
Output:
{"status": "success", "result": {"previousGeneration": 1, "newGeneration": 2, "improvements": [...], "newAbilities": [...]}}
Example:
cd {baseDir} && npm run cli -- evolve --proceeds "0.5" --generation 1 --trigger "Sold 3 NFTs"
6. tweet — Post to X
Post an update to X (Twitter).
cd {baseDir} && npm run cli -- tweet --content "<text>"
Parameters:
| Flag | Type | Required | Description |
|---|---|---|---|
-c, --content |
string | yes | Tweet text (auto-truncated to 280 chars) |
Output:
{"status": "success", "result": "tweet_id_string"}
Example:
cd {baseDir} && npm run cli -- tweet --content "New AI art drop incoming! #AIArt #Base"
Typical Workflow
A full autonomous cycle the agent should follow:
- Generate art with a theme → receive metadata URI
- Mint the NFT with that URI → receive token ID
- List the NFT on the marketplace at a price
- Tweet about the new listing
- Monitor sales for purchase events
- Evolve when a sales milestone is reached
- Repeat from step 1 with the new generation number
Error Handling
- If a command returns
{"status":"error",...}, read themessagefield and report it to the user. - Common issues: missing
.envvariables, insufficient wallet balance, network RPC errors. - For wallet balance issues, suggest the user funds their Base wallet.
- For missing env vars, remind the user to populate
{baseDir}/.env.
Environment Variables
| Variable | Required | Description |
|---|---|---|
BASE_RPC_URL |
yes | Base network RPC endpoint |
BASE_PRIVATE_KEY |
yes* | Wallet private key (or use PRIVATE_KEY_FILE) |
PRIVATE_KEY_FILE |
no | Path to file containing the private key (safer alternative to env var) |
NFT_CONTRACT_ADDRESS |
yes | Deployed NFTArt contract address |
MARKETPLACE_ADDRESS |
yes | Deployed NFTMarketplace contract address |
PINATA_API_KEY |
yes | Pinata IPFS API key |
PINATA_SECRET |
yes | Pinata IPFS secret |
LLM_PROVIDER |
yes | openrouter, groq, or ollama |
LLM_MODEL |
no | Model ID override |
OPENROUTER_API_KEY |
if LLM_PROVIDER=openrouter | OpenRouter API key |
GROQ_API_KEY |
if LLM_PROVIDER=groq | Groq API key |
OLLAMA_BASE_URL |
if LLM_PROVIDER=ollama | Ollama base URL |
IMAGE_PROVIDER |
no | stability, dalle, or procedural (default) |
IMAGE_MODEL |
no | Image model override |
STABILITY_API_KEY |
if IMAGE_PROVIDER=stability | Stability AI key |
OPENAI_API_KEY |
if IMAGE_PROVIDER=dalle | OpenAI key for DALL-E |
X_CONSUMER_KEY |
for tweet | X API consumer key |
X_CONSUMER_SECRET |
for tweet | X API consumer secret |
X_ACCESS_TOKEN |
for tweet | X access token |
X_ACCESS_SECRET |
for tweet | X access token secret |
BASESCAN_API_KEY |
no | For contract verification on Basescan |
04 同仓库更多 Skills
zvukogram
Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.
zohomail
Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-recruit
Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows. Use this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-people
Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave. Use this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-mail
Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-inventory
Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments. Use this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.