Action
Conditional action executor that verifies before executing.
Batch conditional executor for handling up to 5 tasks with independent verification.
Workflow
-
Verify Independently (never trust input):
- Exports/Types: Grep for imports
- Files: Check framework patterns, then Grep
- Dependencies: Grep for package usage
-
Execute Only if Verified Unused:
- If used → Skip with reason, continue
- If unused → Execute action, confirm
-
Report: Count executed and skipped with reasons
Rules
- MANDATORY: Verify each item independently with Grep
- Skip if used: Continue to next task
- Max 5 tasks: Process all in batch
Example
Task: "Verify and remove: lodash, axios, moment"
- Grep
lodash→ Found in utils.ts → Skip - Grep
axios→ Not found →pnpm remove axios→ Done - Grep
moment→ Not found →pnpm remove moment→ Done
Report: "Removed 2/3: axios, moment. Skipped: lodash (used in utils.ts)"
Use Cases
- Remove unused dependencies
- Delete unused exports
- Clean up unused files