Xspoonai official dao proposal starter

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official dao proposal starter is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Create fully functional DAO governance proposals with function call encoding, multi-action support, and DAO-type-specific voting parameters. Encodes contract function calls with keccak256 hashing, val

How to use this skill

Skill file

Description

Create fully functional DAO governance proposals with function call encoding, multi-action support, and DAO-type-specific voting parameters. Encodes contract function calls with keccak256 hashing, validates addresses, and calculates voting timelines based on governance model.

Inputs

{
  "title": "Proposal title (min 5 chars)",
  "description": "Detailed proposal description (min 20 chars)",
  "targets": ["0xcontract1", "0xcontract2"],
  "functions": ["setFee(uint256)", "transferFunds(address,uint256)"],
  "params": [[50000000000000000], ["0xrecipient", 1000000000000000000]],
  "values": [0, 0],
  "dao_type": "compound|aave|uniswap|generic",
  "proposer": "0xproposer_address (optional)",
  "voting_power": 1000000
}

Outputs

{
  "success": true,
  "proposal": {
    "id": "0x7a2c...",
    "title": "Increase Protocol Fee to 0.05%",
    "description": "This proposal increases the protocol fee...",
    "targets": ["0x1234567890123456789012345678901234567890"],
    "functions": ["setFee(uint256)"],
    "calldatas": ["0x69d4..."],
    "values": [0],
    "voting_delay": 1,
    "voting_period": 13140,
    "proposal_threshold": 65000,
    "quorum_votes": 400000,
    "proposer": "0xproposer...",
    "for_votes": 0,
    "against_votes": 0,
    "abstain_votes": 0,
    "created_at": "2026-02-06T10:30:45.123456+00:00",
    "voting_starts": "2026-02-07T10:30:45.123456+00:00",
    "voting_ends": "2026-03-20T10:30:45.123456+00:00",
    "execution_eta": "2026-03-23T10:30:45.123456+00:00",
    "cancelled": false,
    "executed": false
  }
}

Usage

Create Compound DAO Proposal

echo '{
  "title": "Increase Protocol Fee to 0.05%",
  "description": "This proposal increases the protocol fee from 0.03% to 0.05% to enhance treasury sustainability.",
  "targets": ["0x1234567890123456789012345678901234567890"],
  "functions": ["setFee(uint256)"],
  "params": [[50000000000000000]],
  "values": [0],
  "dao_type": "compound"
}' | python3 scripts/main.py

Create Multi-Action Aave Proposal

echo '{
  "title": "Update Risk Parameters",
  "description": "Proposal to update collateral and risk parameters across multiple assets.",
  "targets": ["0xaaaa...", "0xbbbb..."],
  "functions": ["setCollateralFactor(address,uint256)", "setReserveFactor(address,uint256)"],
  "params": [["0xtoken1", 750000000000000000], ["0xtoken2", 100000000000000000]],
  "values": [0, 0],
  "dao_type": "aave"
}' | python3 scripts/main.py

Examples

Example 1: Single Action Compound Proposal

$ python3 scripts/main.py < input.json
{
  "success": true,
  "proposal": {
    "id": "0x7a2c8f9e1b4d...",
    "title": "Increase Protocol Fee to 0.05%",
    "targets": ["0x1234567890123456789012345678901234567890"],
    "functions": ["setFee(uint256)"],
    "calldatas": ["0x69d427e0000000000000000000000000000000000000000000000b1a2bc2ec50000"],
    "voting_period": 13140,
    "voting_delay": 1,
    "quorum_votes": 400000,
    "proposer": "0x1111111111111111111111111111111111111111",
    "voting_starts": "2026-02-07T10:30:45+00:00",
    "voting_ends": "2026-03-20T10:30:45+00:00"
  }
}

Example 2: Multi-Action Aave Proposal with Different Voting Period

$ python3 scripts/main.py < aave_proposal.json
{
  "success": true,
  "proposal": {
    "id": "0x9f8e7d6c5b4a...",
    "title": "Update Risk Parameters",
    "targets": ["0xaaaa...", "0xbbbb..."],
    "functions": ["setCollateralFactor(address,uint256)", "setReserveFactor(address,uint256)"],
    "calldatas": ["0xaabbcc11...", "0xddeeff22..."],
    "voting_period": 80000,
    "voting_delay": 1,
    "quorum_votes": 320000,
    "proposer": "0x2222222222222222222222222222222222222222",
    "voting_starts": "2026-02-07T10:30:45+00:00",
    "voting_ends": "2026-03-27T10:30:45+00:00"
  }
}

Error Handling

Validation Error

{
  "ok": false,
  "error": "validation_error",
  "details": {
    "field": "title",
    "message": "Title must be at least 5 characters long"
  }
}

Invalid Address

{
  "ok": false,
  "error": "validation_error",
  "details": {
    "field": "targets",
    "message": "Invalid Ethereum address format: 0xinvalid"
  }
}

Function Encoding Error

{
  "ok": false,
  "error": "system_error",
  "details": {
    "message": "Array length mismatch: 2 targets but 3 functions provided"
  }
}

Features

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.