# Barrel Pattern
A module that re-exports a group of related modules through a single entry point. Consumers import the barrel instead of each individual module. Common in JavaScript/TypeScript (`index.ts` files) and applicable to AI skill architecture.
## In software
```typescript
// utils/index.ts (barrel)
export { formatDate } from './date';
export { parseUrl } from './url';
export { slugify } from './string';
// consumer.ts
import { formatDate, parseUrl, slugify } from './utils';
```
The consumer does not need to know the internal structure. The barrel is a Facade: it hides complexity behind a single import.
## In AI skills
AI skills that share the same dependencies form clusters. Without barrels, each skill independently loads the same set of context loaders. With barrels, a single meta-skill loads the shared set.
**Before** (each of 17 content skills repeats this):
- Load seb-writing
- Load seb-products
- Load osk-vault-note-types
**After** (one barrel, 17 skills load it):
- Barrel `developassion-content-context` loads seb-writing + seb-products + osk-vault-note-types
- Each content skill loads `developassion-content-context`
This applies the [[Don't Repeat Yourself (DRY) principle]] to skill dependencies. Change a shared dependency in one place; every skill in the cluster gets the update.
## Identified clusters
| Cluster | Shared dependencies | Skills affected |
|---------|-------------------|----------------|
| DeveloPassion content | seb-writing, seb-products, osk-vault-note-types | 17+ |
| Readwise | readwise-access | 28 |
| Vault operations | osk-vault-note-types, osk-obsidian-cli | 89+ |
## References
-
## Related
- [[Don't Repeat Yourself (DRY) principle]]
- [[Composition over Inheritance]]
- [[AI Skill Composability]]
- [[Loose Coupling]]
- [[Software Design Patterns for AI Skills and Agents]]