/pensyve:memory-informed-refactorfrom pensyve
Queries Pensyve memory for past decisions, failures, and patterns related to a refactoring target, then compiles a structured briefing to avoid repeating mistakes.
Ships in pensyve. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Load historical context from Pensyve memory before starting a refactor. Surfaces past decisions, failed approaches, known pitfalls, and relevant patterns to avoid repeating mistakes.
This skill follows the memory reflex defined in
skills/shared/memory-reflex.md. Recall before refactoring; observe when a refactor insight lands (abandoned approach, invariant discovered, regression cause).
When this skill is invoked with a refactoring target, follow these steps:
Run multiple pensyve_recall queries to gather comprehensive context about the target:
pensyve_recall with query "<target>" (limit: 10)pensyve_recall with query "<target> refactor" (limit: 5)pensyve_recall with query "<target> failed" (limit: 5)pensyve_recall with query "<target> error" (limit: 5)pensyve_recall with query "<target> decided" (limit: 5)pensyve_recall with query "<target> depends" (limit: 5)If the target matches an entity name, also call pensyve_inspect with entity: "<target>" to get the full memory inventory for that entity.
Organize the findings into a structured briefing. Deduplicate results that appear across multiple queries.
Refactor Briefing:
<target>Known Facts
- List of semantic memories about the target, ordered by confidence
- Include confidence scores
Past Decisions
- Architecture or design decisions related to this target
- Include the reasoning if available ("chose X because Y")
Past Outcomes
- Previous refactoring attempts and their results
- Bug fixes and their root causes
- What worked and what did not
Known Pitfalls
- Failed approaches (flagged clearly so they are not repeated)
- Edge cases or gotchas discovered in past sessions
- Dependencies that may be affected
Procedural Knowledge
- Action-outcome patterns with reliability scores
- Proven workflows related to this target
Recommendations
- Synthesize the above into 2-5 actionable recommendations
- Flag any conflicts or contradictions in the memory
Memory Gaps
- Areas where no relevant memories exist
- Suggest what to watch for during the refactor
If no relevant memories are found for a section, omit that section entirely rather than showing an empty one. If no memories are found at all, say so clearly and proceed without historical context.
The current session's episode is already active (started by the SessionStart hook). This refactor's observations and any captured lessons will be part of that episode — no additional pensyve_episode_start call is needed.
When any of these occur during the refactor, call the memory reflex immediately:
Do not batch these to Stop — capture at landing, surface one-line.
.claude/ memory files. All memory operations go through the Pensyve MCP tools exclusively.pensyve_recall returns errors on some queries, present results from the successful queries and note the failures.pensyve_inspect fails, skip the entity inspection and rely on recall results.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub major7apps/pensyve --plugin pensyve7 skills in this plugin
/context-loaderSession start context priming -- loads relevant memories from Pensyve at the beginning of a session to provide continuity across sessions. Use when switching projects or needing historical context./memory-informed-debugDebug with working memory -- before diagnosing, recall prior root causes and known-good diagnostic procedures; when a root cause is confirmed, capture it immediately. Use whenever debugging a non-trivial failure./memory-informed-designArchitecture/design decisions with working memory -- before recommending, recall prior decisions and tradeoffs; when a decision is made, capture it immediately. Use for any substantive design question.Other plugins' skills for the same job