Agent skill
clean-project
Perform a "hard reset" of the development environment. Use when dependencies are corrupted, lockfiles are out of sync, or environment tools (Trunk/pnpm) are in an inconsistent state.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/clean-project
SKILL.md
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 installfails repeatedly with checksum or resolution errors.trunkreports internal errors that persist aftertrunk install.- "Ghost" errors occur (failures that don't match the current code).
Workflow
-
Clean Dependencies:
- Recursively delete
node_modules:find . -name "node_modules" -type d -prune -exec rm -rf '{}' +. - Remove global lockfile:
rm pnpm-lock.yaml.
- Recursively delete
-
Clean Tooling Cache:
- Clear Trunk cache:
trunk clean. - Prune pnpm store:
pnpm store prune.
- Clear Trunk cache:
-
Re-initialize Environment:
- Invoke the
setup-dev-envskill to reinstall everything.
- Invoke the
-
Verify Health:
- Invoke the
verifiersubagent (../../agents/verifier.md) to ensure the project is back to a clean, working state.
- Invoke the
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
- pnpm Commands for Node.js: Common pnpm maintenance commands.
- Trunk CLI Reference: Commands for managing Trunk artifacts.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?