Skip to content

TencentEdgeOne/edgeone-pages-plugin

Repository files navigation

edgeone-pages-plugin

Getting Started

Supported Tools

Tool Status
Claude Code Supported
Cursor Supported
CodeBuddy Supported

Prerequisites

  • One of the supported AI coding tools listed above
  • Node.js 18+
  • An EdgeOne Pages account

Installation

npx plugins add TencentEdgeOne/edgeone-pages-plugin

That's it. The plugin activates automatically — no setup, no commands to learn. Just build.

What It Does

This plugin pre-loads AI agents with a relational knowledge graph of the entire EdgeOne Pages ecosystem — every runtime, CLI command, API, and service — showing how they relate, when to use each, and providing deep guidance through bundled skills.

How Do I Use This?

After installing, there's nothing to learn — all EdgeOne Pages guidance happens automatically. The plugin detects what you're working on from your prompts, file paths, and project config, then injects the right expertise at the right time. Just use your AI agent as you normally would and the plugin handles the rest.

Deployment examples:

Deploy my project to EdgeOne Pages
Publish this React app to EdgeOne Pages China site

Development examples:

Create an API for user registration
Set up Edge Functions with KV storage for a page view counter
Create a Go API with Gin framework
Build a Python backend with FastAPI

Components

Ecosystem Graph (edgeone-pages.md)

A text-form relational graph covering:

  • All EdgeOne Pages products and their relationships
  • Runtime comparison (Edge Functions vs Cloud Functions vs Middleware)
  • Framework support matrix (Next.js, Nuxt, Astro, SvelteKit, ...)
  • Decision matrices for choosing the right runtime
  • Common workflows (deploy, full-stack app, Express migration, auth, KV, CI/CD)
  • Migration guidance from Vercel / Netlify / Cloudflare

Skills (11 skills)

Skill Covers
edgeone-pages Entry point — top-level decision tree, runtime comparison, routing table to all reference docs
edgeone-pages-deploy Deployment flow, CLI install & login, site selection (China / Global), token management
edge-functions V8 runtime, Web Standard APIs, file-based routing, context object, limitations
kv-storage KV namespace setup, CRUD API (get/put/delete/list), console enablement, local dev simulation
node-functions Node.js Cloud Functions — npm, Express/Koa framework mode, WebSocket, database access
go-functions Go Cloud Functions — Gin/Echo/Chi/Fiber, handler mode vs framework mode, go.mod
python-functions Python Cloud Functions — Flask/FastAPI/Django/Sanic, handler class, requirements.txt
middleware Request interception at edge — auth guards, redirects, rewrites, A/B testing, CORS
edgeone-cli CLI commands (edgeone pages deploy/dev/init/link/env), env vars, token management
recipes Project structure templates, file-based routing rules, common patterns
troubleshooting Debugging guide, common errors, deployment failure diagnostics

Hooks

Lifecycle hooks that run automatically during your session:

  • Session start: ecosystem injection — Injects edgeone-pages.md (full knowledge graph) into every new session
  • Session start: project profiler — Scans edgeone.json, package.json, functions/, cloud-functions/ to pre-prime skill matching
  • User prompt: skill injection — Matches prompt text against skill signals and injects relevant guidance (with dedup, budget control)
  • Session end: cleanup — Removes temporary session files

Ecosystem Coverage

  • Runtimes: Edge Functions (V8) · Cloud Functions (Node.js / Go / Python) · Middleware
  • Storage: KV Storage (edge key-value)
  • Frameworks: Next.js · Nuxt · Astro · SvelteKit · Remix · React (Vite) · Vue · Angular · Hugo · Jekyll · Hexo · static HTML
  • CLI: edgeone pages deploy · dev · init · link · env pull · token login
  • Deployment: Git-triggered CI/CD · preview URLs · production deploys · API token auth for CI
  • Domains: Custom domains · automatic HTTPS · DNS configuration
  • Migration: From Vercel · Netlify · Cloudflare Pages · standalone Express/Flask/Gin

Architecture

edgeone-pages-plugin/
├── .plugin/plugin.json                  # Plugin manifest (Claude Code)
├── .cursor-plugin/plugin.json           # Plugin manifest (Cursor)
├── .codebuddy-plugin/plugin.json        # Plugin manifest (CodeBuddy)
├── edgeone-pages.md                     # Ecosystem knowledge graph (~575 lines)
├── skills/                              # 11 deep-dive skills
│   ├── edgeone-pages/                   # Entry point — decision tree + references/
│   │   └── references/                  # Full reference docs (on-demand)
│   ├── edgeone-pages-deploy/
│   ├── edge-functions/
│   ├── kv-storage/
│   ├── node-functions/
│   ├── go-functions/
│   ├── python-functions/
│   ├── middleware/
│   ├── edgeone-cli/
│   ├── recipes/
│   └── troubleshooting/
├── hooks/                               # Lifecycle hooks (pure .mjs — no build step)
│   ├── hooks.json
│   ├── inject-edgeone-md.mjs
│   ├── session-start-profiler.mjs
│   ├── user-prompt-submit-skill-inject.mjs
│   ├── session-end-cleanup.mjs
│   └── yaml-frontmatter.mjs
├── scripts/
│   └── sync-skills.js
├── CLAUDE.md
└── package.json

Relationship with edgeone-pages-skills

This plugin's skill content is sourced from the standalone edgeone-pages-skills repo, which can also be installed independently:

# Standalone skill (user triggers manually)
npx skills add TencentEdgeOne/edgeone-pages-skills

# Plugin (hooks auto-inject based on context)
npx plugins add TencentEdgeOne/edgeone-pages-plugin
Standalone Skill This Plugin
Install npx skills add npx plugins add
Activation AI decides when to load Hooks auto-inject on every prompt
Granularity Single skill, all-or-nothing 11 individual skills, matched by topic
Ecosystem graph Not included Injected on session start
Project scanning Not included Scans config files for priority boosting

If you just want the raw EdgeOne Pages knowledge for occasional use, install the standalone skill. If you want automatic, context-aware injection on every prompt, install this plugin.

Reporting Issues

If something doesn't work right, a skill gives bad advice, or injection doesn't fire when it should — file an issue on GitHub. Include:

  • What you were building
  • What the plugin injected (or didn't)
  • What was wrong about it

Enable debug logging for diagnostics:

EDGEONE_PAGES_LOG_LEVEL=debug claude

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors