Agent Skill
2/7/2026

optimizing-large-skills

Systematic methodology to reduce skill file size through externalization, consolidation, and progressive loading patterns. Use when skills exceed 300 lines, multiple code blocks (10+) with similar functionality, heavy Python inline with markdown, functions >20 lines embedded. Do not use when skill is under 300 lines and well-organized. creating new skills - use modular-skills instead. Consult this skill when skills-eval shows "Large skill file" warnings.

A
athola
172GitHub Stars
3Views
npx skills add athola/claude-night-market

SKILL.md

Nameoptimizing-large-skills
DescriptionSystematic methodology to reduce skill file size through externalization, consolidation, and progressive loading patterns. Use when skills exceed 300 lines, multiple code blocks (10+) with similar functionality, heavy Python inline with markdown, functions >20 lines embedded. Do not use when skill is under 300 lines and well-organized. creating new skills - use modular-skills instead. Consult this skill when skills-eval shows "Large skill file" warnings.

Claude Night Market

Version License: MIT Plugins Skills Claude Code GitHub Stars Quillx: 3/5 Adapted

A plugin marketplace for Claude Code, Anthropic's agentic coding tool.

Night Market extends Claude Code with 23 plugins covering git workflows, code review, spec-driven development, architecture selection, codebase visualization, autonomous agents, multi-LLM delegation, ML-enhanced scoring, and multi-source research. 174 skills, 126 slash commands, and 54 agents. Each plugin installs independently.

<p align="center"> <img src="assets/gifs/skills-showcase.gif" alt="Night Market skills in action" width="720"> </p>

Quick Start

Requires Claude Code 2.1.16+ and Python 3.9+ for hooks. See Requirements for details.

# Add the marketplace
/plugin marketplace add athola/claude-night-market

# Install plugins you need
/plugin install sanctum@claude-night-market    # Git workflows
/plugin install pensive@claude-night-market    # Code review
/plugin install spec-kit@claude-night-market   # Spec-driven dev

# Use them
/prepare-pr                                    # Prepare a pull request
/full-review                                   # Run code review

Alternative: Install via npx with npx skills add athola/claude-night-market (installs all plugins at once).

After installation, run claude --init for one-time setup.

Note: If the Skill tool is unavailable, read skill files directly at plugins/{plugin}/skills/{skill-name}/SKILL.md.

opkg (OpenPackage)

# Install specific plugins
opkg i gh@athola/claude-night-market --plugins sanctum
opkg i gh@athola/claude-night-market --plugins pensive,conserve

# Plugins that depend on shared runtime skills (e.g. attune, conjure)
# automatically pull packages/core as a dependency

See the Installation Guide for detailed setup options.

Architecture

23 internal plugins in four layers, plus external plugins from the superpowers-marketplace. Arrows show dependency direction (A --> B means A depends on B). Dashed arrows mark optional complements.

<picture> <source media="(prefers-color-scheme: dark)" srcset="assets/architecture-dark.svg"> <img alt="Plugin architecture: 5 layers (External, Meta, Domain, Utility, Foundation) with 22 plugins" src="assets/architecture-light.svg"> </picture>

<sub>Source: <a href="assets/architecture.d2">assets/architecture.d2</a> — regenerate with <code>d2 assets/architecture.d2 assets/architecture-light.svg</code></sub>

Plugin Catalog

PluginLayerDescriptionSkillsCmds
abstractMetaSkill authoring, hook development, evaluation frameworks, escalation governance1218
leylineFoundationAuth flows (GitHub/GitLab/AWS), quota management, error patterns, markdown formatting, Discussions retrieval, damage-control, stewardship, trust verification, injection detection, deferred-capture contracts213
sanctumFoundationGit workflows, commit messages, PR prep, docs updates, version management, sessions, deferred-item capture1419
imbueFoundationTDD enforcement, proof-of-work validation, scope guarding, additive-bias auditing, rigorous reasoning114
conserveUtilityContext optimization, bloat detection, context mapping, CPU/GPU monitoring, token conservation134
conjureUtilityDelegation framework for routing tasks to external LLMs (Gemini, Qwen) with cheapest-capable model selection40
hookifyUtilityBehavioral rules engine with markdown configuration and hook-to-rule conversion26
egregoreUtilityAutonomous agent orchestrator with parallel worktrees, agent specialization, cross-item learning, and crash recovery45
heraldUtilityShared notification library: GitHub issue alerts, webhook support (Slack, Discord, generic)00
oracleUtilityONNX Runtime inference daemon for ML-enhanced plugin capabilities over localhost HTTP11
pensiveDomainCode review, architecture review, bug hunting, blast radius analysis, Makefile audits, NASA Power of 101312
attuneDomainProject lifecycle: brainstorm, specify, plan, initialize, execute, war-room, dorodango polishing1310
spec-kitDomainSpec-driven development: specifications, task generation, implementation310
parseltongueDomainPython: testing, performance, async patterns, packaging43
ministerDomainGitHub issue management, label taxonomy, initiative tracking23
memory-palaceDomainSpatial knowledge organization, digital garden curation, PR review capture75
archetypesDomainArchitecture paradigm selection (hexagonal, CQRS, microservices, etc.)140
gauntletDomainCodebase learning through knowledge extraction, challenges, code knowledge graph, and spaced repetition66
phantomDomainComputer use: screenshot capture, mouse/keyboard control, autonomous desktop agent11
scribeDomainDocumentation, AI slop detection, SICO voice extraction, style transfer, session replay119
scryDomainTerminal recordings (VHS), browser recordings (Playwright), GIF processing42
tomeDomainMulti-source research: code archaeology, community discourse, academic literature, TRIZ analysis74
cartographDomainCodebase visualization: architecture, data flow, dependency, call chains, community detection, class diagrams via Mermaid71

Full inventory: Capabilities Reference.

How the Layers Work

Governance. imbue enforces TDD via a PreToolUse hook that verifies test files before allowing implementation writes. Quality gates halt execution when tests fail.

Security. leyline manages OAuth flows with local token caching. conserve auto-approves safe commands while blocking destructive operations. sanctum isolates named sessions, and agents can run in worktree isolation for parallel execution.

Orchestration. egregore manages autonomous agent lifecycles with parallel worktree execution, agent specialization, cross-item learning, and crash recovery via watchdog monitoring.

Maintenance. /update-ci reconciles pre-commit hooks and GitHub Actions with code changes. abstract tracks skill stability and auto-triggers improvement agents when degradation is detected.

Cross-session state. attune, spec-kit, and sanctum persist state across sessions via CLAUDE_CODE_TASK_LIST_ID. GitHub Discussions serve as a second persistence layer for decisions, war-room deliberations, and evergreen knowledge.

Risk classification. leyline:risk-classification provides 4-tier task gating (GREEN/YELLOW/RED/CRITICAL). RED and CRITICAL tasks escalate to war-room-checkpoint for expert deliberation.

Common Workflows

See the Common Workflows Guide for full details.

WorkflowCommandWhat it does
Project lifecycle/attune:missionRoutes through brainstorm, specify, plan, execute phases
Initialize project/attune:arch-initArchitecture-aware scaffolding with language detection
Review a PR/full-reviewMulti-discipline code review in a single pass
Fix PR feedback/fix-prAddress review comments progressively
Implement issues/do-issueIssue resolution with parallel agent execution
Prepare a PR/prepare-prQuality gates, linting, clean git state
Write specs/speckit-specifySpecification-first development
Catch up on changes/catchupContext recovery from recent git history
Codebase cleanup/unbloatBloat removal with progressive depth levels
Update CI/CD/update-ciReconcile hooks and workflows with code changes
Strategic decisions/attune:war-roomExpert routing with reversibility scoring
Refine code/refine-codeDuplication, algorithm, and clean code analysis

What's New

See the Changelog for the full history.

Requirements

  • Claude Code 2.1.16+ (2.1.32+ for agent teams, 2.1.38+ for security features, 2.1.85+ latest tested)
  • Python 3.9+ for hooks (macOS ships 3.9.6). Plugin packages may target 3.10+ via virtual environments, but all hook code must be 3.9-compatible. See the Plugin Development Guide for compatibility rules.

Plugin Development

Create a new plugin:

make create-plugin NAME=my-plugin
make validate
make lint && make test

Plugin layout:

my-plugin/
├── .claude-plugin/
│   └── plugin.json        # Metadata: skills, commands, agents, hooks
├── commands/               # Slash commands (markdown)
├── skills/                 # Agent skills (SKILL.md + modules/)
├── hooks/                  # Event handlers (Python, 3.9-compatible)
├── agents/                 # Specialized agent definitions
├── tests/                  # pytest suite
├── Makefile                # Build, test, lint targets
└── pyproject.toml          # Package config

See the Plugin Development Guide for structure requirements and naming conventions. For LSP integration, see the LSP Guide.

Documentation

Per-plugin documentation lives in book/src/plugins/ (one page per plugin).

Stewardship

Every plugin is entrusted to the community. Five principles guide how we maintain and improve the ecosystem: steward (not own), multiply (not merely preserve), be faithful in small things, serve those who come after, and think seven iterations ahead.

Each plugin README includes a Stewardship section with specific improvement opportunities. Run /stewardship-health to view per-plugin health dimensions.

See STEWARDSHIP.md for the full manifesto.

Contributing

Each plugin maintains its own tests and documentation. Run make test at the repo root to execute all plugin test suites. See the Plugin Development Guide for contribution guidelines.

Star History

Star History Chart

Powered by Night Market

Using night-market plugins in your project? Add the badge:

[![Powered by Night Market](https://img.shields.io/badge/powered_by-Night_Market-blueviolet)](https://github.com/athola/claude-night-market)

Powered by Night Market

License

MIT

Skills Info
Original Name:optimizing-large-skillsAuthor:athola