Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计异常

reflect技能安全扫描

Agent Skill

reflect 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

333

周安装

14

GitHub Stars

24

下载量

116
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:reflect(技能安全扫描)
来源仓库:https://github.com/rjmurillo/ai-agents
仓库路径:skills/reflect
安装命令:
npx skills add https://github.com/rjmurillo/ai-agents --skill reflect
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/rjmurillo/ai-agents --skill reflect

简介

reflect 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中进行安全扫描或风险识别。
  • 通过 npx skills add 命令从 rjmurillo/ai-agents 安装。
  • 使用前应评估其对代码执行的潜在影响。
  • 原始 SKILL.md 未提供内容,功能尚不明确。

SKILL.md

Reflect Skill

Critical learning capture system that prevents repeating mistakes and preserves successful patterns across sessions.

Analyze the current conversation and propose improvements to skill-based memories based on what worked, what didn't, and edge cases discovered. Every correction is a learning opportunity - invoke proactively to build institutional knowledge.


Triggers

Trigger PhraseOperation
reflect on this sessionExtract learnings from conversation
learn from this mistakeCapture correction patterns
capture what we learnedDocument session insights
improve skill {name}Target specific skill memory
what did we learnReview and store patterns

Also monitor user phrasing such as "what if...", "ensure", or "don't forget". These phrases should immediately route into the MEDIUM trigger tables below.

🔴 HIGH Priority Triggers (Invoke Immediately)

TriggerExampleWhy Critical
User correction"no", "wrong", "not like that", "never do"Captures mistakes to prevent repetition
Chesterton's Fence"you removed that without understanding"Documents architectural decisions
Immediate fixes"debug", "root cause", "fix all"Learns from errors in real-time

🟡 MEDIUM Priority Triggers (Invoke After Multiple)

TriggerExampleWhy Important
User praise"perfect", "exactly", "great"Reinforces successful patterns
Tool preferences"use X instead of Y", "prefer", "rather than"Builds workflow preferences
Edge cases"what if X happens?", "don't forget", "ensure"Captures scenarios to handle
QuestionsShort questions after outputMay indicate confusion or gaps

🟢 LOW Priority Triggers (Invoke at Session End)

TriggerExampleWhy Useful
Repeated patternsFrequent use of specific commands/toolsIdentifies workflow preferences
Session endAfter skill-heavy workConsolidates all session learnings

Original Triggers (Still Supported)

PhraseAction
"reflect"Full analysis of current session
"improve skill"Target specific skill for improvement
"learn from this"Extract learnings from recent interaction
"what did we learn"Summarize accumulated learnings

When to Use

Use this skill when:

  • User corrects your output ("no", "wrong", "not like that")
  • User praises specific output ("perfect", "exactly")
  • Edge cases are discovered during work
  • Session end after skill-heavy work
  • Want to capture learnings before they are lost

Use retrospective instead when:

  • Conducting a full session retrospective (broader scope)
  • Analyzing multi-session patterns across the project

Proactive Invocation Reminder

Don't wait for users to ask! Invoke reflect immediately when you detect:

  1. User says "no" → Invoke reflect NOW (captures correction)
  2. User says "perfect" → Invoke reflect NOW (captures success pattern)
  3. User asks "what if" → Invoke reflect NOW (captures edge case)
  4. You used multiple skills → Invoke reflect at END (captures all learnings)
  5. User corrected your output → Invoke reflect IMMEDIATELY (critical learning)

Why this matters: Without proactive reflection, learnings are LOST. The Stop hook captures some patterns, but manual reflection is MORE ACCURATE because you have full conversation context.

Cost: ~30 seconds of analysis. Benefit: Prevents repeating mistakes forever.


Process

Phase 1: Identify the Target Skill

Locate the skill-based memory to update:

  1. Check Serena memories: Look for files ending with -observations.md in .serena/memories/
  2. Infer from context: Identify which skill(s) were used in the conversation
  3. Create if needed: If missing, propose {skill-name}-observations.md (skill observations pattern)

Storage Locations:

  • Serena MCP (canonical): .serena/memories/{skill-name}-observations.md via mcp__serena__write_memory
  • Contingency (Serena unavailable): Manually edit the same file in Git and note the manual update in the session log for later Serena sync

Phase 2: Analyze the Conversation

Scan the conversation for learning signals with confidence levels:

HIGH Confidence: Corrections

User actively steered or corrected output. These are the most valuable signals.

Detection patterns:

  • Explicit rejection: "no", "not like that", "that's wrong", "I meant"
  • Strong directives: "never do", "always do", "don't ever"
  • Immediate requests for changes after generation
  • User provided alternative implementation
  • User explicitly corrected output format/structure

Example:

User: "No, use the PowerShell skill script instead of raw gh commands"
→ [HIGH] + Add constraint: "Use PowerShell skill scripts, never raw gh commands"

MEDIUM Confidence: Success Patterns

Output was accepted or praised. Good signals but may be context-specific.

Detection patterns:

  • Explicit praise: "perfect", "great", "yes", "exactly", "that's it"
  • Implicit acceptance: User built on top of output without modification
  • User proceeded to next step without corrections
  • Output was committed/merged without changes

Example:

User: "Perfect, that's exactly what I needed"
→ [MED] + Add preference: "Include example usage in script headers"

MEDIUM Confidence: Edge Cases

Scenarios the skill didn't anticipate. Opportunities for improvement.

Detection patterns:

  • Questions skill didn't answer
  • Workarounds user had to apply
  • Features user asked for that weren't covered
  • Error handling gaps discovered

Example:

User: "What if the file doesn't exist?"
→ [MED] ~ Add edge case: "Handle missing file scenario"

LOW Confidence: Preferences

Accumulated patterns over time. Need more evidence before formalizing.

Detection patterns:

  • Repeated choices in similar situations
  • Style preferences shown implicitly (formatting, naming)
  • Tool/framework preferences
  • Workflow preferences

Example:

User consistently uses `-Force` flag
→ [LOW] ~ Note for review: "User prefers -Force flag for overwrites"

Confidence Threshold

Only propose changes when sufficient evidence exists:

ThresholdAction
≥1 HIGH signalAlways propose (user explicitly corrected)
≥2 MED signalsPropose (sufficient pattern)
≥3 LOW signalsPropose (accumulated evidence)
1-2 LOW onlySkip (insufficient evidence), note for next session

Phase 3: Propose Learnings

Present findings using WCAG AA accessible colors (4.5:1 contrast ratio):

┌─────────────────────────────────────────────────────────────┐
│ SKILL REFLECTION: {skill-name}                              │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│ [HIGH] + Add constraint: "{specific constraint}"            │
│   Source: "{quoted user correction}"                        │
│                                                             │
│ [MED]  + Add preference: "{specific preference}"            │
│   Source: "{evidence from conversation}"                    │
│                                                             │
│ [MED]  + Add edge case: "{scenario}"                        │
│   Source: "{question or workaround}"                        │
│                                                             │
│ [LOW]  ~ Note for review: "{observation}"                   │
│   Source: "{pattern observed}"                              │
│                                                             │
├─────────────────────────────────────────────────────────────┤
│ Apply changes? [Y/n/edit]                                   │
└─────────────────────────────────────────────────────────────┘

Color Key (accessible):

  • [HIGH] - Red/bold: Mandatory corrections (user explicitly said "no")
  • [MED] - Yellow/amber: Recommended additions
  • [LOW] - Blue/dim: Notes for later review

User Response Handling:

ResponseAction
Y (yes)Proceed to Step 4 (update memory)
n (no)Abort update, ask "What would you like to change or was this not useful?"
editPresent each finding individually, allow user to modify/reject each one

On rejection (n):

  1. Log that reflection was declined (for future pattern analysis)
  2. Ask user if they want to revise the analysis or skip entirely
  3. If skip, end workflow without memory update

On edit:

  1. Present first finding with options: [keep/modify/remove]
  2. If modify, accept user's revised text
  3. Repeat for each finding
  4. Confirm final list before applying

Phase 4: Persist Learnings to Memory

ALWAYS show changes before applying.

After user approval:

  1. Read existing memory (if exists)
  2. Append new learnings with timestamp and session reference
  3. Preserve existing content - never remove without explicit request
  4. Extract code citations (Phase 4 Enhancement - see below)
  5. Write to file: .serena/memories/{skill-name}-observations.md

Storage Strategy:

  1. Serena MCP (canonical): mcp__serena__write_memory(memory_file_name="{name}-observations", memory_content="...")
  2. If Serena unavailable (contingency): path=".serena/memories/{name}-observations.md" # Append new learnings to existing file (create if missing) echo "$newLearnings" >> "$path" git add "$path" git commit -m "chore(memory): update {name} skill sidecar learnings" Record the manual edit in the session log so Serena MCP can replay the update when the service is available again.

Memory Format:

# Skill Sidecar Learnings: {Skill Name}

**Last Updated**: {ISO date}
**Sessions Analyzed**: {count}

## Constraints (HIGH confidence)

- {constraint 1} (Session {N}, {date})
- {constraint 2} (Session {N}, {date})

## Preferences (MED confidence)

- {preference 1} (Session {N}, {date})
- {preference 2} (Session {N}, {date})

## Edge Cases (MED confidence)

- {edge case 1} (Session {N}, {date})
- {edge case 2} (Session {N}, {date})

## Notes for Review (LOW confidence)

- {note 1} (Session {N}, {date})
- {note 2} (Session {N}, {date})

Phase 4 Enhancement: Auto-Citation Capture

When persisting learnings that reference specific code locations, automatically capture citations:

  1. Detect code references in learning text:

- Inline code references: ` path/to/file.ext line N - Function references: functionName() in file.ext ` - Explicit citations: "See: file.ext:42"

  1. Extract citation metadata: file path, line number, snippet (if available)
  2. Add citations to memory frontmatter: python -m memory_enhancement add-citation <memory-id> --file <path> --line <num> --snippet <text>
  3. Update confidence score based on initial verification

Detection Patterns:

PatternExampleExtraction
Inline code + lineIn ` src/client/constants.ts line 42 `file=src/client/constants.ts, line=42
Function in file` handleError() in src/utils.ts `file=src/utils.ts (file-level)
Explicit citationSee: src/api.py:100file=src/api.py, line=100

Integration Point:

After user approves learnings (step 4 above), before writing to Serena:

  1. Parse learning text for code references using patterns above
  2. For each reference found:

- Extract file path, line number, and snippet - Call python -m memory_enhancement add-citation <memory-id> --file <path> --line <num> --snippet <text>

  1. If citation extraction fails, proceed without citations (non-blocking)
  2. Proceed with normal Serena MCP write

Example:

Learning text: "The bug was in scripts/health.py line 45, where we forgot to handle None"

  1. Extract: file=scripts/health.py, line=45, snippet="handle None"
  2. Add citation: python -m memory_enhancement add-citation memory-observations --file scripts/health.py --line 45 --snippet "handle None"
  3. Write learning to Serena with citation attached

Decision Tree

User says "reflect" or similar?
│
├─► YES
│   │
│   ├─► Identify skill(s) used in conversation
│   │   │
│   │   └─► Skill identified?
│   │       │
│   │       ├─► YES → Analyze conversation for signals
│   │       │   │
│   │       │   └─► Meets confidence threshold?
│   │       │       │
│   │       │       ├─► YES → Present findings, await approval
│   │       │       │   │
│   │       │       │   ├─► User says Y → Update memory file
│   │       │       │   │   │
│   │       │       │   │   ├─► Serena available? → Use MCP write
│   │       │       │   │   └─► Serena unavailable? → Use Git fallback
│   │       │       │   │
│   │       │       │   ├─► User says n → Ask for feedback
│   │       │       │   │   │
│   │       │       │   │   ├─► User wants revision → Re-analyze
│   │       │       │   │   └─► User skips → End workflow
│   │       │       │   │
│   │       │       │   └─► User says edit → Interactive review
│   │       │       │       │
│   │       │       │       └─► Per-finding [keep/modify/remove]
│   │       │       │
│   │       │       └─► NO → Report "Insufficient evidence. Note for next session."
│   │       │
│   │       └─► NO → Ask user which skill to reflect on
│   │           │
│   │           ├─► User specifies skill → Continue with that skill
│   │           └─► User says "none" → End workflow
│   │
│   └─► Multiple skills?
│       │
│       └─► Analyze each, group findings by skill, present together
│
└─► NO → This skill not invoked

Examples

Example 1: Correction Detected

Conversation:
User: "Create a PR for this change"
Agent: [runs gh pr create directly]
User: "No, use the github skill script!"

Analysis:
[HIGH] + Add constraint: "Always use .claude/skills/github/ scripts for PR operations"
  Source: User correction - "No, use the github skill script!"

Example 2: Success Pattern

Conversation:
User: "Add error handling"
Agent: [adds try/catch with specific error types]
User: "Perfect! That's exactly what I wanted"

Analysis:
[MED] + Add preference: "Use specific error types in catch blocks, not generic [Exception]"
  Source: User approval after seeing specific error types

Example 3: Edge Case Discovery

Conversation:
User: "Run the build"
Agent: [runs build command]
User: "Wait, what if the node_modules folder doesn't exist?"

Analysis:
[MED] + Add edge case: "Check for node_modules existence before build"
  Source: User question about missing dependencies

Use Cases

1. Code Review Skills

Capture learnings about code review patterns:

  • Style guide rules: User corrections on formatting, naming, structure
  • Security patterns: Security vulnerabilities caught, OWASP patterns enforced
  • Severity levels: When issues are P0 vs P1 vs P2
  • False positives: Patterns that look like issues but aren't

Example memory: .serena/memories/code-review-observations.md

2. API Design Skills

Track API design decisions:

  • Naming conventions: REST endpoint patterns, verb choices
  • Error formats: HTTP status codes, error response structure
  • Auth patterns: OAuth, JWT, API key patterns
  • Versioning style: URL versioning, header versioning

Example memory: .serena/memories/api-design-observations.md

3. Testing Skills

Remember testing preferences:

  • Coverage targets: Minimum % required, critical paths
  • Mocking patterns: When to mock vs integration test
  • Assertion styles: Preferred assertion libraries, patterns
  • Test naming: Convention for test method names

Example memory: .serena/memories/testing-observations.md

4. Documentation Skills

Learn documentation patterns:

  • Structure/format: Section order, heading levels
  • Code examples: Real vs pseudo-code, language choice
  • Tone preferences: Formal vs casual, active vs passive voice
  • Diagram styles: Mermaid vs ASCII, detail level

Example memory: .serena/memories/documentation-observations.md


Anti-Patterns

AvoidWhyInstead
Applying without showingUser loses visibilityAlways preview changes
Overwriting existing learningsLoses historyAppend with timestamps
Generic observationsNot actionableBe specific and contextual
Ignoring LOW confidenceLose valuable patternsTrack for future validation
Creating memory for one-offNoiseWait for repeated patterns

Integration

With Session Protocol

Run reflection at session end as part of retrospective:

## Session End Checklist
- [ ] Complete session log
- [ ] Run skill reflection (if skills were used)
- [ ] Update Serena memory
- [ ] Commit changes

With Memory Skill

Skill memories integrate with the memory system:

# Search skill sidecar learnings
python3 .claude/skills/memory/scripts/search_memory.py --query "github-observations constraints"

# Read specific skill sidecar
Read .serena/memories/github-observations.md

With Serena

If Serena MCP is available:

mcp__serena__read_memory(memory_file_name="github-observations")
mcp__serena__write_memory(memory_file_name="github-observations", memory_content="...")

Verification

ActionVerification
Analysis completeSignals categorized by confidence
User approvedExplicit Y or approval statement
Memory updatedFile written to .serena/memories/
Changes preservedExisting content not lost
Commit readyChanges staged, message drafted

Design Decisions

Agent Sidecar Naming: {skill-name}-observations.md

Decision: Skill memories follow the ADR-007 sidecar pattern (e.g., github-observations.md).

Rationale:

  • ADR-007 Alignment: Reuses the agent sidecar convention instead of inventing a parallel structure
  • ADR-017 Compliance: Keeps {domain}-{description} format while making "skill-sidecar" explicit
  • Discovery: Sidecars are now referenced in memory-index.md, preventing orphaned learnings
  • Single Canonical Store: Serena MCP and Git both write to the same file path, eliminating dual-governance ambiguity

Migration: Rename {skill}-observations.md (or legacy skill-{name}.md) to {skill}-observations.md and update index references.

Serena vs Forgetful Roles

  • Serena MCP remains the canonical record. Every learning is persisted to the {skill}-observations.md file.
  • Forgetful is optional and used for semantic lookup only. When storing supporting context, tag the entry with skill-{name} and reference the Serena sidecar instead of duplicating the content.

Relationship to curating-memories

  • curating-memories = general-purpose maintenance of any memory artifact (linking, pruning, marking obsolete).
  • reflect = targeted retrospective that feeds those artifacts with new learnings.
  • When a sidecar accumulates conflicting guidance, route the file to curating-memories for cleanup.

Session Protocol Integration

  • Add "Run skill reflection if ≥3 distinct skills used" to the Session End checklist.
  • Document any manual sidecar edits (when Serena MCP is unavailable) in the session log before completion.
  • Invoke reflect immediately after the Stop hook highlights high-confidence learnings so the session log and sidecar stay in sync.

Extension Points

  1. Curating memories – route conflicting or stale learnings to curating-memories for consolidation.
  2. Memory skill – use memory skill for search/recall before proposing redundant learnings.
  3. Forgetful – optionally mirror high-confidence learnings into Forgetful with skill-{name} tags for semantic recall.
  4. Session log fixer – after reflection, ensure the session log captures the learning summary via session-log-fixer.

Related

SkillRelationship
memorySkill memories are part of Tier 1
using-forgetful-memoryAlternative storage for skill learnings
curating-memoriesFor maintaining/pruning skill memories
retrospectiveFull session retrospective (this is mini version)

Commit Convention

When committing skill observation updates:

chore(memory): update {skill-name} skill sidecar learnings (session {N})

- Added {count} constraints (HIGH confidence)
- Added {count} preferences (MED confidence)
- Added {count} edge cases (MED confidence)
- Added {count} notes (LOW confidence)

Session: {session-id}

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.16%
按下载量换算41

Claude

28.32%
按下载量换算33

Cursor

17.67%
按下载量换算20

Gemini CLI

9.04%
按下载量换算10

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills