
leyline
Shared infrastructure skills, commands, and hooks for building other Claude Code plugins with consistent patterns.
- version
- 1.10.3
- GitHub stars
- 350
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, andnoqa_guard.pyon 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-marketRun it inside Claude Code once, then install the plugin below.
Install
/plugin install leyline@claude-night-marketRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceThe 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, notprovides.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 thecontractlabel 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):
- Priority alignment: Is this a deviation from the current priority?
- Criticality: Is it critical to implement at this juncture?
- Simplicity: Does a simpler or more elegant solution exist?
- Evidence: What evidence proves this is needed (not assumed)?
- 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
| Pattern | Signal | Challenge |
|---|---|---|
| Wheel reinvention | New utility/helper overlapping existing code | "Does X already do this?" |
| Hallucinated issues | Fix for a bug with no reproduction evidence | "Show the failing test before the fix" |
| Test manipulation | Test changed to match behavior rather than spec | "Did the spec change, or did you change the test?" |
| Complexity creep | Abstraction introduced for single use case | "Is this the 3rd use, or the 1st?" |
| Priority deviation | Work not traceable to current task/spec | "Which requirement does this serve?" |
| Gold plating | Error handling or flexibility beyond need | "What breaks without this?" |
Burden of Proof Verdict
After applying scrutiny questions and anti-pattern detection, produce a verdict:
| Verdict | Meaning | Action |
|---|---|---|
justified | Evidence supports the addition | Proceed |
needs_evidence | Plausible but unproven | Provide evidence or remove |
unjustified | No evidence, likely bias | Remove or justify |
Integration Contract
Review-oriented skills MUST consult this contract by:
- Applying the 5 scrutiny questions to each addition
- Scanning for the 6 anti-patterns
- Producing a burden-of-proof verdict
- Including the verdict in their output
Consuming Skills
| Skill | Integration Point |
|---|---|
attune:war-room | Prosecution Counsel role uses scrutiny questions |
sanctum:pr-review | Every added file/function challenged |
pensive:code-refinement | Refactors pass "3rd use" test |
conserve:unbloat | Findings feed removal candidates |
attune:mission-orchestrator | Plan sections scanned before user review |
imbue:justify | Scrutiny 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-compositionfor 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, orunjustified; 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
| Skill | Purpose | Use When |
|---|---|---|
service-registry | Manage external service connections, quotas, and usage logs. | Coordinating services, enforcing rate limits, or capturing audit trails and cost metrics. |
error-patterns | Standardized error handling. | Implementing error recovery logic. |
authentication-patterns | Common auth flows. | Connecting to external APIs. |
content-sanitization | Sanitize external content. | Loading Issues, PRs, or WebFetch results. |
damage-control | Agent crash recovery. | Context overflow, merge conflicts, broken state. |
evaluation-framework | Decision thresholds, scoring, and action utility. | Building evaluation criteria or gating agent dispatch. |
git-platform | Cross-platform git forge commands. | Abstracting GitHub/GitLab/Bitbucket. |
ticket-writing | Glanceable tickets in the project's own shape, else the why inline or one link away. | Creating or editing tracker tickets. |
markdown-formatting | Line wrapping and style conventions. | Generating or editing markdown prose. |
progressive-loading | Dynamic content loading. | Lazy loading strategies. |
risk-classification | Inline 4-tier risk model. | Risk-based task routing. |
stewardship | Stewardship principles and virtues. | Codebase improvement and health. |
testing-quality-standards | Test quality guidelines and pytest configuration. | Ensuring high-quality tests or standardizing test setup. |
Commands
| Command | Purpose |
|---|---|
/reinstall-all-plugins | Refresh all plugins (fixes cache issues). |
/update-all-plugins | Update all installed plugins. |
/verify-plugin | Verify 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
| Package | Purpose | Fallback |
|---|---|---|
| tiktoken | Accurate token estimation | Heuristic (~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- memory-palacev1.10.3
- ministerv1.10.3
- oraclev1.10.3
- parseltonguev1.10.3
- pensivev1.10.3
- phantomv1.10.3
- sanctumv1.10.3
- scribev1.10.3
- scryv1.10.3
- spec-kitv1.10.3
- tomev1.10.3
- abstractv1.10.3
- archetypesv1.10.3
- attunev1.10.3
- cartographv1.10.3
- conjurev1.10.3
- conservev1.10.3
- egregorev1.10.3
- gauntletv1.10.3
- heraldv1.10.3
- hookifyv1.10.3
- imbuev1.10.3
Similar to leyline
More Skill & Plugin Building
backend-api-securityPluginwshobson/agents42.8K starsAPI security hardening, authentication implementation, authorization patterns, rate limiting, and input validation
web-security-guardPluginccplugins/awesome-claude-code-plugins1K starsIntegrated security for websites and apps: hardening, secure authentication (email verification, 2FA, passkeys), payment privacy, WAF defense agent with lockdow
securityPluginaws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock412 starsSecurity scanning, auditing, and compliance validation with 4 specialized agents, plus fail-closed hooks: PII/secrets guard, HMAC-chained tamper-evident audit (
frontend-mobile-securityPluginwshobson/agents42.8K starsXSS prevention, CSRF protection, content security policies, mobile app security, and secure storage patterns
auth0Pluginanthropics/knowledge-work-plugins36.5K starsEssential Auth0 skills including quickstarts, migration from other providers, and Multi-Factor Authentication (MFA).
fullstack-guardianSkilljeffallan/claude-skills6.1K installsFull-stack feature builder that applies frontend, backend, and security checks in one implementation workflow.