บันทึกเทคนิคโค้ดดีๆ | Save useful code tricks
Save useful code tricks to your memory bank with categorized examples. Use this to store reusable patterns, optimizations, and best practices you discover while coding.
/plugin marketplace add MaouStan/ai-productivity-kit/plugin install ai-productivity-kit@ai-productivity-kitบันทึกเทคนิคโค้ดดีๆ Save useful code tricks
ψ/memory/tricks//ai-kit:trick [ภาษา/เฟรมเวิร์ก] [เทคนิค]
# Trick: {{title}}
**Language**: {{language}}
**Date**: {{YYYY-MM-DD}}
## The Trick
{{description}}
## Code Example
\`\`\`{{language}}
{{code}}
\`\`\`
## When to Use
{{use_cases}}
## Why It Works
{{explanation}}
User: /ai-kit:trick python List comprehension แทน for loop ง่ายๆ
AI:
✅ Trick saved to `ψ/memory/tricks/python_list_comprehension.md`
# Trick: List Comprehension
**Language**: Python
**Date**: 2026-01-03
## The Trick
ใช้ list comprehension แทน for loop + append แบบเดิม
## Code Example
```python
# ❌ Old way
result = []
for x in range(10):
if x % 2 == 0:
result.append(x * 2)
# ✅ List comprehension
result = [x * 2 for x in range(10) if x % 2 == 0]