shared-patterns
npx machina-cli add skill athola/claude-night-market/shared-patterns --openclawShared Patterns
Reusable patterns and templates for skill and hook development.
Purpose
This skill provides shared patterns that are referenced by other skills in the abstract plugin. It follows DRY principles by centralizing common patterns.
Pattern Categories
Validation Patterns
See modules/validation-patterns.md for:
- Input validation templates
- Schema validation patterns
- Error reporting formats
Error Handling
See modules/error-handling.md for:
- Exception hierarchies
- Error message formatting
- Recovery strategies
Testing Templates
See modules/testing-templates.md for:
- Unit test scaffolding
- Integration test patterns
- Mock fixtures
Workflow Patterns
See modules/workflow-patterns.md for:
- Checklist templates
- Feedback loop patterns
- Progressive disclosure structures
Usage
Reference these patterns from other skills:
For validation patterns, see the `shared-patterns` skill's
[validation-patterns](../shared-patterns/modules/validation-patterns.md) module.
Verification: Run the command with --help flag to verify availability.
Troubleshooting
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
Source
git clone https://github.com/athola/claude-night-market/blob/master/plugins/abstract/skills/shared-patterns/SKILL.mdView on GitHub Overview
Shared Patterns centralizes templates and patterns used by multiple skills in the abstract plugin. It covers validation, error handling, testing templates, and workflow patterns to keep ecosystems aligned. Itβs intended for reusable patterns, not skill-specific logic, and advises avoiding patterns that are evolving or context-dependent.
How This Skill Works
The skill exposes categorized pattern modules (Validation Patterns, Error Handling, Testing Templates, Workflow Patterns) and documentation links. Other skills reference these modules to apply standardized schemas, error messages, test scaffolds, and workflow structures, ensuring consistency across the ecosystem.
When to Use It
- When creating a new skill or hook that needs consistent validation, error handling, testing scaffolds, or workflow patterns.
- When applying standardized input or schema validation templates from validation-patterns.md.
- When implementing centralized error handling and common recovery strategies.
- When adding unit/integration tests and mock fixtures using the testing-templates module.
- When aligning with DRY principles by reusing workflow patterns; note: do not use a pattern that is still evolving or context-dependent; wait for stability.
Quick Start
- Step 1: Review the shared-patterns documentation and identify the relevant modules (validation-patterns.md, error-handling.md, testing-templates.md, workflow-patterns.md).
- Step 2: Reference the chosen module in your skill and adapt the provided templates to your use case.
- Step 3: Run the skill command with --help to verify availability, then implement patterns and run tests.
Best Practices
- Reference the appropriate module (validation-patterns, error-handling, testing-templates, workflow-patterns) rather than duplicating logic.
- Follow standardized error message formats and exception hierarchies.
- Leverage provided unit and integration test scaffolding.
- Use centralized workflow checklists and feedback loops.
- Verify availability with the --help flag and keep dependencies in PATH updated.
Example Use Cases
- A new user-input validator uses the shared-patterns validation-patterns.md templates.
- A skill introduces uniform error handling across modules using the error-handling patterns.
- A test suite scaffolds with unit tests and mock fixtures from testing-templates.
- A workflow-heavy skill implements checklist templates and progressive disclosure.
- A team references shared-patterns to ensure consistency across multiple skills in the abstract plugin.