Smart suggestions

From Sir-chawakorn/power-ranger-toolkit · View interactive version

Smart suggestions is an AI agent skill from the GitHub repository Sir-chawakorn/power-ranger-toolkit. Provide intelligent suggestions for code improvements, next steps, and optimizations

How to use this skill

Skill file

💡 Smart Suggestions Skill


name: smart-suggestions

description: Provide intelligent suggestions for code improvements, next steps, and optimizations


🎯 Purpose

Proactively suggest improvements, optimizations, and next steps based on context analysis.

📋 When to Use

🔧 Suggestion Categories

1. Code Improvements

| Category | Example Suggestions |

|----------|---------------------|

| Performance | "Consider memoizing this component" |

| Readability | "This function could be split into smaller parts" |

| Security | "Add input validation here" |

| Accessibility | "Add aria-label to this button" |

2. Next Steps

Based on your current work, consider:
1. Adding tests for the new function
2. Updating documentation
3. Running security audit
4. Testing on mobile

3. Architecture

As your app grows, you might want to:
- Extract shared logic into hooks
- Create a design system
- Add error boundaries
- Implement proper logging

💡 Suggestion Templates

After Feature Complete

## 💡 Suggestions

### Immediate
- [ ] Add unit tests for [component]
- [ ] Update README with new feature

### Soon
- [ ] Add error handling for edge cases
- [ ] Consider adding loading states

### Later
- [ ] Extract reusable logic to hooks
- [ ] Add analytics tracking

During Code Review

## 💡 Improvement Suggestions

### Performance
- Line 45: Consider using `useMemo` for expensive calculation
- Line 78: This API call could be cached

### Readability
- Function `handleClick` is 50 lines, consider splitting
- Variable names could be more descriptive

### Security
- User input at line 23 should be sanitized

When Stuck

## 💡 Possible Approaches

### Option 1: [Approach A]
- Pros: [benefits]
- Cons: [drawbacks]
- Effort: Low/Medium/High

### Option 2: [Approach B]
- Pros: [benefits]
- Cons: [drawbacks]
- Effort: Low/Medium/High

### Recommendation
I suggest Option [X] because [reasoning].

🔍 Context Analysis

What to Analyze

| Context | Look For |

|---------|----------|

| Code | Patterns, anti-patterns, complexity |

| Project | Tech stack, conventions, size |

| User | Skill level, preferences, history |

| Task | Goals, constraints, requirements |

Suggestion Priority

| Priority | When to Suggest |

|----------|-----------------|

| 🔴 Critical | Security issues, bugs |

| 🟠 Important | Performance, accessibility |

| 🟡 Helpful | Readability, best practices |

| 🟢 Optional | Nice-to-haves, future ideas |

📊 Smart Patterns

Pattern: Suggest Tests

// After writing a function
if (functionCreated && !hasTests) {
  suggest("Add tests for " + functionName);
}

Pattern: Suggest Docs

// After API changes
if (apiChanged && !docsUpdated) {
  suggest("Update API documentation");
}

Pattern: Suggest Refactor

// If file is too long
if (fileLines > 300) {
  suggest("Consider splitting this file");
}

🎯 When NOT to Suggest

🔗 Related Skills

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.