- [Overview](#overview)
/plugin marketplace add athola/claude-night-market/plugin install abstract@claude-night-marketThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdguide.mdmodules/antipatterns-and-migration.mdmodules/core-workflow.mdmodules/design-philosophy.mdmodules/enforcement-patterns.mdmodules/implementation-patterns.mdmodules/troubleshooting.mdscripts/analyze.pyscripts/module-validatorscripts/tokens.pyA framework for designing modular skills to maintain predictable token usage. It breaks complex skills into focused modules that are easier to test and optimize.
The framework implements progressive disclosure: skills start with essential information and provide deeper details only when needed. This approach keeps context windows efficient while ensuring functionality is available.
This skill provides a framework for designing modular skills. Breaking down large skills into smaller modules creates a more maintainable architecture and controls token usage.
This skill is based on Anthropic's Agent Skills best practices, using progressive disclosure: start with a high-level overview, then provide detail as needed.
# Check if your skill needs modularization (works from skill directory)
python scripts/analyze.py
# Analyze with custom threshold (default: 150 lines)
python scripts/analyze.py --threshold 100
# Or import directly in Python:
from abstract.skill_tools import analyze_skill
analysis = analyze_skill(".", threshold=100)
Verification: Run python --version to verify Python environment.
# Estimate token consumption for your skill (works from skill directory)
python scripts/tokens.py
# Or import directly in Python:
from abstract.skill_tools import estimate_tokens
tokens = estimate_tokens("SKILL.md")
Verification: Run python --version to verify Python environment.
# Validate modular structure and patterns
python scripts/abstract_validator.py --scan
# Generate full validation report
python scripts/abstract_validator.py --report
# Auto-fix issues (dry run first)
python scripts/abstract_validator.py --fix --dry-run
Verification: Run python --version to verify Python environment.
skill_analyzer.py to identify complexity and modularization needstoken_estimator.py to optimize for context window efficiencyabstract_validator.py to validate proper structure and patternsHere are a few common ways we use the tools:
skill-analyzer. This helps us decide if a skill needs to be modularized.guide.md.../../docs/examples/modular-skills/ directory.module-validator before deploying.token-estimator. This helps us make design decisions based on their impact on the context window.Before finalizing modules, verify these quality standards:
# Check module line counts
find modules -name "*.md" -exec wc -l {} + | sort -n
# Identify modules needing TOCs (>100 lines)
for file in modules/*.md; do
lines=$(wc -l < "$file")
if [ $lines -gt 100 ]; then
echo "$file needs TOC ($lines lines)"
fi
done
Verification: Run the command with --help flag to verify availability.
Based on evaluation feedback (issue #74):
## Table of Contents
- [Section Name](#section-name)
- [Another Section](#another-section)
- [Examples](#examples)
- [Troubleshooting](#troubleshooting)
Verification: Run the command with --help flag to verify availability.
★ Insight ─────────────────────────────────────
These quality standards emerged from real-world feedback on skill evaluation. Navigation aids (TOCs) are critical for agentic search efficiency - coding agents use grep to locate content without loading entire files. Quick Start concreteness ensures developers can immediately apply skills without translation overhead.
─────────────────────────────────────────────────
For detailed implementation details and advanced techniques:
modules/enforcement-patterns.md for frontmatter design patternsmodules/core-workflow.md for detailed modularization processmodules/implementation-patterns.md for coding and structure patternsmodules/antipatterns-and-migration.md for converting existing skillsmodules/design-philosophy.md for underlying principles and thinkingmodules/troubleshooting.md for common issues and solutions../../scripts/ directory:
skill_analyzer.py - Complexity analysis and recommendationstoken_estimator.py - Token usage estimation with dependenciesabstract_validator.py - Pattern validation and auto-fixing../../docs/examples/modular-skills/ directory for concrete implementationsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.