Start with AI
EdgeOne Pages features built-in AI tools like deploying MCP and AI IDE plugins, working in conjunction with flexible AI context text files to build an intelligent free and open ecosystem. This helps you deliver outstanding Web applications faster with higher quality.
Using Pages MCP
MCP (Model Context Protocol) is an open protocol that enables AI models to securely interact with local and remote resources.
EdgeOne Pages Deploy MCP is a dedicated service that enables fast deployment of Web applications to EdgeOne Pages and generates public access links. This allows you to immediately preview and share AI-generated Web content. For details, refer to the document Pages MCP.
AI Context File
In Pages, AI context files serve as the bridge between you and AI IDEs (such as CodeBuddy, Cursor, Windsurf). These files are written in Markdown format, allowing you to define project-specific rules, best practices, code specifications, API definitions, and even business logic descriptions. Through context files, you can provide AI with precise context information, ensuring that the generated code, suggestions, and automated operations better align with your project requirements and platform features.
You can download the Pages context file through this URL: https://pages.edgeone.ai/pages-llms.mdc
Using .Mdc Files in AI IDE
For most AI development tools, simply place the pages-llms.mdc file in the project root directory as a project level rule, or set it as a global rule in the development tool.
For use in CodeBuddy: Enter the settings interface in the IDE, locate the Rules tab, and add the .mdc file under Project Rules. For more information, view the document Using CodeBuddy IDE.
For use in Cursor: Create a .cursor/rules/ folder in the project root directory and place your .mdc file there. Alternatively, add it to the user's main directory (such as ~/.cursor/rules/). For more information, view examples in the Cursor official documentation https://docs.cursor.com/context/rules.
For use in Windsurf: Create a .windsurf/rules/ folder in the project root directory and place your .mdc file there. Or manually add this file through the Windsurf UI. For more information, view examples in the Windsurf official documentation https://windsurf.com/editor/directory.
Using Llms.Txt
You can also use https://pages.edgeone.ai/llms.txt in AI conversation to share the context of Pages documents. Typically, as long as the AI conversation tool supports this format, llms.txt will be referenced as a network resource context.
AI Development Assistance and Deployment Practice
The following best practice will guide you on how to effectively collaborate with AI for faster and better project development.
Optimizing Prompt Content
Clear and structured prompt content is key to effective communication with AI. Follow the rules below to help AI understand your intent more accurately:
Use the total score structure: First state the overall goal, then gradually refine specific requirements, such as "create a responsive blog homepage with navigation, article list and footer."
Use precise terminology: Employ accurate descriptions in key instructions, such as "implement a blue color scheme flat design using Tailwind CSS."
Provide existing examples: By providing existing code or design pattern examples, guide AI to generate content that meets your style.
Continuously adjust and iterate: Attempt different expressions to organize prompt content for identifying the best results caused by AI.
EdgeOne Pages Prompt Content Key Phrases
To help AI better understand your intent and generate project code that can be smoothly deployed to Pages. Mention these words during AI conversation to significantly improve the accuracy and relevance of AI output.
EdgeOne Pages: Clarify the specified target deployment platform.
Example: "Create a Next.js blog app for EdgeOne Pages."
Node Functions: Specify backend logic that requires the use of Node.js runtime environment.
Example: "I need a Node Functions to handle user authentication."
Edge Functions: Specify lightweight logic that requires edge computing capability.
Example: "Write an Edge Functions to implement geolocation redirection."
Full-stack application: Emphasize the project includes frontend and backend.
Example: "Develop a full-stack application to get local weather in real time, using React for frontend and Node Functions for backend."
AI Rule file: Specify the use of a specific AI rule file to guide AI.
Example: "Refer to the rules in the mdc file and generate code compliant with EdgeOne Pages standard."
Refining Project Information
Providing appropriate AI context helps AI better understand your project.
Fully utilize context files: Supplement the project structure, API interface, or business logic appropriately in pages-llms.mdc. The AI IDE will automatically load these rules to ensure AI-generated code meets project requirements.
Write a high-quality readme: This is the key entry for AI to understand the project. A clear, detailed README.md should include project introduction, technology stack, run/deployment guide, and key module descriptions, helping AI quickly grasp the project's holistic picture and provide accurate recommendations.
