# Shared Patterns

> Provide reusable patterns for validation, error handling, scaffolding. Use for skill consistency.

- Skill: `thedixitjain/shared-patterns` (Agent Skill, multi-file: 9 files)
- Install (CLI): `npx skillmds add thedixitjain/shared-patterns`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thedixitjain/shared-patterns/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: thedixitjain (https://skillmd.com/u/thedixitjain)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/thedixitjain/shared-patterns

---


# Shared Patterns

Reusable patterns and templates for skill and hook development.

## When NOT To Use

- Authoring a skill end to end (use `abstract:skill-authoring`)
- Cross-plugin contracts, which belong in leyline rather than here

## 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](modules/validation-patterns.md) for:
- Input validation templates
- Schema validation patterns
- Error reporting formats

### Error Handling

See [modules/error-handling.md](modules/error-handling.md) for:
- Exception hierarchies
- Error message formatting
- Recovery strategies

### Testing Templates

See [modules/testing-templates.md](modules/testing-templates.md) for:
- Unit test scaffolding
- Integration test patterns
- Mock fixtures

### Workflow Patterns

See [modules/workflow-patterns.md](modules/workflow-patterns.md) for:
- Checklist templates
- Feedback loop patterns
- Progressive disclosure structures

## Usage

Reference these patterns from other skills:

```markdown
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.

## Exit Criteria

- [ ] Each of the four module files (`validation-patterns.md`, `error-handling.md`,
  `testing-templates.md`, `workflow-patterns.md`) exists under
  `plugins/abstract/skills/shared-patterns/modules/`.
- [ ] Any cross-skill reference to these modules uses a relative path beginning with
  `../shared-patterns/modules/` and resolves to an existing file on disk.
- [ ] No consuming skill references a path under the deprecated `skills/shared/modules/`
  directory pattern; such references are surfaced as broken links.
- [ ] The hub SKILL.md itself stays under 150 lines with no substantive pattern content
  duplicated from the modules it links.

---

**Source:** [`athola/claude-night-market`](https://github.com/athola/claude-night-market) → `plugins/abstract/skills/shared-patterns/SKILL.md`

