About
PAGX Skills is a professional extension for AI coding assistants. After installation, AI can generate well structured PAGX vector graphics from natural-language prompts, optimize file size and rendering performance, and look up PAGX syntax, attributes, and CLI usage when needed.
Mainstream AI image generation tools (such as Stable Diffusion and DALL-E) are primarily bitmap-based, relying on probabilistic sampling. This means when a local detail in the generated result does not meet expectations, it is usually impossible to adjust only that specific detail precisely; instead, the entire image must be regenerated. This limitation makes bitmap-based AI tools more suitable for early-stage creative exploration, but less capable of meeting the precise control and stable reuse requirements of production delivery. To address this, AI needs to work on vector graphics with precise structures. However, AI has not yet seen widespread adoption in vector generation, largely due to the lack of a universal vector format standard optimized for AI. PAGX is designed precisely for this purpose — compared with traditional vector formats like SVG, PAGX is deeply optimized for AI at the file-format level and comes with a complete set of Skills and command-line tools, giving it stronger visual expressiveness and more accurate element positioning, and supporting precise secondary editing and continuous iteration: theoretically, with enough iteration rounds, output can continuously approach production-ready quality.
The PAGX format is still evolving, and the specification may change at any time. Static vector capability is complete for now; motion capability will continue to be expanded next, after which AI will also support direct animation generation.
Installation Guide
1. Install Node.js
The Skills package includes the @libpag/pagx command-line tool, which depends on
Node.js. If Node.js is not installed on your machine, complete these steps first:
Step 1 — Visit nodejs.org and download the LTS (Long Term Support) version for your operating system.
Step 2 — Run the installer and follow the on-screen instructions. Accept all default settings.
Step 3 — Verify the installation. Open a terminal (Terminal on macOS, Command Prompt or PowerShell on Windows) and run:
node --version
If you see a version number like v22.x.x, Node.js is installed successfully.
2. Install an AI Coding Assistant
PAGX Skills works with any AI coding assistant that supports a Skills mechanism. Here we use CodeBuddy Code as an example. For other tools, refer to their official documentation for installation.
Step 1 — Open a terminal and run the installation command:
npm install -g @tencent-ai/codebuddy-code
Step 2 — After installation, launch it by typing:
codebuddy
Follow the on-screen prompts to complete the initial setup and authentication.
For detailed installation instructions and system requirements, see the CodeBuddy Code documentation.
3. Install PAGX Skills
After downloading pagx.zip, extract it and place the
resulting pagx folder into your user-level Skills directory.
This makes the skill available across all your projects.
| Platform | Skills directory |
|---|---|
| macOS / Linux | ~/.codebuddy/skills/ |
| Windows | C:\Users\<username>\.codebuddy\skills\ |
The final directory structure should look like:
.codebuddy/
skills/
pagx/
SKILL.md
references/
...
If the .codebuddy/skills/ folders do not exist yet, create them manually.
Then launch CodeBuddy Code in any project folder — the PAGX Skills will be
automatically detected and loaded.
The @libpag/pagx command-line tool will be automatically installed when the AI
assistant needs it for the first time. This requires the Node.js environment set up in Step 1.
Getting Started
PAGX Skills has been tested primarily with CodeBuddy Code and the Claude Opus 4.6 model. Other tools and models may produce different results.
Once installed, you can drive the AI with natural language. The examples below follow a simple sequence: create, iterate, then validate.
Creating PAGX Files
When creating for the first time, include "PAGX" in your prompt so the AI activates the PAGX skill. Once activated, subsequent messages in the same conversation no longer need the keyword.
Create a PAGX button: blue rounded rectangle, white text 'Submit'Design a PAGX card with an avatar, title, and subtitleMake a PAGX settings icon using simple geometric shapes, 24x24Create a PAGX gradient banner with bold text 'Welcome Back'
Modifying and Iterating
Change the Submit button color to green and increase its corner radiusMake the title text in the card larger and align it to the leftAdd a subtle drop shadow to the entire cardThe spacing between the settings icon and the label text feels too tight, increase it
Rendering and Inspection
Render this PAGX file as a screenshot so I can preview itRender it at 2x scale for Retina displayValidate this PAGX file and fix any errorsOptimize this PAGX file for size and performance
Online Preview
You can also preview PAGX files visually using the
PAGX Playground — simply drag and drop any
.pagx file onto the page to see the rendered result in your browser.
Tips for Best Results
Iterate steadily to converge. Do not expect a single AI generation to meet production standards directly. Instead, iterate continuously. The underlying principle is that with enough iteration rounds, output can keep approaching production‑ready quality. AI and tools can handle high‑frequency execution and automated verification, while humans provide aesthetic and structural guidance at key decision points. As large models, Skills, and supporting tools continue to advance, human involvement will gradually decrease, and the efficiency of natural language descriptions will keep improving.
Guide creation, not precise tracing. When providing bitmap references, treat them as guides for style, mood, and composition, not as pixel‑perfect targets to replicate. Bitmap generation is based on probabilistic sampling, yielding outputs that are closer to “visual impressions.” Vector generation, by contrast, produces explicit, structurally clear descriptions. Recovering a unique structure directly from a probability distribution exceeds the capabilities of current large models. A more reliable approach is to let AI produce a structurally correct vector version first, then refine details through targeted parameter adjustments.