reflect تایید شده

Self-improving skill that analyzes conversations for corrections and preferences, then persists them to skill files with optional Git versioning. Use when: (1) User runs "/reflect" or "/reflect [skill-name]" to manually extract learnings, (2) User says "reflect on" or "reflect off" to toggle automatic reflection, (3) User says "reflect status" to check mode, (4) User wants Claude to remember corrections for future sessions. Supports manual and automatic (hook-based) modes.

57از ۱۰۰
۱
ستاره
۱۴۱
دانلود
۲۴۹
بازدید

// نصب مهارت

نصب مهارت

مهارت‌ها کدهای شخص ثالث از مخازن عمومی GitHub هستند. SkillHub الگوهای مخرب شناخته‌شده را اسکن می‌کند اما نمی‌تواند امنیت را تضمین کند. قبل از نصب، کد منبع را بررسی کنید.

نصب سراسری (سطح کاربر):

npx skillhub install jainabhishek/reflect-skill/reflect

نصب در پروژه فعلی:

npx skillhub install jainabhishek/reflect-skill/reflect --project

skill.install.customTargetHelp

npx skillhub install jainabhishek/reflect-skill/reflect --target-dir /path/to/skills

مسیر پیشنهادی: ~/.claude/skills/reflect/

بررسی هوش مصنوعی

57
از ۱۰۰
کیفیت دستورالعمل55
دقت توضیحات58
کاربردی بودن56
صحت فنی58

Scored 57 — interesting self-improvement concept with hook integration and confidence-based categorization. Bash scripts add real automation. Marker file in /tmp is a minor TS concern.

betamoderateai-agent-usersself-improvementlearning-extractionagent-optimization
بررسی‌شده توسط claude-code در تاریخ ۱۴۰۴/۱۲/۲۸

محتوای SKILL.md

---
name: reflect
description: >
  Self-improving skill that analyzes conversations for corrections and preferences, then persists 
  them to skill files with optional Git versioning. Use when: (1) User runs "/reflect" or 
  "/reflect [skill-name]" to manually extract learnings, (2) User says "reflect on" or "reflect off" 
  to toggle automatic reflection, (3) User says "reflect status" to check mode, (4) User wants 
  Claude to remember corrections for future sessions. Supports manual and automatic (hook-based) modes.
---

# Reflect Skill

Analyze conversations to extract corrections, preferences, and best practices, then persist them to skill files. Supports manual triggering, automatic hooks, and Git versioning.

## Commands

| Command | Description |
|---------|-------------|
| `/reflect` | Analyze current session and propose skill updates |
| `/reflect [skill-name]` | Reflect and update a specific skill |
| `reflect on` | Enable automatic reflection via stop hook |
| `reflect off` | Disable automatic reflection |
| `reflect status` | Show current reflection mode |

## Manual Reflection Flow

### 1. Analyze Session for Signals

Scan the conversation and categorize by confidence:

**HIGH Confidence** - Explicit corrections
- "No, use X instead of Y"
- "Never [action] in this project"  
- "Always check for [condition]"

**MEDIUM Confidence** - Success patterns
- Approaches that worked after iteration
- Patterns user approved or praised

**LOW Confidence** - Observations
- Implied preferences
- Patterns to review later

### 2. Present Review & Approval

```
📊 Signals Detected:

HIGH CONFIDENCE:
- "Never generate button styles - reference existing components"
- "Always check for SQL injections"

MEDIUM CONFIDENCE:
- Arrow functions preferred for callbacks

LOW CONFIDENCE:
- Prefers concise explanations

📝 Proposed Changes to [skill-name].md:

+ ## Security
+ - Always validate database queries for SQL injection
+
+ ## Code Style  
+ - Never generate UI components; reference existing library

💬 Commit message: "Add SQL injection and UI component rules"

Accept changes? [Y/n/edit with natural language]
```

User options:
- `Y` - Accept all changes
- `n` - Reject
- Natural language: "Remove the arrow function one" or "Change the wording to..."

### 3. Update Skill & Commit

1. Locate target skill file (project or `~/.claude/skills/`)
2. Merge new learnings (newer rules override conflicts)
3. If Git repo: stage, commit with message, push

## Automatic Reflection

### Toggle Commands

```bash
reflect on      # Enable auto-reflection on session end
reflect off     # Disable auto-reflection
reflect status  # Check current mode
```

### How It Works

When enabled, the stop hook triggers automatic learning:

1. Session ends → stop hook fires
2. Analyzes conversation for learnings
3. Updates skill file (shows notification: "Learned from session: [skill-name]")
4. Commits to Git if configured

### Hook Configuration

The session-end hook is **auto-registered** when you install this plugin. No manual configuration needed.

State stored in `~/.claude/.reflect-state` (enabled/disabled).

## Git Integration

Version your skills to track evolution over time:

```bash
cd ~/.claude/skills
git init
git remote add origin <your-repo>
```

Benefits:
- See how skills evolve with each learning
- Rollback if a learning causes regressions  
- Track system improvement over time

## Learning Categories

| Category | Examples |
|----------|----------|
| Code Style | Naming conventions, formatting |
| Security | Input validation, SQL injection |
| Testing | Coverage requirements, edge cases |
| API Design | Endpoint conventions, responses |
| UI/UX | Component usage, accessibility |
| Workflow | PR process, commit format |

## Example

```
You: Review the auth module
Claude: [Reviews, misses SQL injection]
You: You missed SQL injection - always check for that

You: /reflect

Claude: 📊 HIGH: "Always check for SQL injections"
        
        📝 Proposed for security-review.md:
        + - Validate all database queries for SQL injection
        
        Accept? [Y/n]

You: Y

Claude: ✅ Updated security-review.md
        📤 Committed: "Add SQL injection validation rule"
```

Next session: Claude automatically checks for SQL injection.

## Goal

**Correct once, never again.** Build a self-improving system where learnings persist and compound over time.

مجوز

مجوز اعلام‌شده: MIT

MIT License

Copyright (c) 2026 jainabhishek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

مشاهدهٔ مجوز در مخزن منبعنسخهٔ منتشرشده در آن‌جا مرجع است.