pattern-loader

Searches a vault pattern catalog and loads matching workflow patterns for task execution.

Updated Nov 1, 2024
One-click install
npx skills add https://github.com/mlorentedev/dotfiles --skill pattern-loader-mlorentedev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-loader
Source: https://github.com/mlorentedev/dotfiles/tree/main/harness/skills/pattern-loader
Command: npx skills add https://github.com/mlorentedev/dotfiles --skill pattern-loader-mlorentedev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agents often guess at workflow steps or rely on stale cached instructions when a task matches a known procedure. This Skill ensures the correct, current version of a documented workflow pattern is always retrieved from the vault pattern catalog before acting. ## Core Features & Use Cases - Pattern Catalog Search: Queries the vault pattern catalog via Hive MCP or a fallback file search, resolving the vault path through environment variables or machine config without hardcoding paths. - Guided Pattern Application: Loads the matched pattern's frontmatter and sections (steps, pitfalls, verification) and applies them in order. - Audit Logging: Records which pattern was applied in the session record for traceability. - Use Case: When asked to run a backup or start a debugging session, the agent searches the catalog for the matching pattern (e.g., pattern-backup, pattern-debug-*), loads its exact steps and pitfalls, follows them, and verifies the result. ## Quick Start Ask the agent to load and apply the backup pattern from the vault pattern catalog before starting the backup task.

Frequently Asked Questions about pattern-loader

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

FAQPage Schema
How do I load a workflow pattern from a vault catalog?

Search the catalog with vault_search using a keyword and the patterns scope, then read the most relevant pattern file and follow its steps, pitfalls, and verification sections in order. If Hive MCP is unavailable, fall back to a grep search against the local vault clone.

How does the pattern loader resolve the vault path?

It checks the VAULT_PATH environment variable first, then the dotf env path VAULT_PATH command, then the paths.VAULT_PATH key in ~/.config/dotfiles/machine.json. If none resolve, it asks the user for the vault path instead of hardcoding one.

When should I skip loading a pattern?

Skip pattern loading when the task is trivial, when you performed the exact task recently and know the steps, or when no matching pattern exists in the catalog. In the no-match case, say so explicitly and proceed without a pattern.

Should agents cache pattern content in long-term memory?

No. Patterns change over time, so cached copies become stale and cause incorrect execution. Always re-read the pattern from the vault, and only cache in memory if the same pattern is used more than once per week.

What happens if pattern verification fails?

Re-read the pattern's Verification section, execute its verification steps, and report results. If verification fails, log the failure as a lesson in the clients/ or sessions/ directories for future reference.