best-practices
4
总安装量
4
周安装量
#50029
全站排名
安装命令
npx skills add https://github.com/yonatangross/skillforge-claude-plugin --skill best-practices
Agent 安装分布
claude-code
3
opencode
2
antigravity
2
windsurf
1
trae
1
Skill 文档
Best Practices – View Your Pattern Library
Display your aggregated best practices library, showing successful patterns and anti-patterns across all projects.
Usage
/best-practices # Show full library
/best-practices <category> # Filter by category
/best-practices --warnings # Show only anti-patterns
/best-practices --successes # Show only successes
/best-practices --stats # Show statistics only
Options
<category>– Filter by specific category (pagination, database, authentication, etc.)--warnings– Show only anti-patterns (failed patterns)--successes– Show only successful patterns--stats– Show statistics summary without individual patterns
Workflow
1. Query mem0 for Best Practices
Use mcp__mem0__search_memories with:
{
"query": "patterns outcomes",
"filters": {
"OR": [
{ "metadata.outcome": "success" },
{ "metadata.outcome": "failed" }
]
},
"limit": 100
}
2. Aggregate Results
Group patterns by category, then by outcome:
{
"pagination": {
"successes": [...],
"failures": [...]
},
"authentication": {
"successes": [...],
"failures": [...]
}
}
3. Calculate Statistics
For each pattern:
- Count occurrences across projects
- Calculate success rate: successes / (successes + failures)
- Note which projects contributed
4. Display Output
Full Library View:
ð Your Best Practices Library
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
PAGINATION
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
Cursor-based pagination (3 projects, always worked)
"Scales well for large datasets"
â Offset pagination (failed in 2 projects)
"Caused timeouts on tables with 1M+ rows"
ð¡ Lesson: Use cursor-based for large datasets
AUTHENTICATION
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
JWT + httpOnly refresh tokens (4 projects)
"Secure and scalable for web apps"
â ï¸ Session-based auth (mixed: 1 success, 1 failure)
"Works but scaling issues in high-traffic scenarios"
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
ð Summary: 8 patterns | 5 â
successes | 3 â anti-patterns
ð¡ Use `/remember --success` or `/remember --failed` to add more
Stats Only View (--stats):
ð Best Practices Statistics
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Total Patterns: 15
âââ â
Successful: 10 (67%)
âââ â Anti-patterns: 5 (33%)
âââ â ï¸ Mixed: 2
Categories:
âââ pagination: 3 patterns (2 â
, 1 â)
âââ authentication: 4 patterns (3 â
, 1 â ï¸)
âââ database: 5 patterns (4 â
, 1 â)
âââ api: 3 patterns (1 â
, 2 â)
Projects Contributing: 7
Last Updated: 2 days ago
Filtered View (by category):
ð Best Practices: PAGINATION
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
Cursor-based pagination (3 projects, always worked)
"Scales well for large datasets"
Projects: project-a, project-b, project-c
â Offset pagination (failed in 2 projects)
"Caused timeouts on tables with 1M+ rows"
ð¡ Lesson: Use cursor-based for large datasets
Projects: project-a, project-d
Pattern Confidence Indicators
| Icon | Meaning |
|---|---|
| â | Strong success (3+ projects, 100% success rate) |
| â | Moderate success (1-2 projects or some failures) |
| â ï¸ | Mixed results (both successes and failures) |
| â | Anti-pattern (only failures) |
| ð´ | Strong anti-pattern (3+ projects, all failed) |
Empty Library
ð Your Best Practices Library is empty
Start building it with:
⢠/remember --success "Pattern that worked well"
⢠/remember --failed "Pattern that caused problems"
Your patterns will be tracked across all projects and help
Claude warn you before repeating past mistakes.
Proactive Integration
See references/proactive-warnings.md for automatic anti-pattern detection.
Related Skills
- code-review-playbook: Review best practices
- api-design-framework: API design best practices
- testing-strategy: Testing best practices
- security-hardening: Security best practices
Related Commands
/remember --success <text>– Add a successful pattern/remember --failed <text>– Add an anti-pattern/recall <query>– Search all memories (not just best practices)