From harness-claude
Guides static ES module imports in React for build-time bundling, tree-shaking unused code, and predictable loading performance. Use for immediate module needs, small utilities, types, or constants.
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeThis skill uses the workspace's default tool permissions.
> Bundle all dependencies at build time for predictable loading performance
Guides use of static import declarations in JavaScript for tree-shaking unused exports, static analysis, IDE auto-imports, and bundler optimization with webpack, Vite, Rollup.
Provides React performance guidelines for bundle optimization, re-render reduction, hooks usage, and component composition during writing, reviewing, refactoring.
Applies Vercel Engineering's 57 React/Next.js performance rules to eliminate waterfalls, reduce bundle size, fix re-renders, and optimize data fetching when writing, reviewing, or refactoring code.
Share bugs, ideas, or general feedback.
Bundle all dependencies at build time for predictable loading performance
import syntax at the top of the file.index.ts re-exporting everything) when tree-shaking matters.// Good: named import, tree-shakeable
import { formatDate } from 'date-fns';
// Good: specific internal module
import { Button } from '@/components/Button';
// Avoid for large libraries when only one function is needed
import _ from 'lodash'; // pulls entire lodash into bundle
import { debounce } from 'lodash'; // only debounce
Static imports are resolved at build time by the bundler (Webpack, Vite, esbuild). The bundler builds a dependency graph and includes all statically imported modules in the bundle.
Tree-shaking: Dead code elimination — if you import a named export but never use it, the bundler can eliminate it (with sideEffects: false in package.json and named imports). Side-effecting imports (CSS, polyfills) should not be tree-shaken.
When to switch to dynamic import:
https://patterns.dev/react/static-import