← 返回 Skills 市场
hosainnet

Deno Deploy

作者 Hosain · GitHub ↗ · v0.1.0
cross-platform ⚠ suspicious
489
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install deno-subhosting-deploy-skill
功能描述
Deploy simple web pages and HTML apps live to the internet using the Deno Deploy REST API. Use this skill whenever the user wants to make something "live", "...
使用说明 (SKILL.md)

Deno Deploy Skill (Standalone)

Deploy simple web pages and HTML apps to Deno Deploy using a bundled Python script that calls the Deno REST API directly. No MCP tool required.


Credentials Setup (First Time)

Before deploying, the user must create a Deno Subhosting organization and retrieve their credentials:

  1. Go to dash.deno.com/subhosting/new_auto and create a new subhosting org
  2. From the org dashboard, copy the org ID and access token

Then save them as config files under ~/.config/deno-deploy/:

mkdir -p ~/.config/deno-deploy
echo "your_token_here" > ~/.config/deno-deploy/access_token
echo "your_org_id_here" > ~/.config/deno-deploy/org_id

If these files don't exist, the deploy script will print a clear error with setup instructions. Direct the user to dash.deno.com/subhosting/new_auto to get started.


Step 1: Plan the App

Before writing code, think about:

  • What HTML/CSS/JS is needed?
  • Does it need external libraries? (Use CDN links — no npm installs)
  • Is it purely static, or does it need a simple backend (e.g., an API route)?

For simple pages: serve everything from a single main.ts file with inline HTML.


Step 2: Write Good Deno-Compatible Code

Standard Pattern

All Deno Deploy apps must export a fetch handler:

export default {
  async fetch(req: Request): Promise\x3CResponse> {
    const html = `\x3C!DOCTYPE html>
\x3Chtml lang="en">
\x3Chead>
  \x3Cmeta charset="UTF-8">
  \x3Cmeta name="viewport" content="width=device-width, initial-scale=1.0">
  \x3Ctitle>My App\x3C/title>
\x3C/head>
\x3Cbody>
  \x3C!-- content here -->
\x3C/body>
\x3C/html>`;

    return new Response(html, {
      headers: { "Content-Type": "text/html; charset=utf-8" },
    });
  },
};

Key Rules

  • No Node.js APIs — no require(), no fs, no path
  • No npm packages — use CDN links (e.g. https://cdn.tailwindcss.com)
  • Single file — inline all HTML, CSS, JS as template literals in main.ts
  • Always set Content-Type — include charset=utf-8 for HTML responses
  • Routing — use new URL(req.url).pathname for multi-route apps

Useful CDN Libraries

Purpose URL
Tailwind CSS https://cdn.tailwindcss.com
Alpine.js https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js
Chart.js https://cdn.jsdelivr.net/npm/chart.js
Marked (markdown) https://cdn.jsdelivr.net/npm/marked/marked.min.js

Step 3: Save the Code to a File

Write the TypeScript code to a temporary file, e.g. /tmp/main.ts:

cat > /tmp/main.ts \x3C\x3C 'EOF'
export default {
  async fetch(req: Request): Promise\x3CResponse> {
    ...
  },
};
EOF

Step 4: Deploy Using the Script

Run the bundled deploy script:

python scripts/deploy.py \
  --name \x3Cproject-name> \
  --code /tmp/main.ts

Project naming tips:

  • Use the topic/purpose: birthday-card, sales-dashboard, quiz-game
  • Lowercase, hyphens only, max ~30 chars
  • Avoid generic names like app or test

The script will:

  1. Create a new Deno Deploy project
  2. Upload the code
  3. Print the live URL

Step 5: Verify the Deployment

After the deploy script runs, you MUST verify the deployment was successful:

  1. Check the script output — look at the deployment response JSON printed by the script:

    • "status" should NOT be "failed". If it is, the code has errors — fix and redeploy.
    • If the status is "pending", wait a few seconds and proceed to the next check.
  2. Curl the live URL to confirm it's serving correctly:

    curl -s -o /dev/null -w "%{http_code}" https://\x3Cproject-name>.deno.dev
    
    • 200 = success, the page is live
    • 404 or 500 = something is wrong — check the deployment logs URL printed by the script
    • Any other error = the deployment may still be propagating, wait 5 seconds and retry once
  3. If the deployment failed, check for these common causes:

    • Syntax errors in the TypeScript code (missing braces, unclosed template literals)
    • Missing export default { fetch } handler
    • Use of Node.js APIs (require, fs, etc.)
    • Fix the issue in the code file and redeploy

Do NOT tell the user the deployment succeeded until you have confirmed it with curl.


Step 6: Share the Result

After a verified successful deployment, always:

  1. Share the live URL prominently as a clickable link
  2. Briefly explain what the user will see when they open it

Example:

Your page is live at https://your-project.deno.dev

It shows [brief description]. Let me know if you'd like to change anything!


Common Pitfalls

  • Don't forget \x3C!DOCTYPE html> — browsers may render in quirks mode without it
  • Don't use backticks inside template literals without escaping them
  • Don't forget export default { fetch } — the app won't start without it
  • If the project name is already taken, try a more specific name or add a suffix
安全使用建议
This skill appears to implement exactly what it claims: it uploads your code to Deno Deploy using an org access token read from ~/.config/deno-deploy/access_token and the org ID file. Before installing or running it: 1) Verify provenance — the source/homepage is unknown and the registry entry lacks a homepage; prefer code from an official Deno source or your own trusted repo. 2) Inspect the script (you already can) and only run it if you trust it. 3) Use a minimal-scope access token and a dedicated subhosting org (so compromise impact is limited). 4) Be aware the SKILL.md/manifest mismatch: the skill does require local credential files even though the metadata lists none. 5) Store the token securely (restrict filesystem permissions) and consider deleting tokens when not needed or using ephemeral/limited tokens. If you are unsure about the origin, run the script in a sandboxed environment or recreate its HTTP calls with your own trusted tooling instead.
功能分析
Type: OpenClaw Skill Name: deno-subhosting-deploy-skill Version: 0.1.0 The skill is classified as suspicious due to potential shell injection vulnerabilities in the `SKILL.md` instructions. The agent is instructed to execute shell commands like `python scripts/deploy.py --name <project-name> --code /tmp/main.ts` and `curl ... https://<project-name>.deno.dev`. If the `<project-name>` (user-controlled input) is not properly sanitized or escaped by the OpenClaw agent before execution, it could lead to arbitrary command execution on the host system. While the `scripts/deploy.py` itself handles arguments as strings and uses them in JSON payloads, the agent's direct shell execution of user-controlled input creates a significant risk. There is no evidence of intentional malicious behavior such as data exfiltration to unauthorized endpoints or persistence mechanisms.
能力评估
Purpose & Capability
The skill's claimed purpose (deploy to Deno Deploy) matches the code and instructions: the script calls https://api.deno.com/v1 to create a project and a deployment. However, the package metadata declares no required config paths or credentials while both SKILL.md and scripts/deploy.py require credentials saved under ~/.config/deno-deploy (access_token and org_id). That metadata omission is an inconsistency.
Instruction Scope
SKILL.md and the script stick to the stated scope: they instruct creating an org, storing a token and org ID in a local config directory, writing TypeScript code to a file, and calling the Deno REST API. The instructions do not request other system files, unrelated environment variables, or unexpected external endpoints beyond deno.com and the final deno.dev project URL.
Install Mechanism
No install step is provided (instruction-only with a bundled Python script). No downloads from arbitrary URLs or archive extraction occur. This is a low-risk install profile.
Credentials
The only sensitive artifacts the skill needs are an access token and org ID for Deno Subhosting, which is proportionate to the task. But the manifest did not declare required config paths or credentials; instead the script expects credentials in ~/.config/deno-deploy. The SKILL.md advises storing the token in a plaintext file, which is expected but is a sensitive practice the user should consider (use minimal-scope tokens and protect the file).
Persistence & Privilege
The skill does not request always-on presence, does not modify other skills or system-wide config, and only reads credential files from a user config directory. It does make network calls to the Deno API as required for deployment.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install deno-subhosting-deploy-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /deno-subhosting-deploy-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of deno-deploy: deploy simple web pages and HTML apps to Deno Deploy via the REST API, fully standalone. - Guides users to create Deno Subhosting org and set up needed credentials. - Provides usage patterns for Deno-compatible TypeScript code with standard export and CDN library usage. - Documents a deployment workflow using a bundled Python script, including project naming advice. - Includes post-deployment verification and troubleshooting steps. - Emphasizes verifying deployment success before presenting live URLs for sharing.
元数据
Slug deno-subhosting-deploy-skill
版本 0.1.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Deno Deploy 是什么?

Deploy simple web pages and HTML apps live to the internet using the Deno Deploy REST API. Use this skill whenever the user wants to make something "live", "... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 489 次。

如何安装 Deno Deploy?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install deno-subhosting-deploy-skill」即可一键安装,无需额外配置。

Deno Deploy 是免费的吗?

是的,Deno Deploy 完全免费(开源免费),可自由下载、安装和使用。

Deno Deploy 支持哪些平台?

Deno Deploy 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Deno Deploy?

由 Hosain(@hosainnet)开发并维护,当前版本 v0.1.0。

💬 留言讨论