Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Modular Skills

  • 104 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

Modular Skills is an agent skill that teaches hub-and-spoke modular SKILL.md architecture with step-by-step implementation patterns.

About

Modular Skills (modular-skills-guide) is an implementation guide for solo builders who outgrow monolithic SKILL.md files and need a predictable folder contract agents can navigate. It teaches the hub-and-spoke architecture: a slim hub carrying metadata and overview, with optional spoke files for deep workflow steps, patterns, anti-patterns, and migration notes. The documented layout also wires Python helpers for skill analysis and token budgeting, plus basic and advanced example trees you can mirror in your own marketplace repo. Reach for it when you are designing a new multi-file skill, refactoring a bloated skill into modules, or onboarding collaborators on Night Market-style conventions. It depends conceptually on the parent modular-skills hub skill listed in frontmatter dependencies. The payoff is easier updates, clearer agent loading boundaries, and less surprise context burn when only one submodule is needed for a task.

  • 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

Modular Skills by the numbers

  • 104 all-time installs (skills.sh)
  • Ranked #261 of 782 Skill Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill modular-skills

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs104
repo stars325
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Learn hub-and-spoke modular SKILL.md layout so large agent skills stay maintainable and token-efficient.

Who is it for?

Skill authors implementing or migrating to modular hub-and-spoke repos with analyze and token helper scripts.

Skip if: Skip if you 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 you get

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

By the numbers

  • ~600 estimated tokens for the guide spoke
  • Example hub tree with 3 named module spokes plus 2 example directories

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Modular Skills Design

Overview

This framework breaks complex skills into focused modules to keep token usage predictable and avoid monolithic files. We use progressive disclosure: starting with essentials and loading deeper technical details via @include or Load: statements only when needed. This approach prevents hitting context limits during long-running tasks.

Modular design keeps file sizes within recommended limits, typically under 150 lines. Shallow dependencies and clear boundaries simplify testing and maintenance. The hub-and-spoke model allows the project to grow without bloating primary skill files, making focused modules easier to verify in isolation and faster to parse.

Core Components

Three tools support modular skill development:

  • skill-analyzer: Checks complexity and suggests where to split code.
  • token-estimator: Forecasts usage and suggests optimizations.
  • module_validator: Verifies that structure complies with project standards.

Design Principles

We design skills around single responsibility and loose coupling. Each module focuses on one task, minimizing dependencies to keep the architecture cohesive. Clear boundaries and well-defined interfaces prevent changes in one module from breaking others. This follows Anthropic's Agent Skills best practices: provide a high-level overview first, then surface details as needed to maintain context efficiency.

Module Ownership (IMPORTANT)

Deprecated: skills/shared/modules/ directories. This pattern caused orphaned references when shared modules were updated or removed.

Current pattern: Each skill owns its modules at skills/<skill-name>/modules/. When multiple skills need the same content, the primary owner holds the module and others reference it via relative path (e.g., ../skill-authoring/modules/anti-rationalization.md). The validator flags any remaining skills/shared/ directories.

Quick Start

Skill Analysis

Analyze modularity using scripts/analyze.py. You can set a custom threshold for line counts to identify files that need splitting.

python scripts/analyze.py --threshold 100

From Python, use analyze_skill from abstract.skill_tools.

Token Usage Planning

Estimate token consumption to verify your skill stays within budget. Run this from the skill directory:

python scripts/tokens.py

Module Validation

Check for structure and pattern compliance before deployment.

python scripts/abstract_validator.py --scan

Workflow and Tasks

Start by assessing complexity with skill_analyzer.py. If a skill exceeds 150 lines, break it into focused modules following the patterns in ../../docs/examples/modular-skills/. Use token_estimator.py to check efficiency and abstract_validator.py to verify the final structure. This iterative process maintains module maintainability and token efficiency.

Quality Checks

Identify modules needing attention by checking line counts and missing Table of Contents. Any module over 100 lines requires a TOC after the frontmatter to aid navigation.

# Find modules exceeding 100 lines
find modules -name "*.md" -exec wc -l {} + | awk '$1 > 100'

Standards Compliance

Our standards prioritize concrete examples and a consistent voice. Always provide actual commands in Quick Start sections instead of abstract descriptions. Use third-person perspective (e.g., "the project", "developers") rather than "you" or "your". Each code example should be followed by a validation command. For discoverability, descriptions must include at least five specific trigger phrases.

TOC Template

## Table of Contents

- [Section Name](#section-name)
- [Examples](#examples)
- [Troubleshooting](#troubleshooting)

Resources

Shared Modules: Cross-Skill Patterns

Standard patterns for triggers, enforcement language, and anti-rationalization:

  • Trigger Patterns: See trigger-patterns.md
  • Enforcement Language: See enforcement-language.md
  • Anti-Rationalization: See anti-rationalization.md

Skill-Specific Modules

Detailed guides for implementation and maintenance:

  • Enforcement Patterns: See modules/enforcement-patterns.md
  • Core Workflow: See modules/core-workflow.md
  • Implementation Patterns: See modules/implementation-patterns.md
  • Migration Guide: See modules/antipatterns-and-migration.md
  • Design Philosophy: See modules/design-philosophy.md
  • Troubleshooting: See modules/troubleshooting.md
  • Optimization Techniques: See modules/optimization-techniques.md - reducing large skill file sizes through externalization, consolidation, and progressive loading

Tools and Examples

  • Tools: skill_analyzer.py, token_estimator.py, and abstract_validator.py in ../../scripts/.
  • Examples: See ../../docs/examples/modular-skills/ for reference implementations.

Related skills

How it compares

Architecture guide for SKILL.md packaging, not a runtime MCP server or generic markdown linter.

FAQ

Who is modular-skills for?

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.

Skill Developmentagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.