Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Standardized guidelines for defining and enforcing boundaries between features to prevent tight coupling. Use when scaling applications, preventing circular dependencies, and maintaining module independence.
.claude/skills/valec3-frontend-architecture-feature-boundaries/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 112% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-23 | ✗→✓ | ▲ Improved | 48% | 0% |
Rule 1: No Direct Cross-Feature Imports
typescript// ❌ BAD: Direct import from another feature import { ProductCard } from '../../products/components/ProductCard'; // ✅ GOOD: Import from public API import { ProductCard } from '@features/products';
Rule 2: Public API Pattern
typescript// features/products/index.ts (Public API) // Only export what other features need export { ProductCard } from './components/ProductCard'; export { useProducts } from './hooks/useProducts'; export type { Product } from './types'; // DON'T export internal helpers // ❌ export { internal Helper } from './utils';
Rule 3: Shared Kernel
src/
├── features/
│ ├── products/
│ ├── cart/
│ └── checkout/
├── shared/ # Shared Kernel
│ ├── types/
│ │ └── common.types.ts
│ ├── components/
│ │ └── Button.tsx
│ └── utils/
└── core/ # Framework codejavascript// .eslintrc.js module.exports = { rules: { 'import/no-restricted-paths': ['error', { zones: [ { target: './src/features/products', from: './src/features/cart', message: 'Products cannot import from Cart' }, { target: './src/features/*', from: './src/features/*', except: ['./index.ts'], message: 'Must use public API (index.ts)' } ] }] } };
1. Events (Decoupled)
typescript// features/cart/index.ts export const cartEvents = { itemAdded: (productId: string) => { window.dispatchEvent(new CustomEvent('cart:item-added', { detail: { productId } })); } }; // features/analytics/index.ts window.addEventListener('cart:item-added', (e) => { trackEvent('cart_add', e.detail); });
2. Shared State (Zustand)
typescript// shared/store/cartStore.ts export const useCartStore = create<CartState>((set) => ({ items: [], addItem: (item) => set((state) => ({ items: [...state.items, item] })) })); // Any feature can use the store import { useCartStore } from '@shared/store/cartStore';
3. Context/Props (Direct)
typescript// Only when features have parent-child relationship <CheckoutFeature cartItems={cartItems} />
┌─────────────┐
│ Shared │
│ Kernel │
└──────┬──────┘
│
┌───┴───┬───────┬────────┐
│ │ │ │
┌──▼───┐ ┌─▼────┐ ┌▼─────┐ ┌▼──────┐
│ Auth │ │ Cart │ │ Shop │ │ Admin │
└──────┘ └──────┘ └──────┘ └───────┘
↑ ↑ ↑ ↑
└───────┴───────┴────────┘
No cycles!| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 12,588 | 9,892 | -21% | 1 | 1 | 0% | 2,538 | 2,969 | +17% | 0 | 0 | — |
case-02 | fail→fail | 16,292 | 13,181 | -19% | 1 | 1 | 0% | 3,288 | 3,675 | +12% | 0 | 0 | — |
case-03 | pass→pass | 5,392 | 4,993 | -7% | 1 | 1 | 0% | 961 | 1,846 | +92% | 0 | 0 | — |
case-04 | fail→pass | 3,802 | 3,002 | -21% | 1 | 1 | 0% | 701 | 1,487 | +112% | 0 | 0 | — |
case-05 | pass→pass | 12,376 | 8,527 | -31% | 1 | 1 | 0% | 2,383 | 2,791 | +17% | 0 | 0 | — |
case-06 | pass→pass | 9,181 | 8,039 | -12% | 1 | 1 | 0% | 1,560 | 2,605 | +67% | 0 | 0 | — |
case-07 | fail→pass | 12,902 | 8,357 | -35% | 1 | 1 | 0% | 2,678 | 2,625 | -2% | 0 | 0 | — |
case-08 | pass→pass | 12,936 | 5,804 | -55% | 1 | 1 | 0% | 1,785 | 2,003 | +12% | 0 | 0 | — |
case-09 | fail→pass | 7,300 | 4,877 | -33% | 1 | 1 | 0% | 1,365 | 1,919 | +41% | 0 | 0 | — |
case-10 | pass→pass | 8,725 | 3,797 | -56% | 1 | 1 | 0% | 1,375 | 1,633 | +19% | 0 | 0 | — |
case-11 | pass→pass | 8,623 | 6,329 | -27% | 1 | 1 | 0% | 1,471 | 2,096 | +42% | 0 | 0 | — |
case-12 | pass→pass | 10,272 | 7,066 | -31% | 1 | 1 | 0% | 1,725 | 2,208 | +28% | 0 | 0 | — |
case-13 | pass→pass | 3,425 | 2,348 | -31% | 1 | 1 | 0% | 475 | 1,397 | +194% | 0 | 0 | — |
case-14 | fail→fail | 18,989 | 8,410 | -56% | 1 | 1 | 0% | 3,591 | 2,633 | -27% | 0 | 0 | — |
case-15 | pass→pass | 11,895 | 2,016 | -83% | 1 | 1 | 0% | 1,145 | 1,264 | +10% | 0 | 0 | — |
case-16 | pass→pass | 10,678 | 6,931 | -35% | 1 | 1 | 0% | 2,042 | 2,175 | +7% | 0 | 0 | — |
case-17 | pass→pass | 8,785 | 6,470 | -26% | 1 | 1 | 0% | 1,975 | 2,342 | +19% | 0 | 0 | — |
case-18 | fail→pass | 5,671 | 4,092 | -28% | 1 | 1 | 0% | 1,042 | 1,657 | +59% | 0 | 0 | — |
case-19 | pass→pass | 3,224 | 2,845 | -12% | 1 | 1 | 0% | 653 | 1,467 | +125% | 0 | 0 | — |
case-20 | pass→pass | 14,608 | 13,347 | -9% | 1 | 1 | 0% | 3,132 | 3,292 | +5% | 0 | 0 | — |
case-21 | pass→pass | 11,186 | 10,594 | -5% | 1 | 1 | 0% | 2,221 | 3,205 | +44% | 0 | 0 | — |
case-22 | pass→pass | 11,082 | 6,836 | -38% | 1 | 1 | 0% | 2,380 | 2,409 | +1% | 0 | 0 | — |
case-23 | fail→pass | 10,973 | 10,142 | -8% | 1 | 1 | 0% | 2,247 | 3,330 | +48% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +22 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.