pattern-memory

Searches a local Markdown registry of reusable implementation patterns before writing code.

4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/laicluse/agent-fieldkit --skill pattern-memory-laicluse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pattern-memory
Source: https://github.com/laicluse/agent-fieldkit/tree/main/.agents/plugins/generated/pattern-memory/skills/pattern-memory
Command: npx skills add https://github.com/laicluse/agent-fieldkit --skill pattern-memory-laicluse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers repeatedly re-implement conventions, interaction patterns, and architecture recipes that already exist in past projects, losing consistency and time. This Skill provides a lookup workflow over a local-first pattern registry so reusable patterns are found and reconciled with the current codebase before implementation. ## Core Features & Use Cases - Local Pattern Search: Query a Markdown-based pattern store under ~/.laicluse/patterns using concrete surface terms from the task at hand. - Privacy-Aware Recall: Distinguishes public-safe exemplars from private precedent pointers, preventing private repo names or paths from leaking into commits, PRs, or docs. - Controlled Capture: New patterns are drafted only on explicit request, start as status draft, and are promoted to verified only with a clear recipe and verification evidence. - Use Case: Before building a new plugin or module, search Pattern Memory for the established setup convention, read the matching pattern files, then implement in a way consistent with prior verified patterns. ## Quick Start Ask the agent to search Pattern Memory for existing conventions before implementing the new feature you are about to build.

Frequently Asked Questions about pattern-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for reusable code patterns before implementing a feature?▼

Run the pattern-memory CLI search command with concrete surface terms from your task, then read the matching Markdown pattern files. Treat the current repository as ground truth and reconcile the pattern with the code in front of you before implementing.

What is a local-first pattern registry for coding agents?▼

It is a collection of Markdown files stored locally, by default under ~/.laicluse/patterns, that documents reusable implementation patterns. The pattern-memory CLI indexes, searches, and validates these files so agents can recall conventions without external services.

Does pattern-memory work with both Claude Code and Codex?▼

Yes. The skill resolves its plugin root through CLAUDE_PLUGIN_ROOT on Claude Code or through the codex plugin list command on Codex, then invokes the same pattern-memory CLI from that root.

Can private project details leak into commits or docs from pattern recall?▼

The privacy contract prevents this by separating exemplars, which are public-safe handles, from precedents, which are private pointers used only to inspect code. Precedents must never be copied into commits, PR bodies, docs, or messages.

Why does pattern-memory report a stale index and how do I fix it?▼

A stale index appears during validation when the search index no longer matches the pattern files on disk. Run the pattern-memory index command to rebuild the index, then re-run validate to confirm the store is consistent.