Skip to content

feat(docs): add global Vite+ agent setup - #2798

Open
Boshen wants to merge 2 commits into
mainfrom
feat/global-agent-setup
Open

Boshen wants to merge 2 commits into
mainfrom
feat/global-agent-setup

Conversation

@Boshen

@Boshen Boshen commented Sep 23, 2026

Copy link
Copy Markdown
Member

Adds a hosted agent setup prompt and global Vite+ skill, with one-click prompt copying. Closes #2781.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T05:25:50.876696Z 6ba33fb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-global-agent-setup-viteplus-dev.voidzero-docs.workers.dev (commit 6ba33fb)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://58f8e1fa-viteplus-dev.voidzero-docs.workers.dev 6ba33fb 2026-09-26T05:24:37.341Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e47635f1-viteplus-dev.voidzero-docs.workers.dev 92cb423 2026-09-25T14:13:03.850Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://00388f50-viteplus-dev.voidzero-docs.workers.dev 35e9a26 2026-09-25T13:35:30.031Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://90257ca1-viteplus-dev.voidzero-docs.workers.dev 2487b8a 2026-09-23T02:24:20.015Z Visit the dashboard ↗

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2487b8a2d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/vite-plus/SKILL.md Outdated
## Before Running Commands

- Follow repository-local agent instructions when present.
- Run `vp --version` to confirm the global CLI is available. If it is missing, point the user to https://viteplus.dev/guide/global-cli instead of silently substituting npm or another tool.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify the global CLI with the global toolchain

When this skill runs in a project where vp --version resolves a project-local Vite+ binary, the check succeeds even though the global CLI needed by this skill is absent. The new setup instructions explicitly state that only vp toolchain --global proves a global installation (docs/public/agent-setup/prompt.md:9), so use that check here as well; otherwise subsequent global-only commands such as vpx can fail after the skill incorrectly proceeds.

AGENTS.md reference: AGENTS.md:L9-L9

Useful? React with 👍 / 👎.

Comment thread docs/public/agent-setup/prompt.md Outdated
Find the current agent's identifier in the definitive [Supported Agents](https://github.com/vercel-labs/skills#supported-agents) table. Install the skill only for that agent; replace `<agent-id>` with its identifier and do not use `*`.

```bash
vp dlx skills add https://github.com/voidzero-dev/vite-plus/tree/main/skills/vite-plus --global --yes --agent <agent-id>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve the skill from the preview revision

When these instructions are served from a PR or other non-production docs deployment, this URL still downloads from main. This commit introduces skills/vite-plus for the first time, so the current PR preview points to a path that does not yet exist on main and the advertised setup fails at skills add; future previews can likewise install a skill version that does not match the preview. Use a revision-aware source or host the skill with the preview, consistent with the prompt's same-release handling.

AGENTS.md reference: AGENTS.md:L31-L35

Useful? React with 👍 / 👎.

@Boshen

Boshen commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

We need to test the prompt properly as it differs with the previous by a lot.

@Boshen
Boshen force-pushed the feat/global-agent-setup branch from 2487b8a to 35e9a26 Compare September 25, 2026 13:34
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 6ba33fb

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35e9a26377

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


### Existing project

Migrate this project to Vite+ while preserving its application, test, and library build behavior.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require consent before starting a project migration

When the homepage prompt is used only to install the advertised global CLI and skill from inside an existing non-Vite+ repository, these instructions provide no setup-only exit: the only matching existing-project flow immediately tells the agent to migrate the repository. This can modify dependencies and configuration without the user ever requesting adoption, and directly conflicts with skills/vite-plus/SKILL.md:30, which prohibits unrequested migrations. Stop after global setup unless creation, migration, or upgrade was explicitly requested, or ask the user before entering one of these flows.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92cb423017

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/vite-plus/SKILL.md Outdated

- Default to `vp create`; do not use `npm create`, `npx create-*`, or another package-manager-specific scaffold command unless the user explicitly requests it or `vp create` cannot run the requested source.
- Run `vp create --list` or read https://viteplus.dev/guide/create when choosing a template.
- Keep the template as the first argument. For shorthand and remote templates, pass their target and options after `--`; for example, `vp create vite -- web-app --template react-ts`. Use `--directory` for Vite+ built-in, local, and bundled organization templates.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pass local-template directories after --

When an agent runs a template registered in create.templates, this guidance makes it use the top-level --directory, but packages/cli/src/create/bin.ts:492-495 rejects that option for everything except built-ins and bundled organization templates. Local generators instead receive their directory option as a template argument (for example, the existing fixture uses vp create my-generator ... -- --directory missing-name), so following the new skill or matching guide text causes these scaffolds to exit before the template runs.

AGENTS.md reference: AGENTS.md:L33-L35

Useful? React with 👍 / 👎.

Comment on lines +35 to +36
let skillSource = 'https://github.com/voidzero-dev/vite-plus/tree/main/skills/vite-plus';
if (siteOrigin) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin the production skill to the deployed revision

The preview fix now pins revisions only inside if (siteOrigin), but production deployments deliberately leave siteOrigin empty and are built from the latest stable release commit (.github/workflows/release.yml:262-288). Consequently, the published prompt always installs from the moving main branch; after main changes the skill without another stable docs deployment, users of the stable site receive guidance that no longer matches its CLI or documentation. Use the available DOCS_GIT_SHA for production as well rather than the moving branch.

AGENTS.md reference: AGENTS.md:L33-L35

Useful? React with 👍 / 👎.

@Boshen

Boshen commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

I reviewed the setup prompt by use case and tested it with fresh Codex sessions in disposable directories. The explicit/implicit loading scenarios follow the official Codex skills guidance.

Fixes found through testing

  • vp --version can resolve a project-local binary, so the skill now verifies the global installation with vp toolchain --global.
  • A directly hosted SKILL.md installs but loses source metadata with skills@1.7.0, which breaks reliable updates/removal. Production now installs from the repository's main skill directory; previews use the exact repository and commit while also serving a byte-identical skill for inspection.
  • The documented Vite shorthand initially used an invalid target form. It is now vp create vite -- <target> --template react-ts, and --directory is documented only for the template types that support it.
  • Setup links, generated prompts, and docs deployments are preview-aware; skill-only changes now trigger docs deployment.

Scenario results

Scenario Result
Skill lifecycle In an isolated project-mode mirror of the global flow, GitHub-directory install, list, reinstall, update, and unfiltered removal passed; removal preserved an unrelated sentinel file.
Fresh Codex session Loaded the disposable vite-plus/SKILL.md and correctly selected vp toolchain --global for global verification.
New React TypeScript app vp create vite -- admin-app --template react-ts created the app; vp check and vp run build passed; vp test correctly reported no template test files.
Existing Vite+ app A separate fresh Codex session loaded the skill, ran vp install, and completed vp run build.
Migration Reviewed statically as scoped; no destructive migration was run against an unrelated project.

No real global agent configuration was changed during these tests.

Automated and deployed verification

  • node --test .github/scripts/__tests__/docs-fork-preview.mjs: 110/110 passed.
  • pnpm -C docs build: passed.
  • quick_validate.py skills/vite-plus: passed.
  • Workflow YAML parse and git diff --check: passed.
  • Staging setup prompt pins 92cb4230176d7e67e9d22fb2961aa992d8934e60.
  • The staging skill is byte-identical to skills/vite-plus/SKILL.md (sha256 ce7e9323e541fb0b38da0207e43a2867e44860abe3c99106630b300e7cba60ac).
  • vp dlx skills add https://github.com/voidzero-dev/vite-plus/tree/92cb4230176d7e67e9d22fb2961aa992d8934e60/skills/vite-plus --list found exactly one vite-plus skill.
  • The deployed guide links to the staging-origin prompt, and the staging deployment/helper checks pass.

The root vp check could not run locally because this checkout lacks vite/patches/dotenv-expand@13.0.0.patch, so the frozen workspace install cannot complete. The PR's remote Lint check passed.

@Boshen
Boshen force-pushed the feat/global-agent-setup branch from 92cb423 to 6ba33fb Compare September 26, 2026 05:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ba33fb3fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/guide/create.md
## Options

- `--directory <dir>` writes the generated project into a specific target directory
- `--directory <dir>` writes Vite+ built-in, local, and bundled organization templates into a specific target directory. For shorthand and remote templates, pass their target directory after `--` using that template's syntax.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove local templates from --directory support

Although the skill text was corrected, this new guide sentence still tells users of a registered create.templates generator to pass the top-level --directory. For that scenario, packages/cli/src/create/bin.ts:492-496 rejects the option because local templates are not direct scaffold templates; the existing snapshot fixture instead forwards --directory after --. Document local templates alongside shorthand and remote templates so their generator receives the directory argument.

AGENTS.md reference: AGENTS.md:L33-L35

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Establish a global Vite+ presence for coding agents

2 participants