From memoryrelay
Use when establishing reusable conventions, looking up existing patterns before implementing a solution, adopting shared patterns across projects, or getting pattern recommendations for a project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/memoryrelay:pattern-managementThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Patterns are **reusable solutions with problem context**. Plain implementation notes are memories — use `memory_store` for those (see `memory-workflow` skill).
Patterns are reusable solutions with problem context. Plain implementation notes are memories — use memory_store for those (see memory-workflow skill).
| Tool | Signature | Purpose |
|---|---|---|
pattern_create | pattern_create(title, description, category?, example_code?, scope?, tags?, source_project?) | Create a reusable pattern |
pattern_search | pattern_search(query, category?, project?, limit?, threshold?) | Find existing patterns |
pattern_adopt | pattern_adopt(pattern_id, project) | Track which projects use which patterns |
pattern_suggest | pattern_suggest(project, limit?) | Get pattern recommendations for a project |
pattern_search(query) before pattern_create. Duplicate patterns fragment conventions and confuse future lookups.pattern_create(title, description, category, example_code). Include example_code for maximum usefulness. Set scope to "global" for cross-project or "project" for project-specific patterns.pattern_adopt(pattern_id, project) so the pattern appears in project_context results and pattern_suggest recommendations (see project-orchestration skill).pattern_suggest(project) when starting work on a project to discover applicable conventions.Every description in pattern_create should include:
| Section | Content |
|---|---|
| Problem | What recurring issue this solves |
| Solution | The reusable approach or convention |
| Context | When to apply (and when not to) |
| Examples | Concrete usage showing the pattern in action |
pattern_create(
"RFC 7807 Error Responses",
"Problem: Inconsistent error responses across API endpoints.\nSolution: Return { error, code, details? } on all 4xx/5xx.\nContext: REST APIs with multiple consumers. Not needed for internal RPC.",
"error-handling",
'{ error: "Invalid email", code: "VALIDATION_ERROR", details: { field: "email" } }',
"global",
["api", "rest", "validation"]
)
pattern_adopt(pattern_id, project) links a pattern to a project. Multiple projects can adopt the same pattern.pattern_suggest(project) returns unadopted patterns that may be relevant based on project context.project_context, keeping teams aligned without manual lookups.| Mistake | Fix |
|---|---|
| Creating without searching first | Always pattern_search before pattern_create — duplicates fragment conventions |
| Vague descriptions | Follow the Problem/Solution/Context/Examples structure; be specific and actionable |
Omitting example_code | Always include a concrete code example — patterns without examples are hard to apply |
| Not adopting to projects | Call pattern_adopt after creating; unadopted patterns are invisible to project_context |
| Patterns too specific | Patterns should generalize across contexts; one-off solutions belong in memories or decisions |
npx claudepluginhub memoryrelay/memory-relay-skills --plugin memoryrelayConsults design pattern catalog before implementing or refactoring code to check for matching patterns and follow established implementations.
Extracts recurring coding and architectural patterns from workspace code into reusable templates in docs/PATTERNS. Useful for documenting implicit structures requiring CODEMAP.md.
Detects reusable code patterns, workflow automations, best practices, and config setups during implementation for potential new skills.