SuperAPI AI Directory

starter-cleaner

Coding & development

View repository

Updated 11-03 16:15

About this skill

Starter Cleaner

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

Execution flow

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

  2. If the user has not yet explicitly requested execution of 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. Confirm the target is wot-starter v2 before executing. The script will delete the old src/pages.json, then run pnpm dev:h5in a controlled manner, and exit the dev server after the new minimal src/pages.json is generated:

    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 diff after cleanup, and clearly inform the user of the validations that were not run.

Cleanup scope

The script performs the following operations and supports repeated execution:

  • Delete docs/、src/subPages/、src/subEcharts/、src/subAsyncEcharts/。
  • Delete the old src/pages.json, then trigger pnpm dev:h5 via 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.
  • Retain the uni-echarts、echarts dependency and related Vite configuration, so that the business can continue to use charts.

Safety constraints

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