Agent skill

Modular Skills

by athola in athola/claude-night-market

Build composable skill modules with hub-and-spoke loading. An agent skill from athola/claude-night-market.

MITAuto-check passedAI & LLM Engineering

Install Modular Skills

skills CLI
$ npx skills add athola/claude-night-market --skill modular-skills -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market modular-skills --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/abstract/skills/modular-skills .claude/skills/modular-skills && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
modular-skills
GitHub stars
341
Token cost
~1.6k tokens
SKILL.md length
607 words
Files
11
Skills in repo
152
Repo updated
First seen
Licence
MIT

At a glance

Build composable skill modules with hub-and-spoke loading. An agent skill from athola/claude-night-market.

  • Token budget is tight
  • SKILL.md covers When NOT To Use, Overview, Quick Start and Workflow and Tasks, plus 3 more sections
  • Calls python
  • Tasks that involve LLM cost and token optimization

What it does

Modular Skills is an agent skill from athola/claude-night-market. Build composable skill modules with hub-and-spoke loading. Use when token budget is tight.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files (for example `README.md`, `guide.md` and `modules/antipatterns-and-migration.md`).

It sits in AI & LLM Engineering, covering LLM cost and token optimization. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Token budget is tight
  • Tasks that involve LLM cost and token optimization

Example prompts

  • “/modular-skills”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Modular Skills loads about 1.6k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 607 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 607 words, ~1,565 tokens.

Download SKILL.mdSave it as .claude/skills/modular-skills/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
modular-skills
description
Build composable skill modules with hub-and-spoke loading. Use when token budget is tight.
alwaysApply
false
category
workflow-optimization
tags
architecture, modularity, tokens, skills, design-patterns, skill-design, token-optimization
usage_patterns
skill-design, architecture-review, token-optimization, refactoring-workflows
complexity
intermediate
model_hint
standard
estimated_tokens
1200
modules
modules/antipatterns-and-migration.md, modules/core-workflow.md, modules/design-philosophy.md, modules/enforcement-patterns.md…

When NOT To Use

  • A single-file skill already inside its token budget (use abstract:skill-authoring)
  • The lazy-loading contract itself (use leyline:progressive-loading)

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/description-writing.md). The validator flags any remaining skills/shared/ directories.

Quick Start

Skill Analysis

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

bash
python scripts/skill_analyzer.py --file path/to/SKILL.md --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:

bash
python scripts/tokens.py
Module Validation

Check for structure and pattern compliance before deployment.

bash
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 modules/implementation-patterns.md. 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.

Show full SKILL.md (242 more words)Show less

Quality Checks

Identify modules needing attention by checking line counts. A module over 100 lines is a candidate for a split. Do not add a Table of Contents: an anchor list restates the headings below it and costs tokens on every load, and grep finds the headings directly.

bash
# 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.

Resources

Shared Modules: Cross-Skill Patterns

Standard patterns for triggers and for deciding whether a skill applies:

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
  • Tools: skill_analyzer.py, token_estimator.py, and abstract_validator.py in ../../scripts/.

Exit Criteria

  • Every module file produced is at or under 150 lines, and no SKILL.md or module carries a Table of Contents.
  • No skills/shared/modules/ directory exists; all modules live under skills/<skill-name>/modules/.
  • python scripts/abstract_validator.py --scan exits 0 with no structural warnings on the affected skill directory.
  • python scripts/tokens.py reports total estimated tokens within the declared estimated_tokens budget for the hub SKILL.md.

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files in plugins/abstract/skills/modular-skills of athola/claude-night-market.

  • SKILL.md
  • README.md
  • guide.md
  • modules/antipatterns-and-migration.md
  • modules/core-workflow.md
  • modules/design-patterns.md
  • modules/design-philosophy.md
  • modules/enforcement-patterns.md
  • modules/implementation-patterns.md
  • modules/optimization-techniques.md
  • modules/troubleshooting.md

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Modular Skills next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Modular Skills compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Modular Skills this skillathola/claude-night-market341—~1.6kAutomated safety check: PassMIT
Context Compressionguanyang/open-agent-hub9772 repos~4.6kAutomated safety check: PassMIT
Fleet Auditoralexgreensh/token-optimizer2.5k—~1.7kAutomated safety check: PassCustom licence
Context Auditundefined-ui/second-brain-os1k—~802Automated safety check: PassMIT
Analyzing Claude Code Sessionsamd/gaia1.6k—~2.3kAutomated safety check: PassMIT
Token Optimizeralexgreensh/token-optimizer2.5k—~481Automated safety check: PassCustom licence

Similar skills

  • Context Compression

    guanyang/open-agent-hub

    This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…

    977 GitHub starsUsed in 2 repos~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Fleet Auditor

    alexgreensh/token-optimizer

    Cross-system agent token/cost audit (Claude Code, Codex, OpenClaw, Hermes, OpenCode): idle burns, model misrouting, config bloat, with dollar savings.

    2.5k GitHub stars~1.7k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    1k GitHub stars~802 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Mines local Claude Code session transcripts with a deterministic Python pipeline to show what the agent is actually used for, how often it fails and what it costs.

    1.6k GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Token Optimizer

    alexgreensh/token-optimizer

    Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities

    2.5k GitHub stars~481 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Cco Budget

    egorfedorov/claude-context-optimizer

    Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)

    114 GitHub stars~808 tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed

More from athola/claude-night-market

All 152 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    341 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    341 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    341 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    341 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    341 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    341 GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Questions about Modular Skills

What does Modular Skills do?

Build composable skill modules with hub-and-spoke loading. An agent skill from athola/claude-night-market. Modular Skills is an agent skill from athola/claude-night-market. Build composable skill modules with hub-and-spoke loading.

When should I use Modular Skills?

Modular Skills fits situations like: token budget is tight; tasks that involve LLM cost and token optimization.

How do I install Modular Skills in Claude Code?

Run `npx skills add athola/claude-night-market --skill modular-skills -a claude-code`. Or copy the skill folder (plugins/abstract/skills/modular-skills in athola/claude-night-market) into .claude/skills/modular-skills in your project. Claude Code loads it when a task matches its description.

How do I install Modular Skills in Codex?

Run `npx skills add athola/claude-night-market --skill modular-skills -a codex`. Or copy the skill folder (plugins/abstract/skills/modular-skills in athola/claude-night-market) into .agents/skills/modular-skills in your project. Codex loads it when a task matches its description.

Can I use Modular Skills in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill modular-skills -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/modular-skills, .gemini/skills/modular-skills, .github/skills/modular-skills and .opencode/skills/modular-skills in your project.

What does Modular Skills need to run?

Going by SKILL.md and its folder, Modular Skills needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Modular Skills access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Modular Skills safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Modular Skills use?

Modular Skills is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Modular Skills use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Modular Skills?

Skills that share tags, products or a category with Modular Skills: Context Compression (guanyang/open-agent-hub, 977 stars), Fleet Auditor (alexgreensh/token-optimizer, 2.5k stars), Context Audit (undefined-ui/second-brain-os, 1k stars) and Analyzing Claude Code Sessions (amd/gaia, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Modular Skills?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 341 GitHub stars. The repository holds 152 skills in this directory. The repository was last updated on October 9, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.