SuperAPI AI Directory

starter-cleaner

Frontend & websites

View repository

Updated 10-16 04:41

About this skill

Starter Cleaner

Use the deterministic script provided with the skill to clean up wot-starter v2, keeping the base pages, Wot UI,uni-echarts and echarts capabilities.

Execution Flow

  1. Run in the project root git status --short, confirm and inform the user that uncommitted changes will be preserved, but changes in the directories to be cleaned up will be deleted along with the directories.

  2. If the user has not yet explicitly requested the cleanup, first explain that this is a destructive operation and obtain confirmation.

  3. First preview the cleanup plan:

    node .agents/skills/starter-cleaner/scripts/clean.js --dry-run
    
  4. After confirming the target is wot-starter v2, execute. The script will delete the old src/pages.json, then run in a controlled manner pnpm dev:h5, wait for the new minimal src/pages.json to be generated, then exit the dev server:

    node .agents/skills/starter-cleaner/scripts/clean.js
    
  1. Run pnpm install --lockfile-only to update the lockfile, then run pnpm type-check and pnpm lint. If dependencies are unavailable, at least check git diff --check and the post-cleanup diff, and clearly inform the user of the validations that were not run.

Cleanup Scope

The script performs the following operations and supports repeated runs:

  • Delete docs/、src/subPages/、src/subEcharts/、src/subAsyncEcharts/。
  • Delete the old src/pages.json, then via pnpm dev:h5 trigger vite-plugin-uni-pages to regenerate the minimal page configuration.
  • Delete pnpm-workspace.yaml, restoring the project from a docs workspace to a single-package project.
  • From vite.config.ts 's UniHelperPages configuration, remove the above three example subpackage entries.
  • From package.json remove the docs:* and lint:docs scripts.
  • Keep the uni-echarts、echarts dependency and related Vite configuration, so the business can continue to use charts.

Safety Constraints

  • Do not directly concatenate or extend deletion paths; use only the fixed list within the script.
  • Do not run in a non- wot-starter v2 project. Only use after the user has explicitly confirmed the target project --force to skip the project identity check.
  • Do not use --force to bypass the uncommitted changes prompt; this parameter is only used for the project identity check.