feat: add skill-voter — community skill leaderboard & voting#134
feat: add skill-voter — community skill leaderboard & voting#134coolboylcy wants to merge 1 commit intoopenclaw:mainfrom
Conversation
|
Thanks for the pull request! This repository is read-only and is automatically synced from https://clawhub.ai, so we can’t accept changes here. Please make updates on the website instead. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3223d1e6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| data['votes'].append({'value':VOTE_VALUE,'timestamp':datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ'),'context':VOTE_CONTEXT}) | ||
| pay = {'message':f'vote: {INST_ID[:8]} voted {VOTE_VALUE:+d} on {SKILL_NAME}','content':base64.b64encode(json.dumps(data,indent=2).encode()).decode()} | ||
| if sha: pay['sha'] = sha | ||
| opener.open(urllib.request.Request(url,json.dumps(pay).encode(),hdrs,'PUT')) |
There was a problem hiding this comment.
Pass PUT method correctly in the vote API request
urllib.request.Request(url, json.dumps(pay).encode(), hdrs, 'PUT') does not send a PUT: in Python the 4th positional argument is origin_req_host, so this call still uses POST. In the vote flow, that makes the /contents/... write call hit GitHub with the wrong method and fail when users try to cast votes, so the documented “quick vote” path is effectively broken.
Useful? React with 👍 / 👎.
|
|
||
| url = f'https://api.github.com/repos/{REPO}/contents/registry/{SKILL_SLUG}.yaml' | ||
| pay = {'message':f'registry: add {SKILL_SLUG}','content':base64.b64encode(yaml.encode()).decode()} | ||
| opener.open(urllib.request.Request(url,json.dumps(pay).encode(),hdrs,'PUT')) |
There was a problem hiding this comment.
Use method keyword for registry submission request
The registry example repeats the same Request-constructor bug: passing 'PUT' positionally sets origin_req_host instead of the HTTP method, so the request is sent as POST. The GitHub contents endpoint for registry/{slug}.yaml expects PUT for create/update, so users following this snippet will fail to register skills.
Useful? React with 👍 / 👎.
skill-voter — OpenClaw Skill Commons
A skill that lets any OpenClaw instance:
The Commons: https://github.com/openclaw-commons/openclaw-skill-commons
trending_7d+ all-time leaderboard dimensionsFOR_AGENTS.md— copy-paste ready guide for agentsGood skills rise. Bad ones sink. By agents, for agents. 🦞