Advanced Skills — Công cụ nâng cao

Bộ skills chuyên biệt cho các tác vụ phức tạp: debug có hệ thống, predict impact, generate scenarios, audit security.

Bảng tham chiếu nhanh

LệnhMô tảUse case
/ck-debugDebug systematic — root cause trước fixBug phức tạp, khó reproduce
/ck-planPlan implementation chi tiếtKhi /plan chưa đủ sâu
/ck-predict5 experts debate proposed changesTrước khi merge PR lớn
/ck-scenarioGenerate edge cases (12 dimensions)Viết test comprehensive
/ck-securitySTRIDE + OWASP security auditTrước khi deploy
/ck-loopIterative optimization loopTối ưu performance metric
/ck-autoresearchAutonomous research iterationsNghiên cứu tự động N lần

/ck-debug — Debug có hệ thống

Khác với /fix (fix nhanh), /ck-debug bắt buộc tìm root cause trước khi sửa.
1

Bước 1: Reproduce

Xác nhận bug có thể reproduce. Thu thập evidence.
2

Bước 2: Isolate

Thu hẹp phạm vi — module nào, function nào, condition nào.
3

Bước 3: Root cause

Xác định nguyên nhân gốc, không phải triệu chứng.
4

Bước 4: Fix + Verify

Sửa root cause. Viết test để prevent regression.

/ck-predict — 5 Experts Debate

5 expert personas tranh luận về proposed changes trước khi implement:
ExpertGóc nhìn
ArchitectArchitecture impact, scalability
SecurityVulnerabilities, attack vectors
PerformanceSpeed, memory, N+1 queries
UXUser experience, edge cases
OpsDeployment, monitoring, rollback

/ck-scenario — Generate Edge Cases

Phân tích feature qua 12 dimensions để generate comprehensive test scenarios:
DimensionVí dụ
Input boundariesMin/max values, empty strings, unicode
State transitionsLogin → logout → re-login, expired tokens
Concurrency2 users edit same resource simultaneously
Error recoveryNetwork drop mid-transaction
PermissionAdmin vs user vs guest access
Data volume1 record vs 100K records

/ck-security — STRIDE + OWASP Audit

/ck-security                       # Full security audit
/ck-security --auto-fix            # Audit + tự động fix
Scan code cho:
  • STRIDE: Spoofing, Tampering, Repudiation, Information disclosure, DoS, Elevation
  • OWASP Top 10: Injection, broken auth, XSS, SSRF, v.v.

/ck-loop & /ck-autoresearch — Iterative Optimization

/ck-loop 5 "Tối ưu query performance trên orders table"
/ck-autoresearch 3 "Best practices cho WebSocket scaling"
Chạy N iterations, mỗi iteration learn từ kết quả trước.

Khi nào dùng / không dùng

DùngKhông dùng
Bug phức tạp, cần root causeBug đơn giản (dùng /fix:fast)
Trước merge PR lớn (predict)Small changes, low risk
Viết test comprehensive (scenario)Quick test cho 1 function
Security review trước deployInternal tool, no user data
Performance optimization loopOne-off performance check