Reflect skills from memory

From FradSer/dotclaude · View interactive version

Reflect skills from memory is an AI agent skill from the GitHub repository FradSer/dotclaude. This skill should be used when the user asks to "reflect on skills from memory", "audit marketplace skills against memory", "从记忆中检查 skills 的问题", "反思并修改 skill", "apply memory feedback to skills", or wants to turn accumulated memory feedback about this marketplace's skills into concrete skill fixes. R

How to use this skill

Skill file

Reflect Skills From Memory

Turn accumulated memory feedback about a Claude Code plugin marketplace's skills into

concrete, verified fixes. Memory records hard-won lessons ("L3 rules get skipped",

"git plugin still has no commit hook") but

memory is a point-in-time snapshot — it drifts from the code. This skill closes the loop:

recall the feedback, re-verify it against the live skills, then fix whichever is wrong —

the skill, or the memory.

Run this in a plugin marketplace repo (e.g. dotclaude) whose feedback lives in the

per-project memory directory.

When To Use

Trigger on requests to reflect on / audit / reconcile this marketplace's skills against

remembered feedback, or to apply outstanding memory feedback to skill files.

Workflow

Phase 1: Locate and load memory

Resolve the per-project memory directory. Claude Code encodes it by replacing every /

in the project path with -:

MEM="$HOME/.claude/projects/$(pwd | sed 's/\//-/g')/memory"
ls "$MEM"/MEMORY.md "$MEM"/*.md

Read MEMORY.md first (the index), then read every feedback_*.md memory — these carry

the actionable problems. Also read project_*.md memories that name a specific plugin

(they often record version-pinned fixes and "re-verify after upgrade" cues).

Phase 2: Extract candidate skill problems

From the feedback memories, build a list of concrete, checkable claims about skills. Each

candidate needs: the claim, the target skill/file it implicates, and how to verify it.

Skip memories that are pure preference (e.g. "reply in Chinese") with no skill artifact.

Recurring problem classes encoded in this project's memory (treat as a standing checklist):

in references/*.md or in soft prose (## Pre-operation Checks, Note:, warn user)

get skipped. They must be a CRITICAL: block in the SKILL.md body (L2).

hook. Verify by inspecting the live hooks field, not by trusting the remembered version.

model names, branch-landing assumptions, or version numbers drift.

Phase 3: Re-verify against current code (do not trust memory)

For each candidate, verify against the live files before changing anything. Memory carries a

"may be outdated" warning for a reason, and self-audits in this project have caught the

auditor's own just-written bugs (feedback_self_audit_caught_my_bugs,

verification-requirement-before-reporting). Concretely:

the model string / version).

WRONG (fix the memory instead), or NOT-APPLICABLE (note and move on).

When the change touches Claude Code's own API surface (hook schemas, frontmatter fields,

tool names), confirm current behavior with the claude-code-guide agent before editing

(use-claude-code-guide-agent) — do not edit from remembered API shape.

Phase 4: Fix the skill (STILL-BROKEN)

Apply the minimal change that resolves the verified problem, matching surrounding style:

reference as the detail pointer, not the sole home of the rule.

plus a detailed Phase 0), note in both that they must change together.

After editing a plugin's skill, bump its version in the plugin's plugin.json and sync the

matching entry in .claude-plugin/marketplace.json — these must stay equal (verify every

plugin.json version against marketplace.json before reporting). For README plugin-list

drift after add/remove/rename, defer to the project's /utils:update-readme.

Phase 5: Fix the memory (ALREADY-FIXED / WRONG)

When verification shows the memory is stale or wrong, correct the memory file instead of the

skill: update the version/date/claim, and keep the MEMORY.md index line in sync. If a

memory's name: slug changes, the filename-based MEMORY.md link still resolves, but check

for [[slug]] wikilinks that now dangle. Memory files live outside the git repo and need no

commit.

Phase 6: Validate and report

Validate touched plugins with the project's optimizer (/plugin-optimizer:optimize-plugin

or python3 plugin-optimizer/scripts/validate-plugin.py <plugin-path>). When the fix is a

hook or other guard script, test BOTH the should-act and should-pass paths before reporting

(feedback_self_audit_caught_my_bugs). Then report, per candidate: claim → verdict

(STILL-BROKEN / ALREADY-FIXED / WRONG / NOT-APPLICABLE) → action taken (skill edit with file

path, or memory correction). State what was verified and how.

Hard Rules

a skill or assert a fix based solely on memory contents.

When the user asks to commit the skill fixes, invoke the /git:commit skill via the Skill

tool — it handles staging and message generation.

extra comments, or abstractions the file does not already use.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.