Xpersona
M

modular-skills

CLAWHUB · Unverified

Build composable skill modules with hub-and-spoke loading Skill: modular-skills Owner: athola Summary: Build composable skill modules with hub-and-spoke loading Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:03:42.167Z | user Release v1.9.19 v1.9.18 | 2026-08-15T21:28:01.239Z | user Release v1.9.18 v1.9.17 | 2026-07-30T05:27:54.476Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:44:51.872Z | user Release v1.9.16 v1.9.15 | 2026-07-04T21:19:25.040Z | user Releas

62
Rank
84
Safety
1.7k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-abstract-modular-skills
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-abstract-modular-skills/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

146,762 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: modular-skills
description: Build composable skill modules with hub-and-spoke loading
version: 1.9.8
triggers:
  - architecture
  - modularity
  - tokens
  - skills
  - design-patterns
  - skill-design
  - token-optimization
  - token budget is tight
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/abstract", "emoji": "\ud83e\udd9e"}}
source: claude-night-market
source_plugin: abstract
---

> **Night Market Skill** — ported from [claude-night-market/abstract](https://github.com/athola/claude-night-market/tree/master/plugins/abstract). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


## Table of Contents

- [Overview](#overview)
- [Quick Start](#quick-start)
- [Workflow and Tasks](#workflow-and-tasks)
- [Quality Checks](#quality-checks)
- [Resources](#resources)


# 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.
```bash
python scripts/

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-abstract-modular-skills",
  "version": "1.9.19",
  "publishedAt": 1787749422167
}

modules/antipatterns-and-migration.md

---
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 repeated across multiple skills.
- There are complex import chains.
- It's not clear when to use specific modules.

## Migration Guide

If you have existing skills that are not as modular as they could be, you can use this guide to help you migrate them to our modular design patterns.

### Converting Existing Skills

1.  **Analyze**: The first step is to run a complexity analysis on the existing skill. This will help you identify the different themes and concerns that are covered by the skill.
2.  **Extract**: Once you've identified the different themes, you can start to extract them into separate modules with clear boundaries.
3.  **Modularize**: Now you can create the new modular structure, with a hub skill and separate modules for each theme.
4.  **Document**: It's important to update all the references and call patterns to reflect the new modular structure.
5.  **Validate**: Finally, you should test the new modular structure to make sure everything is working as expected.

### Maintaining Compatibility

During the transition, we recommend maintaining the original skill as a hub. This will validate that existing workflows that depend on the original skill continue to work. You should also provide documentation that explains the new modular structure and how to use it.

We recommend testing both 

modules/core-workflow.md

---
name: core-workflow
description: Primary workflow for designing and building modular skills with systematic evaluation and architecture patterns
category: workflow
tags: [core-workflow, modular-skills, skill-design, architecture, evaluation]
dependencies: [modular-skills]
tools: [skill-analyzer]
complexity: intermediate
estimated_tokens: 800
---

# The Core Workflow for Modular Skills

This is our core workflow for designing and building modular skills. We follow this process to validate that our skills are well-designed, maintainable, and efficient.

## Phase 1: Evaluating the Scope

Before we start building, we first evaluate the scope of the skill. This helps us decide if the skill should be modularized and how it fits into our existing skill architecture.

### Complexity Analysis

The first step is to analyze the complexity of the proposed skill. We use the `skill-analyzer` tool to help with this.

```bash
skill-analyzer --path path/to/skill --threshold 150
```

We look at a few key metrics:

- **Line count**: If the skill is more than 150 lines, it's a good candidate for modularization.
- **Theme coverage**: If the skill covers more than three distinct themes, we'll break it up.
- **Token footprint**: A skill with a token footprint of more than 2KB is another sign that it should be modularized.
- **Overlap detection**: If the skill shares workflows with other skills, we'll look for opportunities to extract those shared workflows into a separate module.

### Dependency Mapping

Next, we map out any existing workflows that could be shared. This includes things like:

- ADR templates and processes
- Git workflows (commit messages, PR templates, review patterns)
- Testing patterns (unit, integration, and end-to-end)
- Documentation standards

### Token Usage Estimation

Finally, we estimate the token usage of the proposed skill. The `token-estimator` tool can help with this.

```bash
token-estimator --file skill.md --include-dependencies
```

## Phase 2: Designing the Module Architecture

Once we've evaluated the scope, we move on to designing the module architecture.

### The Hub-and-Spoke Pattern

We use a "hub-and-spoke" pattern for our modular skills. This means we have a primary "hub" skill that contains the core metadata and an overview, and then optional "spoke" submodules that contain more detailed information.

This is an example of the structure:

```
skill-category/
├── SKILL.md (this is the hub, with metadata and an overview)
├── guide.md (this is a spoke, with a detailed workflow)
├── scripts/ (this is a spoke, with related scripts)
│   ├── analyzer.py
│   └── validator.py
└── examples/ (this is a spoke, with examples)
    ├── basic-implementation/
    └── advanced-patterns/
```

### Naming Conventions

We use consistent prefixes for our skills to make them easier to find and understand. For example:

- `architecture-paradigm-*` for architectural patterns
- `testing-*` for testing workflows
- `documentation-*` for documentation 

modules/design-patterns.md

# Design Patterns

Placeholder module for the `modular-skills` skill.

This module is referenced from neighbouring documentation but
its content has not yet been written. Contributions welcome -
see the parent `SKILL.md` for the skill's overall purpose and
the role this module is expected to play.

Sponsored

Ads related to modular-skills and adjacent AI workflows.