Back to list
aryateja2106

reflect

by aryateja2106

A Claude Code plugin that learns from session corrections and updates AI configuration files. Teach your AI once, it remembers forever.

0🍴 0📅 Jan 6, 2026

SKILL.md


name: Reflect description: Learn from session corrections and update AI configuration files. USE WHEN user says 'reflect', 'learn from this', 'remember this', 'teach you', 'update skills', OR user wants to persist corrections, prevent repeated mistakes, OR mentions reflection or session learnings.

Reflect

Analyzes sessions for corrections and updates configuration files to prevent repeated mistakes.

Workflow Routing

When executing a workflow, output this notification:

Running the **WorkflowName** workflow from the **Reflect** skill...
WorkflowTriggerFile
Analyze/reflect, /reflect analyzeworkflows/Analyze.md
ReviewAfter Analyze completesworkflows/Review.md
ApplyAfter Review approvalworkflows/Apply.md
AutoSession end (Stop hook), /reflect autoworkflows/Auto.md
Process/reflect process, after CheckQueue notificationworkflows/Process.md

Examples

Example 1: Manual reflection after work session

User: "/reflect"
→ Invokes Analyze workflow
→ Scans conversation for corrections ("Don't do X", "Use Y instead")
→ Presents Review UI with detected learnings
→ User selects which to apply and chooses scope (Project/Global)
→ Safely appends to target files
→ Commits changes with timestamped message

Example 2: Teach AI a new rule

User: "Remember: always use bun instead of npm in this project"
→ Invokes Analyze workflow (detects explicit instruction)
→ Shows: "Detected 1 learning: Use bun instead of npm"
→ User confirms, selects Project scope
→ Appends to CLAUDE.md

Example 3: After being corrected multiple times

User: "/reflect" (after correcting Claude on inline CSS 3 times)
→ Detects: "Don't use inline styles" (HIGH priority - repeated)
→ Shows preview of changes to CLAUDE.md
→ User approves
→ Creates constraint: "Never use inline CSS; use Tailwind"

Detection Patterns

HIGH Priority (Explicit Corrections)

  • "don't" / "dont" / "do not"
  • "never"
  • "wrong" / "incorrect"
  • "stop doing" / "stop using"
  • "use X instead" / "instead use"
  • "no," followed by instruction

MEDIUM Priority (Implicit Corrections)

  • "actually, ..." followed by alternative
  • User provides code immediately after Claude's attempt
  • Repeated clarifications (3+ times)

LOW Priority (Preferences)

  • "I prefer"
  • "let's use" / "we use"
  • "in this project"

Target Files

Project Scope (Default)

Detects and updates (in priority order):

  1. ./CLAUDE.md
  2. ./.cursorrules
  3. ./.github/copilot-instructions.md
  4. ./AGENTS.md

Global Scope

Updates skill files:

  • ~/.claude/Skills/{SkillName}/SKILL.md

Safety Rules

  1. Never edit existing content - Only append new sections/entries
  2. Always preview changes - Show diff before applying
  3. Git isolation - Only stage/commit reflect-modified files
  4. Backup before modify - Create .bak file before changes

Tools

The skill uses these shell tools located in tools/:

ToolPurpose
DetectTarget.shFind project/global config files
SafeAppend.shSafely append to markdown files
GitSafeCommit.shIsolated git commits
AutoReflect.shSession-end scanner (Stop hook)
CheckQueue.shSessionStart notification

Phase 2 (Implemented)

  • Auto workflow - Automatic analysis on session end (Stop hook)
  • Process workflow - Process queued reflections interactively
  • AutoReflect.sh - Lightweight scanner for Stop hook
  • CheckQueue.sh - SessionStart notification for pending items
  • Queue system - ~/.claude/Scratchpad/reflect-queue.md

Hook Integration

Stop Hook (Auto-queue):

# Run at session end to queue corrections
# Use ${CLAUDE_PLUGIN_ROOT} for plugin installations, or ~/.claude/Skills/reflect/tools/ for manual install
${CLAUDE_PLUGIN_ROOT}/skills/reflect/tools/AutoReflect.sh "$SESSION_ID"

SessionStart Hook (Notification):

# Check for pending reflections on session start
${CLAUDE_PLUGIN_ROOT}/skills/reflect/tools/CheckQueue.sh

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon