frontpage-vote
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefrontpage-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 → ), 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.
done当用户需要以下操作时,使用此技能:
- 在https://frontpage.sh/ideas为创意投票
- 向创意看板提交创意
- 查看未结创意和投票统计
- 为创意发表评论(需支付0.01 USDC,最多140字符)
每项操作需通过Machine Payments Protocol支付0.01 USDC。支付金额将进入项目池。如果你的创意被管理员资助(状态变为),你和投票者将平分赏金——50/50,通过链上支付给执行操作时付款的钱包。你的Agent会处理复杂的部分。
doneInstall
安装
bash
npx skills add DFectuoso/frontpage-sh-skills --copy # all frontpage skills
npx skills add DFectuoso/frontpage-sh-skills/frontpage-vote --copy # just this oneTesting against a dev box / Tempo testnet? Install the dev twin too: (gives you , which overrides the base URL and network).
npx skills add DFectuoso/frontpage-sh-skills-dev --copyfrontpage-vote-devbash
npx skills add DFectuoso/frontpage-sh-skills --copy # 所有frontpage技能
npx skills add DFectuoso/frontpage-sh-skills/frontpage-vote --copy # 仅安装此技能如果要在开发环境/Tempo测试网测试?同时安装开发版本:(会得到,它会覆盖基础URL和网络配置)。
npx skills add DFectuoso/frontpage-sh-skills-dev --copyfrontpage-vote-devAPI
API
Base URL:
https://frontpage.sh基础URL:
https://frontpage.shGET /api/proposals
GET /api/proposalsGET /api/proposals
GET /api/proposalsList all ideas with vote counts, commenter counts, and display names. Optional filter: , , , .
?status=openbuildingdonerejectedbash
curl https://frontpage.sh/api/proposals
curl https://frontpage.sh/api/proposals?status=openResponse:
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: (taking votes), (in progress), (funded + settled), .
"open""building""done""rejected"Idea length caps: title 3–120 chars, body 10–800 chars, tag 2–24 chars .
[a-z0-9-]列出所有创意,包含投票数、评论数和显示名称。可选筛选参数:、、、。
?status=openbuildingdonerejectedbash
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/votesPOST /api/votes
— 通过MPP支付0.01 USDC
POST /api/votesCast 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:
- — this payer has already voted on this idea
409 ALREADY_VOTED - — idea is
409 PROPOSAL_CLOSEDordonerejected 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或donerejected - — 未找到该创意
404 PROPOSAL_NOT_FOUND
POST /api/proposals/submit
— $0.01 via MPP
POST /api/proposals/submitPOST /api/proposals/submit
— 通过MPP支付0.01 USDC
POST /api/proposals/submitSubmit 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:
- : 3–120 chars
title - : 10–800 chars
body - : 2–24 chars,
tag(e.g.[a-z0-9-],advertising,irl)swag - : optional positive integer in µUSDC
cost
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 }限制条件:
- : 3-120字符
title - : 10-800字符
body - : 2-24字符,格式为
tag(例如[a-z0-9-]、advertising、irl)swag - : 可选正整数,单位为微USDC
cost
提交内容将通过OpenAI的全量审核进行审核;被标记的内容将返回。
400 MODERATION_FAILEDPOST /api/proposals/{id}/comments
— $0.01 via MPP
POST /api/proposals/{id}/commentsPOST /api/proposals/{id}/comments
— 通过MPP支付0.01 USDC
POST /api/proposals/{id}/commentsComment on an idea. Body: 1–140 chars. Rejected ideas return .
409 IDEA_CLOSEDts
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_CLOSEDts
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}/commentsGET /api/proposals/{id}/comments
— 免费
GET /api/proposals/{id}/commentsbash
curl https://frontpage.sh/api/proposals/01jx.../commentsbash
curl https://frontpage.sh/api/proposals/01jx.../comments{ proposalId, comments: [{ id, wallet, authorName, body, createdAt }] }
{ proposalId, comments: [{ id, wallet, authorName, body, createdAt }] }
undefinedundefinedHow 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 () so you don't pitch a duplicate.
GET /api/proposals - Check idea status. Voting or commenting on a or
doneidea returns an error; readrejectedbefore acting.status
- 执行操作前告知用户成本。 每项操作需支付0.01 USDC——请告知用户并确认。
- 不要重复投票。 每个地址对每个创意只能投一票;重复调用会浪费支付金额(返回409,但MPP支付已完成结算)。
- 提交有实质内容的创意。 资助决策由管理员审核;低质量提交会浪费0.01 USDC且无回报。
- 先查看看板(调用),避免提交重复创意。
GET /api/proposals - 检查创意状态。 对或
done状态的创意投票或评论会返回错误;操作前请先查看rejected字段。status