skillby noizu-labs-ml
reflect
Appends a self-review reflection block to the end of every response. Reviews for errors, security issues, pitfalls, improvements, and edge cases. Uses emoji indicators for quick scanning. Always runs at end of response.
Installs: 0
Used in: 1 repos
Updated: 2d ago
$
npx ai-builder add skill noizu-labs-ml/reflectInstalls to .claude/skills/reflect/
# Reflection Guide
## Purpose
Append a reflection block to the **end of every response** reviewing the response for potential issues, improvements, and oversights.
## Output Format
At the end of every response, append:
```
<npl-block type="reflection">
[reflection content with emoji indicators]
</npl-block>
```
## Emoji Indicators
| Emoji | Category | Use For |
|-------|----------|---------|
| š | Bug/Error | Logical errors, incorrect code, wrong assumptions |
| š | Security | Security vulnerabilities, unsafe practices, exposed secrets |
| ā ļø | Pitfall | Common mistakes, gotchas, things that often go wrong |
| š | Improvement | Performance gains, better approaches, optimizations |
| š§© | Edge Case | Unhandled scenarios, boundary conditions, null cases |
| š | TODO | Incomplete items, placeholders, things to revisit |
| š | Refactor | Code smell, duplication, structural improvements |
| š | Docs | Missing documentation, unclear explanations |
| ā
| Verified | Confirmed correct, tested, validated |
| ā | Question | Needs clarification, ambiguous requirements |
## Reflection Content
Review the response for:
1. **Correctness** ā Is the code/answer right?
2. **Security** ā Any vulnerabilities introduced?
3. **Edge cases** ā What wasn't handled?
4. **Improvements** ā What could be better?
5. **Completeness** ā What's missing?
## Examples
### Example 1: Code Response
After providing code for user authentication:
```
<npl-block type="reflection">
š Password not hashed before storage ā add bcrypt
š§© No handling for duplicate email registration
ā ļø Token expiry set to 30 days ā consider shorter for sensitive apps
š Could add refresh token rotation
ā
Input validation present
</npl-block>
```
### Example 2: Architecture Suggestion
After suggesting a caching strategy:
```
<npl-block type="reflection">
š§© Cache invalidation on updates not addressed
ā ļø Redis connection failure fallback not specified
š TODO: Define TTL values per resource type
ā
Pattern appropriate for read-heavy workload
</npl-block>
```
### Example 3: Bug Fix
After fixing a reported bug:
```
<npl-block type="reflection">
ā
Null check added resolves immediate issue
š§© Similar pattern at lines 45, 89 may have same bug
š Consider extracting to helper function
ā Unclear if empty string should be treated as null
</npl-block>
```
### Example 4: Clean Response
When response has no significant issues:
```
<npl-block type="reflection">
ā
Solution handles stated requirements
ā
Error handling in place
ā
Types are correct
</npl-block>
```
### Example 5: Complex Response
After a multi-file implementation:
```
<npl-block type="reflection">
š API key in config.ts should be env variable
š Race condition possible in async handler (line 34)
š§© No handling for network timeout
š§© Empty array response untested
ā ļø N+1 query in user lookup loop
š Add index on `user_id` column for query performance
š TODO: Add retry logic for transient failures
š Duplicate validation logic in create/update handlers
š Missing JSDoc on public methods
</npl-block>
```
## Format Rules
- One issue per line
- Start each line with emoji
- Keep descriptions brief (< 80 chars)
- Group related items together
- Always include at least one ā
if something is verified correct
- If nothing to note, still include block with ā
confirmations
## When to Run
**Every response.** No exceptions.
The reflection block is always the last thing in the response.
## DO
- Be specific (cite line numbers, function names)
- Be actionable (what to fix, not just what's wrong)
- Be honest (note real issues even if minor)
- Be concise (single line per issue)
## DO NOT
- Write paragraphs
- Be vague ("could be improved")
- Skip the block because response "seems fine"
- Put reflection block anywhere except the endQuick Install
$
npx ai-builder add skill noizu-labs-ml/reflectDetails
- Type
- skill
- Author
- noizu-labs-ml
- Slug
- noizu-labs-ml/reflect
- Created
- 2d ago