← 返回 Skills 市场
edgeone-pages

EdgeOne Pages Dev

作者 edgeone-pages · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
77
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install edgeone-pages-dev
功能描述
This skill guides development of full-stack features on EdgeOne Pages — Edge Functions, Cloud Functions (Node.js / Go / Python runtimes), Middleware, KV Stor...
使用说明 (SKILL.md)

EdgeOne Pages Development Guide

Develop full-stack applications on EdgeOne Pages — Edge Functions, Cloud Functions (Node.js / Go / Python), and Middleware.

When to use this skill

  • Creating APIs, serverless functions, or backend logic on EdgeOne Pages
  • Adding middleware for request interception, redirects, auth guards, or A/B testing
  • Building full-stack apps with static frontend + server-side functions
  • Using KV Storage for edge-side persistent data
  • Setting up WebSocket endpoints (Node.js runtime)
  • Integrating Express, Koa, Gin, Echo, Flask, FastAPI, or Django on EdgeOne Pages
  • Debugging EdgeOne Pages runtime errors (function failures, middleware issues, KV problems)

Do NOT use for:

  • Deployment → use edgeone-pages-deploy skill
  • Next.js / Nuxt middleware or API routes → use the framework's own API, NOT the platform middleware.js
  • Generic Express/Koa/Gin/Flask development outside an EdgeOne Pages project
  • Cloudflare Workers, Vercel Functions, or other platforms

How to use this skill (for a coding agent)

  1. Read the Decision Tree below to pick the correct runtime
  2. Follow the Routing table to load the relevant reference file
  3. Use the code patterns from that reference to implement the user's request

⛔ Critical Rules (never skip)

  1. Choose the right runtime for the task. Follow the Decision Tree — never guess.
  2. Edge Functions run on V8, NOT Node.js. Never use Node.js built-in modules (fs, path, crypto from Node) or npm packages in Edge Functions.
  3. Cloud Functions support three runtimes: Node.js, Go, and Python. Place all function files under cloud-functions/ directory. The platform detects the language by file extension (.js/.ts → Node.js, .go → Go, .py → Python).
  4. Node.js functions return a standard Web Response object, not res.send() — unless using Express/Koa via the [[default]].js pattern.
  5. Go Handler mode requires http.HandlerFunc signature; Framework mode uses standard framework code with auto port/path adaptation.
  6. Python entry files are identified by class/app patterns (class handler(BaseHTTPRequestHandler), app = Flask(...), app = FastAPI(...)). Other .py files are treated as helper modules.
  7. Middleware is for lightweight request interception only. Never put heavy computation or database calls in middleware.
  8. Always use edgeone pages dev for local development. Never run a separate dev server for functions — the CLI handles everything on port 8088.
  9. Never configure edgeone pages dev as the devCommand in edgeone.json or as the dev script in package.json — this causes infinite recursion.
  10. For framework projects (Next.js, Nuxt, etc.), use the framework's own middleware — NOT the platform middleware.js.

Technology Decision Tree

Request interception / redirect / rewrite / auth guard / A/B test?
  → Middleware                                        → read references/middleware.md

Lightweight API with ultra-low latency (simple logic, no npm)?
  → Edge Functions                                    → read references/edge-functions.md

KV persistent storage? (⚠️ enable KV in console first)
  → Edge Functions + KV Storage                       → read references/kv-storage.md

Complex backend with npm packages / database / WebSocket?
  → Cloud Functions (Node.js)                         → read references/node-functions.md

Express or Koa framework?
  → Cloud Functions (Node.js) with [[default]].js     → read references/node-functions.md

High-performance API with Go (Gin / Echo / Chi / Fiber)?
  → Cloud Functions (Go)                              → read references/go-functions.md

Python API with Flask / FastAPI / Django / Sanic?
  → Cloud Functions (Python)                          → read references/python-functions.md

Pure static site with no server-side logic?
  → No functions needed — just deploy static files

Need a project structure template?
  → read references/recipes.md

Runtime Comparison

Feature Edge Functions Cloud Functions (Node.js) Cloud Functions (Go) Cloud Functions (Python) Middleware
Runtime V8 (like CF Workers) Node.js v20.x Go 1.26+ Python 3.10 V8 (edge)
npm/packages ❌ Not supported ✅ Full npm ecosystem ✅ Go modules ✅ pip (auto-detect) ❌ Not supported
Max code size 5 MB 128 MB 128 MB 128 MB (incl. deps) Part of edge bundle
Max request body 1 MB 6 MB 6 MB 6 MB N/A (passes through)
Max CPU / wall time 200 ms CPU 120 s wall clock 120 s wall clock 120 s wall clock Lightweight only
KV Storage ✅ Yes (global variable) ❌ No ❌ No ❌ No ❌ No
WebSocket ❌ No ✅ Yes ❌ No ❌ No ❌ No
Framework support Express, Koa Gin, Echo, Chi, Fiber Flask, FastAPI, Django, Sanic
Use case Lightweight APIs, edge compute Complex APIs, full-stack High-perf APIs, compiled speed Data science, ML, rapid prototyping Request preprocessing

Cloud Functions — Language Comparison

Feature Node.js Go Python
File extension .js / .ts .go .py
Handler style export function onRequest(ctx)Response func Handler(w, r) (Handler) or func main() (Framework) class handler(BaseHTTPRequestHandler) or framework app instance
Framework mode Express/Koa via [[default]].js Gin/Echo/Chi/Fiber via entry .go file Flask/FastAPI/Django via entry .py file
Dependency management package.json (npm) go.mod (auto) requirements.txt + auto-detect
Dev modes Handler / Framework Handler / Framework Handler / WSGI / ASGI

Routing

Task Read
Edge Functions (lightweight APIs, V8 runtime, KV Storage) references/edge-functions.md
KV Storage (persistent key-value storage on edge) references/kv-storage.md
Cloud Functions — Node.js (npm, database, Express/Koa, WebSocket) references/node-functions.md
Cloud Functions — Go (Gin, Echo, Chi, Fiber, net/http) references/go-functions.md
Cloud Functions — Python (Flask, FastAPI, Django, Sanic, Handler) references/python-functions.md
Middleware (redirects, rewrites, auth guards, A/B testing) references/middleware.md
Project structure templates and common recipes references/recipes.md
Debugging and troubleshooting references/troubleshooting.md

Project Setup (Quick Start)

Initialize the project:

edgeone pages init

Start local development:

edgeone pages dev            # Serves everything on http://localhost:8088/

Link project (required for KV & env vars):

edgeone pages link

Manage environment variables:

edgeone pages env pull       # Pull from console to local .env

Access env vars in functions via context.env.KEY (Node.js), os.Getenv("KEY") (Go), or os.environ.get("KEY") (Python).

For detailed project structures and recipes, see references/recipes.md.

安全使用建议
This is a documentation-only skill for developing on EdgeOne Pages; nothing in the package requests secrets or installs code automatically. Before using: (1) verify the skill's source/trustworthiness since the registry metadata shows 'unknown' and the docs link to Tencent-hosted templates; (2) when following the docs, only run the official CLI (npm global install is recommended by the docs) and avoid running arbitrary scripts from third-party templates without review; (3) when binding KV or setting env vars in the console, do not paste production secrets into example code—use secure secrets management; (4) if you let an autonomous agent invoke the skill, remember it will follow these instructions to generate code snippets but cannot install or execute anything on your machine by itself.
功能分析
Type: OpenClaw Skill Name: edgeone-pages-dev Version: 1.0.0 The skill bundle provides comprehensive documentation and instructions for developing full-stack features on the EdgeOne Pages platform. It includes detailed guides for Edge Functions, Cloud Functions (Node.js, Go, Python), KV Storage, and Middleware, with clear code examples and architectural rules. No evidence of malicious intent, data exfiltration, or prompt injection was found; the content is entirely aligned with its stated purpose of assisting developers with platform-specific APIs and workflows.
能力标签
crypto
能力评估
Purpose & Capability
Name and description match the provided files: all references, decision tree, and code patterns relate to EdgeOne Pages development. The skill does not request unrelated credentials, binaries, or config paths.
Instruction Scope
SKILL.md and reference files only instruct typical dev tasks (choose runtimes, file layouts, CLI commands, console binding) and include code patterns for Edge/Cloud functions, middleware, KV usage. They do not instruct the agent to read arbitrary host files, exfiltrate secrets, or call unexpected external endpoints.
Install Mechanism
There is no install specification and no code to download or execute. The guidance tells a human developer to install the official 'edgeone' CLI (npm) for local dev, which is expected for a platform SDK/doc skill.
Credentials
The skill declares no required environment variables or credentials. It documents the platform's context.env and global KV binding semantics for EdgeOne Pages, which is appropriate for its purpose.
Persistence & Privilege
The skill is instruction-only, does not request persistent presence (always is false), and makes no changes to other skills or system-wide configurations.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install edgeone-pages-dev
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /edgeone-pages-dev 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
EdgeOne Pages Deployment Skill v1.0.0 - Initial release: deploy frontend and full-stack projects to EdgeOne Pages (Tencent EdgeOne). - Strictly enforces CLI version (≥ 1.2.30) check before proceeding. - Includes explicit user flow for site selection (China/Global) and auto-detects appropriate login method (browser or token). - Provides options to save tokens securely and manages them in `.edgeone/.token`. - Ensures deployment output parsing for the complete access URL (with required query parameters) and reveals Console URL and Project ID for user reference. - Clarifies strict boundaries for when to trigger deployment and excludes troubleshooting or post-deploy debug scenarios.
元数据
Slug edgeone-pages-dev
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

EdgeOne Pages Dev 是什么?

This skill guides development of full-stack features on EdgeOne Pages — Edge Functions, Cloud Functions (Node.js / Go / Python runtimes), Middleware, KV Stor... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 77 次。

如何安装 EdgeOne Pages Dev?

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

EdgeOne Pages Dev 是免费的吗?

是的,EdgeOne Pages Dev 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

EdgeOne Pages Dev 支持哪些平台?

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

谁开发了 EdgeOne Pages Dev?

由 edgeone-pages(@edgeone-pages)开发并维护,当前版本 v1.0.0。

💬 留言讨论