static-deploy
Skill3.3k starsChanged 8 months agoMITView on GitHub
Deploy static pages to nexu.space. Use when user says deploy, publish, ship, or go live with a static site/page. Uploads files from workspace to <project-slug>.nexu.space via Wrangler + Cloudflare Pages. Supports first deploy and redeploy.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- process-pr-reviewsSkill
- datadogSkill
- nexu-e2e-testSkill
- sync-specsSkill
- feedbackSkill
- nano-bananaSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 3 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Ask user to confirm if ambiguous
- Distinctive: line 29
Run deploy with the inbound structured context:
- Very specific: line 61
Never read, echo, or log SKILL_API_TOKEN, CLOUDFLARE_API_TOKEN, or CLOUDFLARE_ACCOUNT_ID
- Distinctive: line 62
Never pass credentials as command arguments
- Very specific: line 63
Always use the bundled deploy.sh — do not call Cloudflare API directly
- Very specific: line 64
Do not set DEPLOY_BACKEND or any other env overrides — the script handles everything
- Very specific: line 65
Always pass the caller <agent-id> as arg #3 to deploy.sh
- Very specific: line 66
Always pass raw inbound <chat-id> as arg #4
- Very specific: line 67
Never pass <agent-id> as <chat-id>.
- Very specific: line 68
If deploying from a thread, pass <thread-id> as arg #5
- Very specific: line 69
Always pass <channel> and <chat-type> when available so Nexu can resolve the correct session deterministically
- Very specific: line 70
Do not try to look up or persist a canonical session key in this skill.
- Very specific: line 71
Do not hand-edit source files just to add cache-busting query params.
- Very specific: line 72
If the script fails, show the message field from the JSON error to the user
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Static Deploy
Deploy static files to <project-slug>.nexu.space via Wrangler + Cloudflare Pages.
The deploy script stages a temporary copy of the site and injects a _headers
file (if needed) with cache revalidation rules for HTML/CSS/JS to reduce stale
asset issues after redeploys. Source files are not modified.
What it deploys
Any static files: HTML, CSS, JS, images, fonts, etc. Common use cases:
- Single-page apps (React, Vue, etc. — deploy the
dist/orbuild/folder) - Landing pages, portfolios, documentation sites
- Quick prototypes or demos
- Any folder with an
index.html
Usage
- Identify the directory containing files to deploy (must have an
index.html) - Derive a project-slug from context (e.g., "family budget" →
family-budget)- Lowercase alphanumeric + hyphens only, max 63 characters
- Reuse the same slug for redeployments
- Ask user to confirm if ambiguous
- Run deploy with the inbound structured context:
"$SKILL_DIR/scripts/deploy.sh" <project-slug> <directory> <agent-id> <chat-id> [thread-id] [message-ref] [account-id] [channel] [chat-type] [sender-ref]agent-id is required. The script uses it to resolve the corresponding botId
from nexu-context.json when recording deployment artifacts.
chat-id is the raw inbound chat identifier from the message context.
- DM example:
U0AHLMC6C8G - Channel example:
C0AJKG60H6D
chat-type tells the script whether to send that id to Nexu as user:<chat-id>
or channel:<chat-id>. The script does that translation; do not concatenate
those prefixes yourself.
thread-id is optional — pass it when deploying from within a thread context.
4. Parse the JSON output and report to user:
- Brief summary of what was deployed
- Live URL from the
urlfield - Important: Tell the user that Cloudflare Pages propagation takes ~3 minutes. The URL may not work immediately after the first deploy. For redeployments, it's usually faster.
Example reply
Deployed! Your site is live at https://family-budget.nexu.space
Note: First-time deploys take ~3 minutes to propagate on Cloudflare. If you see a "not found" page, wait a few minutes and refresh.
Rules
- Never read, echo, or log
SKILL_API_TOKEN,CLOUDFLARE_API_TOKEN, orCLOUDFLARE_ACCOUNT_ID - Never pass credentials as command arguments
- Always use the bundled
deploy.sh— do not call Cloudflare API directly - Do not set
DEPLOY_BACKENDor any other env overrides — the script handles everything - Always pass the caller
<agent-id>as arg #3 todeploy.sh - Always pass raw inbound
<chat-id>as arg #4 - Never pass
<agent-id>as<chat-id>; they are different values - If deploying from a thread, pass
<thread-id>as arg #5 - Always pass
<channel>and<chat-type>when available so Nexu can resolve the correct session deterministically - Do not try to look up or persist a canonical session key in this skill; Nexu resolves it server-side
- Do not hand-edit source files just to add cache-busting query params; the deploy script handles cache revalidation via a staged
_headersfile - If the script fails, show the
messagefield from the JSON error to the user - Cloudflare credentials are fetched at runtime via the scoped secrets API using
SKILL_API_TOKENfrom env — do not attempt to read or inject them manually
Output Format
Success:
{
"status": "success",
"url": "https://<slug>.nexu.space",
"deployment_url": "https://<id>.<slug>.pages.dev",
"files_total": 10,
"files_uploaded": 2,
"files_cached": 8
}Error:
{
"status": "error",
"message": "Description of what went wrong"
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

