New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Shared infrastructure skills, commands, and hooks for building other Claude Code plugins with consistent patterns.

version
1.10.3
GitHub stars
350
View on GitHub

What it does

  • Adds 3 commands (/reinstall-all-plugins, /update-all-plugins, /verify-plugin) and 15 named skills covering auth, quota, and error handling
  • Covers service registry and quota tracking, error recovery, content sanitization, document conversion, and git platform abstraction
  • Enforces guardrails through hooks such as sanitize_external_content.py, supply_chain_check.py, and noqa_guard.py on untrusted input
  • Designed for plugin authors who need shared quota, auth, and recovery patterns that other plugins can call without duplicating code

Foundation infrastructure: auth flows, quota management, error patterns, markdown formatting, trust verification, and injection detection

Add marketplace

/plugin marketplace add athola/claude-night-market

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install leyline@claude-night-market

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

The default answer to "should we add this?" is no. The burden of proof is on the addition.

Additive Bias Defense

Note (#444): Frontmatter declares provides.guidance, not provides.contract. The scrutiny questions are consumed by partner skills (pensive:code-refinement, conserve:unbloat, imbue:scope-guard) that voluntarily embed them. No validator or hook in leyline enforces them directly. If a future contributor adds enforcement, restore the contract label and link the validator path here.

When NOT To Use

  • Removing bloat that already landed (use conserve:bloat-detector)
  • Scoring whether a feature is worth building (use imbue:scope-guard)

The Problem

LLMs are additive by nature. They reinvent wheels, add unnecessary complexity, hallucinate issues and modify tests to justify them, and deviate from priorities. This contract provides a systemic defense.

The Scrutiny Questions

Applied to every proposed addition (code, files, abstractions, error handling, configuration):

  1. Priority alignment: Is this a deviation from the current priority?
  2. Criticality: Is it critical to implement at this juncture?
  3. Simplicity: Does a simpler or more elegant solution exist?
  4. Evidence: What evidence proves this is needed (not assumed)?
  5. Consequence: What breaks if we do not add this?

If the proposer cannot answer questions 4 and 5 with concrete evidence, the addition is unjustified.

Anti-Pattern Detection

PatternSignalChallenge
Wheel reinventionNew utility/helper overlapping existing code"Does X already do this?"
Hallucinated issuesFix for a bug with no reproduction evidence"Show the failing test before the fix"
Test manipulationTest changed to match behavior rather than spec"Did the spec change, or did you change the test?"
Complexity creepAbstraction introduced for single use case"Is this the 3rd use, or the 1st?"
Priority deviationWork not traceable to current task/spec"Which requirement does this serve?"
Gold platingError handling or flexibility beyond need"What breaks without this?"

Burden of Proof Verdict

After applying scrutiny questions and anti-pattern detection, produce a verdict:

VerdictMeaningAction
justifiedEvidence supports the additionProceed
needs_evidencePlausible but unprovenProvide evidence or remove
unjustifiedNo evidence, likely biasRemove or justify

Integration Contract

Review-oriented skills MUST consult this contract by:

  1. Applying the 5 scrutiny questions to each addition
  2. Scanning for the 6 anti-patterns
  3. Producing a burden-of-proof verdict
  4. Including the verdict in their output

Consuming Skills

SkillIntegration Point
attune:war-roomProsecution Counsel role uses scrutiny questions
sanctum:pr-reviewEvery added file/function challenged
pensive:code-refinementRefactors pass "3rd use" test
conserve:unbloatFindings feed removal candidates
attune:mission-orchestratorPlan sections scanned before user review
imbue:justifyScrutiny questions extend audit protocol

Related Skills

  • imbue:karpathy-principles - "Simplicity First" and "Surgical Changes" principles invoke this contract from a higher-level four-principle synthesis
  • See docs/quality-gates.md#skill-level-quality-gate-composition for the full gate-skill federation graph

The Subtraction Principle

Rely less on AI and initial lines of thinking. Challenge yourself to think of a more elegant implementation or a simpler solution.

Before accepting any addition, ask: "Could I achieve this by removing code instead of adding it?" If yes, prefer the subtractive approach.

Exit Criteria

  • All 5 scrutiny questions applied to every proposed addition; questions 4 (evidence) and 5 (consequence) answered with concrete evidence, not assumptions
  • All 6 anti-patterns scanned (wheel reinvention, hallucinated issues, test manipulation, complexity creep, priority deviation, gold plating); any match named with the pattern label
  • A burden-of-proof verdict produced for each addition: justified, needs_evidence, or unjustified; the verdict appears in the consuming skill's output
  • Subtraction principle applied: at least one check for "could this be achieved by removing code instead?" before accepting any net-positive line-count change

Readme

Leyline

Infrastructure and pipeline building blocks for Claude Code plugins.

Quick Start

# Use quota management for rate-limited services
Skill(leyline:service-registry)  # quota-management module

# Implement standardized error handling
Skill(leyline:error-patterns)

# Set up authentication flows
Skill(leyline:authentication-patterns)

Overview

Leyline provides shared utilities and services to maintain consistent plugin functionality. It handles resource tracking, service integration, and pipeline patterns such as error handling and circuit breakers. While Abstract manages evaluation and design, Leyline delivers the technical components required for cross-plugin communication and system stability.

Skills

SkillPurposeUse When
service-registryManage external service connections, quotas, and usage logs.Coordinating services, enforcing rate limits, or capturing audit trails and cost metrics.
error-patternsStandardized error handling.Implementing error recovery logic.
authentication-patternsCommon auth flows.Connecting to external APIs.
content-sanitizationSanitize external content.Loading Issues, PRs, or WebFetch results.
damage-controlAgent crash recovery.Context overflow, merge conflicts, broken state.
evaluation-frameworkDecision thresholds, scoring, and action utility.Building evaluation criteria or gating agent dispatch.
git-platformCross-platform git forge commands.Abstracting GitHub/GitLab/Bitbucket.
ticket-writingGlanceable tickets in the project's own shape, else the why inline or one link away.Creating or editing tracker tickets.
markdown-formattingLine wrapping and style conventions.Generating or editing markdown prose.
progressive-loadingDynamic content loading.Lazy loading strategies.
risk-classificationInline 4-tier risk model.Risk-based task routing.
stewardshipStewardship principles and virtues.Codebase improvement and health.
testing-quality-standardsTest quality guidelines and pytest configuration.Ensuring high-quality tests or standardizing test setup.

Commands

CommandPurpose
/reinstall-all-pluginsRefresh all plugins (fixes cache issues).
/update-all-pluginsUpdate all installed plugins.
/verify-pluginVerify a plugin's behavioral contract history via GitHub SLSA attestations.

Workflow and Integration

Other plugins call Leyline for quota enforcement and standardized error recovery. The quota_tracker and service_registry utilities provide real-time monitoring of service health and rate limit compliance. These patterns use loose coupling to allow for progressive adoption throughout the codebase. The reference, fallback and vendoring patterns a consuming plugin chooses between are in docs/cross-plugin-integration.md.

Optional Dependencies

PackagePurposeFallback
tiktokenAccurate token estimationHeuristic (~4 chars/token)

For accurate token counts, install tiktoken:

pip install tiktoken

Plugin Metadata Standards (Claude Code 2.0.73+)

Claude Code 2.0.73+ supports search filtering in the plugin discovery screen. Descriptions should start with a direct statement of functionality, such as "Infrastructure and pipeline building blocks for shared utilities." Include searchable keywords like "quota management" or "error handling" and mention specific capabilities like "circuit breakers" or "auth flows." Descriptions should remain between 50 and 150 characters to ensure clarity in search results.

Stewardship

Ways to leave this plugin better than you found it:

  • An opportunity to document the quota tracker API so downstream plugins can integrate without reading source
  • Error pattern examples could cover more recovery scenarios that other plugins encounter in practice
  • The tiktoken fallback heuristic deserves a brief note explaining when it diverges from actual token counts
  • Cross-plugin integration tests would help catch breakage early when Leyline interfaces change

See STEWARDSHIP.md for the full stewardship principles guiding this project.

Details

Marketplace
athola/claude-night-market
Source
plugins/leyline
Category
Community
Keywords
infrastructure, auth, security, injection-detection, quota
Listed since
Apr 7, 2026

More from athola/claude-night-market

All 23