
Modular Skills
Learn hub-and-spoke modular SKILL.md layout so large agent skills stay maintainable and token-efficient.
Overview
Modular Skills is an agent skill most often used in Build (also Build docs, Validate scope) that teaches hub-and-spoke modular SKILL.md architecture with step-by-step implementation patterns.
Install
npx skills add https://github.com/athola/claude-night-market --skill modular-skillsWhat is this skill?
- Explains hub-and-spoke pattern: hub SKILL.md plus spoke modules under modules/
- Maps example tree with core-workflow, implementation-patterns, and antipatterns-and-migration spokes
- Points to scripts/analyze.py and scripts/tokens.py wrappers for analysis and token estimation
- Includes examples/basic-implementation and examples/advanced-patterns for copyable layouts
- Tagged intermediate complexity with ~600 estimated tokens for the guide spoke itself
- Example hub tree with 3 named module spokes plus 2 example directories
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your agent skills are one huge SKILL.md file, so edits are brittle and agents load more context than each task needs.
Who is it for?
Skill authors implementing or migrating to modular hub-and-spoke repos with analyze and token helper scripts.
Skip if: Builders who only need a single-purpose 50-line skill with no submodules or shared patterns.
When should I use this skill?
Learning modular skill design, understanding hub-and-spoke architecture, or following step-by-step implementation tutorials.
What do I get? / Deliverables
You can split skills into a hub plus spoke modules, optional scripts, and examples following a maintainable directory contract.
- Hub-and-spoke directory plan for a skill repo
- Mapped spoke files (workflow, patterns, anti-patterns/migration) and optional script wrappers
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Modular skill architecture is authored while building agent tooling—the first commitment point before docs and ship-time skill packs proliferate. Agent-tooling is where SKILL.md structure, submodules, and wrapper scripts are designed for Claude/Cursor skill repos.
Where it fits
Estimate whether a planned skill should be one hub or multiple spokes before you write implementation detail.
Scaffold modules/core-workflow.md and implementation-patterns.md from the reference tree.
Author guide.md and examples/ so marketplace users know which spoke to load.
Review antipatterns-and-migration.md before publishing a breaking skill restructure.
How it compares
Architecture guide for SKILL.md packaging, not a runtime MCP server or generic markdown linter.
Common Questions / FAQ
Who is modular-skills for?
Indie agent-skill authors learning modular design, hub-and-spoke layouts, and implementation tutorials aligned with the modular-skills dependency skill.
When should I use modular-skills?
Use it in Build agent-tooling when designing a new multi-module skill, in Build docs when documenting spoke files, and in Validate scope when deciding how big a skill should be before you commit to structure.
Is modular-skills safe to install?
It is documentation-forward; any bundled analyze.py or tokens.py wrappers should be reviewed like normal repo scripts—check the Security Audits panel on this page.
Workflow Chain
Requires first: modular skills
SKILL.md
READMESKILL.md - Modular Skills
# A Guide to Implementing Modular Skills This guide details the implementation of modular skills. Breaking skills into smaller, manageable modules creates a maintainable and predictable architecture. ## The Hub-and-Spoke Structure The framework uses a "hub-and-spoke" pattern for modular skills. A primary "hub" skill contains core metadata and an overview, while optional "spoke" submodules contain detailed information. Structure example: ``` modular-skills/ ├── SKILL.md (this is the hub, with metadata and an overview) ├── guide.md (this file, which provides an overview of the modules) ├── modules/ │ ├── core-workflow.md (for designing new skills) │ ├── implementation-patterns.md (for implementing skills) │ └── antipatterns-and-migration.md (for migrating existing skills) ├── scripts/ │ ├── analyze.py (Python wrapper for skill analysis) │ └── tokens.py (Python wrapper for token estimation) └── examples/ ├── basic-implementation/ └── advanced-patterns/ ``` Note: The scripts directory contains Python wrappers that use the shared `abstract.skill_tools` module, eliminating code duplication while providing convenient CLI access from within skill directories. This modular structure reduces token usage. The core workflow consumes approximately 300 tokens, loading other modules on-demand. ## How to Use the Modules - **For new skills**, start with `core-workflow.md` to evaluate scope and design the module architecture. Then, refer to `implementation-patterns.md` for implementation guidance. - **For migrating existing skills**, start with `antipatterns-and-migration.md` to identify common anti-patterns and plan the migration. - **For troubleshooting**, refer to `antipatterns-and-migration.md` for common issues and solutions. Concrete examples of modular design patterns are available in the `examples/` directory. --- name: antipatterns-and-migration description: Common anti-patterns in modular skill development and migration strategies for improving existing monolithic skills category: refactoring tags: [antipatterns, migration, modular-skills, refactoring, best-practices] dependencies: [modular-skills] tools: [skill-analyzer] complexity: advanced estimated_tokens: 1000 --- # Modular Skills Anti-Patterns and Migration This document covers the common anti-patterns we've seen when building modular skills, and how to migrate away from them. ## Anti-Patterns to Avoid When we first started building skills, we made a few mistakes. Here are some of the things we learned to avoid. - **Monolithic Skills**: We used to have single, large files that covered multiple themes. This made them difficult to maintain and understand. - **Deeply Nested Modules**: We also had complex dependency chains, with modules that depended on other modules, which in turn depended on other modules. This made it hard to track dependencies and led to a lot of complexity. - **Implicit Dependencies**: We didn't always declare our dependencies explicitly. This made it difficult to know what a skill needed to run. - **Content Duplication**: Instead of referencing shared content, we would copy it between modules. This led to a lot of duplicated effort and inconsistencies. - **Poor Naming**: Our naming conventions were inconsistent, which made it hard to find and understand our skills. ### Warning Signs Here are a few warning signs that a skill might not be as modular as it could be: - The skill file is larger than 2KB. - The skill covers more than three main themes. - The same instructions are r