/tree-shake
Improve tree shaking effectiveness to reduce bundle size.
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/tree-shake
Context preview
What this command does when you run it.
Improve tree shaking effectiveness to reduce bundle size.
Command definition
tree-shake.mdname: tree-shake
description: Improve tree shaking effectiveness to reduce bundle size.
/tree-shake - Optimize Tree Shaking
Improve tree shaking effectiveness to reduce bundle size.
Steps
1. Analyze the current build configuration for tree shaking settings 2. Check package.json for sideEffects field configuration 3. Identify imports that prevent tree shaking: namespace imports, CommonJS requires 4. Find barrel files (index.ts re-exports) that bundle entire modules 5. Check for packages that do not support tree shaking (no ES modules) 6. Convert namespace imports to named imports where possible 7. Add sideEffects: false to package.json if all modules are pure 8. Configure the bundler to mark specific files as side-effect-free 9. Replace non-tree-shakeable packages with tree-shakeable alternatives 10. Split barrel files into direct imports for large modules 11. Rebuild and measure the size difference 12. Report: modules eliminated, size reduction, remaining issues
Rules
- Never mark files with side effects as side-effect-free
- Verify that tree shaking does not remove needed code
- Prefer named imports over namespace imports for better tree shaking
- Check that all internal packages have proper ESM exports
- Do not break the public API of packages when restructuring exports
- Test the application thoroughly after tree shaking changes
- Document any sideEffects configuration with comments explaining why
Read more
name: tree-shake description: Improve tree shaking effectiveness to reduce bundle size.
/tree-shake - Optimize Tree Shaking
Improve tree shaking effectiveness to reduce bundle size.
Steps
1. Analyze the current build configuration for tree shaking settings 2. Check package.json for sideEffects field configuration 3. Identify imports that prevent tree shaking: namespace imports, CommonJS requires 4. Find barrel files (index.ts re-exports) that bundle entire modules 5. Check for packages that do not support tree shaking (no ES modules) 6. Convert namespace imports to named imports where possible 7. Add sideEffects: false to package.json if all modules are pure 8. Configure the bundler to mark specific files as side-effect-free 9. Replace non-tree-shakeable packages with tree-shakeable alternatives 10. Split barrel files into direct imports for large modules 11. Rebuild and measure the size difference 12. Report: modules eliminated, size reduction, remaining issues
Rules
- Never mark files with side effects as side-effect-free
- Verify that tree shaking does not remove needed code
- Prefer named imports over namespace imports for better tree shaking
- Check that all internal packages have proper ESM exports
- Do not break the public API of packages when restructuring exports
- Test the application thoroughly after tree shaking changes
- Document any sideEffects configuration with comments explaining why
The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.
Repo: rohitg00/awesome-claude-code-toolkit
Other commands on rohitg00-claude-code-toolkit.
- /adr
Write an Architecture Decision Record documenting a significant technical decision.
Open command - /design-review
Conduct a structured design review of a module, feature, or system component.
Open command - /diagram
Generate Mermaid diagrams from codebase analysis or description.
Open command - /migrate
Plan and execute a framework or library migration incrementally.
Open command - /plan
Create a structured implementation plan for the requested feature or change.
Open command - /refactor
Perform a systematic refactoring of the specified code area.
Open command

