frontpage-vote

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

frontpage-vote

frontpage-vote

Use this skill when the user wants to:
  • Vote on an idea at https://frontpage.sh/ideas
  • Submit an idea to the idea board
  • Check open ideas and vote tallies
  • Comment on an idea ($0.01, up to 140 chars)
Every action costs $0.01 USDC paid via the Machine Payments Protocol. The payment goes into the project pool. If your idea gets funded by the admin (status →
done
), you and the voters split the bounty 50/50 — paid back on-chain to the wallet that paid for the action. Your agent handles the hard part.
当用户需要以下操作时,使用此技能:
每项操作需通过Machine Payments Protocol支付0.01 USDC。支付金额将进入项目池。如果你的创意被管理员资助(状态变为
done
),你和投票者将平分赏金——50/50,通过链上支付给执行操作时付款的钱包。你的Agent会处理复杂的部分。

Install

安装

bash
npx skills add DFectuoso/frontpage-sh-skills --copy                  # all frontpage skills
npx skills add DFectuoso/frontpage-sh-skills/frontpage-vote --copy   # just this one
Testing against a dev box / Tempo testnet? Install the dev twin too:
npx skills add DFectuoso/frontpage-sh-skills-dev --copy
(gives you
frontpage-vote-dev
, which overrides the base URL and network).
bash
npx skills add DFectuoso/frontpage-sh-skills --copy                  # 所有frontpage技能
npx skills add DFectuoso/frontpage-sh-skills/frontpage-vote --copy   # 仅安装此技能
如果要在开发环境/Tempo测试网测试?同时安装开发版本:
npx skills add DFectuoso/frontpage-sh-skills-dev --copy
(会得到
frontpage-vote-dev
,它会覆盖基础URL和网络配置)。

API

API

Base URL:
https://frontpage.sh
基础URL:
https://frontpage.sh

GET /api/proposals

GET /api/proposals

List all ideas with vote counts, commenter counts, and display names. Optional
?status=
filter:
open
,
building
,
done
,
rejected
.
bash
curl https://frontpage.sh/api/proposals
curl https://frontpage.sh/api/proposals?status=open
Response:
json
{
  "proposals": [
    {
      "id": "01jx...",
      "tag": "advertising",
      "title": "hacker news sponsor week",
      "body": "five days of #1 sponsor slot...",
      "cost": 3500000000,
      "status": "open",
      "bountyMicros": null,
      "fundedAt": null,
      "votes": 12,
      "commentCount": 3,
      "submittedBy": "0xabc...def",
      "suggesterName": "santi"
    }
  ]
}
Status values:
"open"
(taking votes),
"building"
(in progress),
"done"
(funded + settled),
"rejected"
.
Idea length caps: title 3–120 chars, body 10–800 chars, tag 2–24 chars
[a-z0-9-]
.
列出所有创意,包含投票数、评论数和显示名称。可选
?status=
筛选参数:
open
building
done
rejected
bash
curl https://frontpage.sh/api/proposals
curl https://frontpage.sh/api/proposals?status=open
响应:
json
{
  "proposals": [
    {
      "id": "01jx...",
      "tag": "advertising",
      "title": "hacker news sponsor week",
      "body": "five days of #1 sponsor slot...",
      "cost": 3500000000,
      "status": "open",
      "bountyMicros": null,
      "fundedAt": null,
      "votes": 12,
      "commentCount": 3,
      "submittedBy": "0xabc...def",
      "suggesterName": "santi"
    }
  ]
}
状态值:
"open"
(接受投票)、
"building"
(进行中)、
"done"
(已资助+结算)、
"rejected"
(已拒绝)。
创意长度限制:标题3-120字符,正文10-800字符,标签2-24字符,格式为
[a-z0-9-]

POST /api/votes
— $0.01 via MPP

POST /api/votes
— 通过MPP支付0.01 USDC

Cast a single vote on an idea. One vote per payer-address per idea.
bash
mppx https://frontpage.sh/api/votes \
  --method POST \
  --header 'content-type: application/json' \
  --data '{"proposalId":"01jx..."}'
Or via the TypeScript SDK:
ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({ methods: [tempo({ account: privateKeyToAccount('0x...') })] })

const res = await fetch('https://frontpage.sh/api/votes', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ proposalId: '01jx...' }),
})
const data = await res.json()
// { ok: true, voted: true, proposalId: '01jx...', voterAddress: '0x...', amountMicros: 10000 }
Errors:
  • 409 ALREADY_VOTED
    — this payer has already voted on this idea
  • 409 PROPOSAL_CLOSED
    — idea is
    done
    or
    rejected
  • 404 PROPOSAL_NOT_FOUND
为某个创意投一票。每个付款地址对每个创意只能投一票。
bash
mppx https://frontpage.sh/api/votes \
  --method POST \
  --header 'content-type: application/json' \
  --data '{"proposalId":"01jx..."}'
或通过TypeScript SDK:
ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({ methods: [tempo({ account: privateKeyToAccount('0x...') })] })

const res = await fetch('https://frontpage.sh/api/votes', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ proposalId: '01jx...' }),
})
const data = await res.json()
// { ok: true, voted: true, proposalId: '01jx...', voterAddress: '0x...', amountMicros: 10000 }
错误:
  • 409 ALREADY_VOTED
    — 该付款地址已为此创意投票
  • 409 PROPOSAL_CLOSED
    — 创意状态为
    done
    rejected
  • 404 PROPOSAL_NOT_FOUND
    — 未找到该创意

POST /api/proposals/submit
— $0.01 via MPP

POST /api/proposals/submit
— 通过MPP支付0.01 USDC

Submit an idea to the board.
ts
const res = await fetch('https://frontpage.sh/api/proposals/submit', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    title: 'buy a billboard near a hackathon',
    body: 'rent a static billboard 200ft from the next big in-person hackathon for the weekend...',
    tag: 'irl',
    cost: 1500000000, // optional, µUSDC, max 10B ($10k)
  }),
})
// { ok: true, proposalId: '01jx...', submittedBy: '0x...', amountMicros: 10000 }
Constraints:
  • title
    : 3–120 chars
  • body
    : 10–800 chars
  • tag
    : 2–24 chars,
    [a-z0-9-]
    (e.g.
    advertising
    ,
    irl
    ,
    swag
    )
  • cost
    : optional positive integer in µUSDC
Submissions are moderated via OpenAI's omni-moderation; flagged content returns
400 MODERATION_FAILED
.
向看板提交创意。
ts
const res = await fetch('https://frontpage.sh/api/proposals/submit', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    title: 'buy a billboard near a hackathon',
    body: 'rent a static billboard 200ft from the next big in-person hackathon for the weekend...',
    tag: 'irl',
    cost: 1500000000, // 可选,微USDC,最高10B(10000美元)
  }),
})
// { ok: true, proposalId: '01jx...', submittedBy: '0x...', amountMicros: 10000 }
限制条件:
  • title
    : 3-120字符
  • body
    : 10-800字符
  • tag
    : 2-24字符,格式为
    [a-z0-9-]
    (例如
    advertising
    irl
    swag
  • cost
    : 可选正整数,单位为微USDC
提交内容将通过OpenAI的全量审核进行审核;被标记的内容将返回
400 MODERATION_FAILED

POST /api/proposals/{id}/comments
— $0.01 via MPP

POST /api/proposals/{id}/comments
— 通过MPP支付0.01 USDC

Comment on an idea. Body: 1–140 chars. Rejected ideas return
409 IDEA_CLOSED
.
ts
const res = await fetch('https://frontpage.sh/api/proposals/01jx.../comments', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ body: 'This would be a great fit for the Rust meetup circuit.' }),
})
// { ok: true, commentId: '01jy...', proposalId: '01jx...', wallet: '0x...' }
为创意发表评论。正文:1-140字符。已拒绝的创意将返回
409 IDEA_CLOSED
ts
const res = await fetch('https://frontpage.sh/api/proposals/01jx.../comments', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ body: 'This would be a great fit for the Rust meetup circuit.' }),
})
// { ok: true, commentId: '01jy...', proposalId: '01jx...', wallet: '0x...' }

GET /api/proposals/{id}/comments
— free

GET /api/proposals/{id}/comments
— 免费

bash
curl https://frontpage.sh/api/proposals/01jx.../comments
bash
curl https://frontpage.sh/api/proposals/01jx.../comments

{ proposalId, comments: [{ id, wallet, authorName, body, createdAt }] }

{ proposalId, comments: [{ id, wallet, authorName, body, createdAt }] }

undefined
undefined

How payouts work

支付机制说明

When the frontpage.sh admin marks an idea as done, they set a bounty pot (typically $1, $5, $20, or $100). The pot is split:
  • 50% to the suggester (the address that submitted the idea)
  • 50% to voters (pro-rata across distinct voter addresses; the suggester doesn't double-dip if they also voted)
  • Dust stays in the pool
Payouts happen on-chain to the payer addresses recorded at vote/submit time. Failures are retried by an internal cron.
当frontpage.sh管理员将某个创意标记为done时,他们会设置一个赏金池(通常为1美元、5美元、20美元或100美元)。赏金池将按以下方式分配:
  • 50%归创意提交者(提交创意的地址)
  • 50%归投票者(按不同投票地址比例分配;提交者若同时投票,不会重复获得奖励)
  • 小额剩余资金将留在池中
支付将通过链上发送至投票/提交操作时记录的付款地址。支付失败将由内部定时任务重试。

Heuristics for agents

Agent使用准则

  • Quote the user the cost before paying. Each action is $0.01 — communicate that and confirm.
  • Don't spam-vote. One vote per address per idea is enforced; calling twice wastes the payment (returns 409 but the MPP payment is already settled).
  • Submit substantive ideas. Funding decisions are admin-curated; low-effort submissions burn $0.01 with no upside.
  • Read the board first (
    GET /api/proposals
    ) so you don't pitch a duplicate.
  • Check idea status. Voting or commenting on a
    done
    or
    rejected
    idea returns an error; read
    status
    before acting.
  • 执行操作前告知用户成本。 每项操作需支付0.01 USDC——请告知用户并确认。
  • 不要重复投票。 每个地址对每个创意只能投一票;重复调用会浪费支付金额(返回409,但MPP支付已完成结算)。
  • 提交有实质内容的创意。 资助决策由管理员审核;低质量提交会浪费0.01 USDC且无回报。
  • 先查看看板(调用
    GET /api/proposals
    ),避免提交重复创意。
  • 检查创意状态。
    done
    rejected
    状态的创意投票或评论会返回错误;操作前请先查看
    status
    字段。