Install
openclaw skills install nft-skillAutonomous 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.
openclaw skills install nft-skillAllows an OpenClaw agent to autonomously generate art, mint NFTs, list on marketplace, monitor sales, evolve based on milestones, and post social updates.
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.
All tools output JSON. The agent should look for the final line matching {"status":"success",...} or {"status":"error",...}.
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"
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
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
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
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"
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"
A full autonomous cycle the agent should follow:
{"status":"error",...}, read the message field and report it to the user..env variables, insufficient wallet balance, network RPC errors.{baseDir}/.env.| 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 |