返回 Skill 列表
extension
分类: 开发与工程无需 API Key

clean-project

执行开发环境的“硬重置”。当依赖项损坏、锁文件不同步或环境工具(Trunk/pnpm)状态不一致时使用。

person作者: jakexiaohubgithub

Clean Project (Hard Reset)

This skill provides a destructive but thorough way to repair a "broken" development environment by removing all cached artifacts and re-initializing from scratch.

When to Use

  • pnpm install fails repeatedly with checksum or resolution errors.
  • trunk reports internal errors that persist after trunk install.
  • "Ghost" errors occur (failures that don't match the current code).

Workflow

  1. Clean Dependencies:

    • Recursively delete node_modules: find . -name "node_modules" -type d -prune -exec rm -rf '{}' +.
    • Remove global lockfile: rm pnpm-lock.yaml.
  2. Clean Tooling Cache:

    • Clear Trunk cache: trunk clean.
    • Prune pnpm store: pnpm store prune.
  3. Re-initialize Environment:

    • Invoke the setup-dev-env skill to reinstall everything.
  4. Verify Health:

Safety Note

This process is destructive to the local environment but safe for the repository. It will require a full download of all dependencies, which may take several minutes depending on network speed.

Resources