SuperAPI AI Directory

starter-cleaner

General & other

View repository

Updated 10-15 23:41

About this skill

Starter Cleaner

Use the deterministic script provided with the skill to clean up wot-starter v2, keeping the basic 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, 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 runs:

  • 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.
  • Keep the uni-echarts、echarts dependencies and related Vite configuration so the business can continue using 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 after the user explicitly confirms the target project, use --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.