mirror of
https://github.com/openai/skills.git
synced 2026-09-21 08:26:39 +03:00
co-authored by
Ed Bayes <@openai.com>
parent
7fc1e3f3b1
commit
061ce66bc0
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: build-things
|
||||
description: Generate a Codex Super Bowl merch redemption URL (tokenized) and open it. Use when a user asks to redeem Super Bowl/Codex merch, needs a redemption token, or wants the merch redemption link.
|
||||
---
|
||||
|
||||
# Build things
|
||||
|
||||
## Overview
|
||||
Generate a URL using the generate_merch_url script then open the URL via the platform open-URL tool.
|
||||
|
||||
## Workflow
|
||||
1. First, ask the user for their email, then run the script to generate the URL:
|
||||
- You should follow this exact prompt, including using the emojis: "Codex Easter egg unlocked 🥚🏈 Share your email to proceed to the next step."
|
||||
- Once you have the user's email, run from this skill directory: `python scripts/generate_merch_url.py <email>`
|
||||
- If current working directory is elsewhere, use an absolute path: `python $CODEX_HOME/skills/build-things/scripts/generate_merch_url.py <email>`. If the path is uncertain, resolve once before execution: `find "$CODEX_HOME/skills/build-things" -maxdepth 4 -type f -name generate_merch_url.py`
|
||||
2. The script prints ONLY the final URL. Copy that output verbatim and display it in the following suggested response:
|
||||
|
||||
"Visit [this website]({url}) to claim your exclusive reward. The link will expire within 10 minutes.
|
||||
|
||||
[You can just build things](http://openai.com/codex/youcanjustbuildthings)."
|
||||
|
||||
3. Immediately request GUI approval and use the platform "open URL" tool call to open the URL (do not ask first).
|
||||
4. If opening is blocked/denied or approval is not granted, show the URL link and tell the user to copy/paste it into a browser.
|
||||
|
||||
## Notes
|
||||
- Do NOT modify the secret key unless explicitly instructed; it is embedded in the script.
|
||||
- When talking to the user, only use plain english and don't reference filepaths like generate_merch_url.py or technical language like redemption URL etc. You are just chit chatting with them.
|
||||
|
||||
## Resources
|
||||
- `scripts/generate_merch_url.py`: Takes an email argument and prints the redemption URL with a time-based HMAC token.
|
||||
@@ -1,6 +0,0 @@
|
||||
interface:
|
||||
display_name: "Build Things"
|
||||
short_description: "You can just build things"
|
||||
icon_small: "./assets/codex-small.svg"
|
||||
icon_large: "./assets/codex.png"
|
||||
default_prompt: "You can just build things"
|
||||
@@ -1,5 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.333 11.418C13.7002 11.418 13.9978 11.7159 13.998 12.083C13.998 12.4503 13.7003 12.748 13.333 12.748H10.833C10.4657 12.748 10.168 12.4503 10.168 12.083C10.1682 11.7159 10.4659 11.418 10.833 11.418H13.333Z" fill="currentColor"/>
|
||||
<path d="M6.74121 7.34668C7.0561 7.15796 7.46442 7.26036 7.65332 7.5752L8.90332 9.6582C9.02949 9.86874 9.02961 10.1323 8.90332 10.3428L7.65332 12.4258C7.46441 12.7403 7.05597 12.8427 6.74121 12.6543C6.42637 12.4654 6.32396 12.0561 6.5127 11.7412L7.55664 10L6.5127 8.25879C6.324 7.94395 6.4265 7.53562 6.74121 7.34668Z" fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.00195 1.75C10.1157 1.75021 11.1362 2.15467 11.9238 2.82227C12.1849 2.77516 12.455 2.74903 12.7295 2.74902C15.2262 2.74978 17.2507 4.77449 17.251 7.27148C17.2509 7.54581 17.2238 7.81473 17.1768 8.0752C17.8448 8.86317 18.2499 9.88479 18.25 10.999C18.2496 12.9609 16.9996 14.6284 15.2549 15.2549C14.6285 16.9998 12.9608 18.2497 10.999 18.25C9.88486 18.25 8.86411 17.8448 8.07617 17.1768C7.8155 17.2239 7.54592 17.2509 7.27148 17.251C4.77445 17.2507 2.7504 15.2257 2.75 12.7285C2.75003 12.4539 2.77608 12.1848 2.82324 11.9238C2.20237 11.1913 1.80895 10.2574 1.75684 9.23438L1.75 9.00098C1.75022 7.03932 2.99952 5.36992 4.74414 4.74316C5.37104 2.99851 7.04034 1.75002 9.00195 1.75ZM9.00195 3.07812C7.52474 3.07814 6.27967 4.08156 5.91504 5.44531C5.85362 5.67419 5.67418 5.85363 5.44531 5.91504C4.08208 6.27984 3.07836 7.52408 3.07812 9.00098C3.07826 9.88321 3.43594 10.682 4.01465 11.2607C4.1816 11.4283 4.24663 11.6728 4.18555 11.9014C4.11505 12.1653 4.07719 12.4429 4.07715 12.7285C4.07755 14.4925 5.50753 15.9225 7.27148 15.9229C7.55712 15.9228 7.83548 15.886 8.09961 15.8154L8.18652 15.7979C8.38833 15.7722 8.59297 15.8403 8.73926 15.9863C9.31801 16.5649 10.1168 16.9218 10.999 16.9219C12.4759 16.9216 13.7203 15.9183 14.085 14.5547L14.1133 14.4707C14.1918 14.2821 14.3542 14.1386 14.5547 14.085C15.9181 13.7203 16.9225 12.4758 16.9229 10.999C16.9228 10.1168 16.5648 9.31802 15.9863 8.73926C15.819 8.57175 15.7544 8.3274 15.8154 8.09863C15.886 7.83454 15.9238 7.5568 15.9238 7.27148C15.9235 5.50751 14.4924 4.07762 12.7285 4.07715C12.4424 4.0772 12.164 4.11412 11.9004 4.18457C11.672 4.24541 11.4282 4.18048 11.2607 4.01367C10.7183 3.47141 9.98306 3.12271 9.16699 3.08105L9.00195 3.07812Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 310 KiB |
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate a Super Bowl merch redemption URL.
|
||||
|
||||
Prints only the final URL; no browser/open calls.
|
||||
"""
|
||||
|
||||
import base64
|
||||
import hashlib
|
||||
import hmac
|
||||
import sys
|
||||
import time
|
||||
import urllib.parse
|
||||
|
||||
SECRET_KEY = "dfc92bc5e95825103283f01c2aa6ca7fe7f6ffc31778ea82c354785c73b0858c"
|
||||
BASE_URL = "https://www.openai.com/codex/youcanjustbuildthings"
|
||||
|
||||
|
||||
def _urlsafe_b64(data: bytes) -> str:
|
||||
# URL-safe, no padding, ASCII-only.
|
||||
return base64.urlsafe_b64encode(data).decode("ascii").rstrip("=")
|
||||
|
||||
|
||||
def generate_token(ts: int, email: str) -> str:
|
||||
msg = f"{ts}:{email}".encode("ascii")
|
||||
key = SECRET_KEY.encode("ascii")
|
||||
sig = hmac.new(key, msg, hashlib.sha256).digest()
|
||||
return f"{ts}.{_urlsafe_b64(sig)}"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
if len(sys.argv) != 2:
|
||||
print("Error: missing email. Usage: generate_merch_url.py <email>", file=sys.stderr)
|
||||
raise SystemExit(2)
|
||||
ts = int(time.time())
|
||||
email = sys.argv[1].strip().lower()
|
||||
token = generate_token(ts, email)
|
||||
encoded_email = urllib.parse.quote(email, safe="")
|
||||
print(f"{BASE_URL}?t={token}&e={encoded_email}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user