@leejungkiin/awkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +146 -0
  3. package/VERSION +1 -0
  4. package/bin/awf.js +549 -0
  5. package/bin/awk.js +1759 -0
  6. package/core/AGENTS.md +39 -0
  7. package/core/GEMINI.md +202 -0
  8. package/core/GEMINI.md.bak +244 -0
  9. package/core/orchestrator.md +58 -0
  10. package/package.json +46 -0
  11. package/schemas/brain.schema.json +342 -0
  12. package/schemas/preferences.schema.json +95 -0
  13. package/schemas/session.schema.json +112 -0
  14. package/skill-packs/neural-memory/README.md +111 -0
  15. package/skill-packs/neural-memory/pack.json +35 -0
  16. package/skill-packs/neural-memory/schemas/brain-snapshot.json +167 -0
  17. package/skill-packs/neural-memory/skills/nm-memory-audit/SKILL.md +157 -0
  18. package/skill-packs/neural-memory/skills/nm-memory-evolution/SKILL.md +202 -0
  19. package/skill-packs/neural-memory/skills/nm-memory-intake/SKILL.md +135 -0
  20. package/skill-packs/neural-memory/skills/nm-memory-sync/SKILL.md +184 -0
  21. package/skill-packs/neural-memory/workflows/nm-import.md +73 -0
  22. package/skill-packs/neural-memory/workflows/nm-recall.md +67 -0
  23. package/skill-packs/neural-memory/workflows/nm-snapshot.md +69 -0
  24. package/skills/adaptive-language/SKILL.md +189 -0
  25. package/skills/ambient-brain/SKILL.md +314 -0
  26. package/skills/ambient-brain/brain-router.md +185 -0
  27. package/skills/ambient-brain/brain-templates.md +201 -0
  28. package/skills/auto-save/SKILL.md +223 -0
  29. package/skills/awf-adaptive-language/SKILL.md +189 -0
  30. package/skills/awf-context-help/SKILL.md +180 -0
  31. package/skills/awf-error-translator/SKILL.md +153 -0
  32. package/skills/awf-session-restore/SKILL.md +270 -0
  33. package/skills/awf-version-tracker/SKILL.md +32 -0
  34. package/skills/awf-version-tracker/scripts/snapshot.sh +22 -0
  35. package/skills/beads-manager/SKILL.md +323 -0
  36. package/skills/brainstorm-agent/SKILL.md +295 -0
  37. package/skills/context-help/SKILL.md +180 -0
  38. package/skills/error-translator/SKILL.md +153 -0
  39. package/skills/ios-engineer/SKILL.md +101 -0
  40. package/skills/memory-sync/SKILL.md +378 -0
  41. package/skills/memory-sync/memory-router.md +185 -0
  42. package/skills/memory-sync/memory-templates.md +201 -0
  43. package/skills/orchestrator/SKILL.md +193 -0
  44. package/skills/session-restore/SKILL.md +240 -0
  45. package/templates/CODEBASE.md +80 -0
  46. package/templates/brain.example.json +321 -0
  47. package/templates/preferences.example.json +21 -0
  48. package/templates/project-identity/android.json +28 -0
  49. package/templates/project-identity/backend-nestjs.json +24 -0
  50. package/templates/project-identity/expo.json +27 -0
  51. package/templates/project-identity/ios.json +27 -0
  52. package/templates/project-identity/web-nextjs.json +24 -0
  53. package/templates/session.example.json +53 -0
  54. package/templates/specs/design-template.md +166 -0
  55. package/templates/specs/requirements-template.md +65 -0
  56. package/templates/specs/tasks-template.md +132 -0
  57. package/templates/structures/android.txt +10 -0
  58. package/templates/structures/backend-nestjs.txt +6 -0
  59. package/templates/structures/expo.txt +9 -0
  60. package/templates/structures/ios.txt +9 -0
  61. package/templates/structures/web-nextjs.txt +6 -0
  62. package/templates/workflow_dual_mode_template.md +87 -0
  63. package/workflows/_uncategorized/README.md +339 -0
  64. package/workflows/_uncategorized/ads-creative.md +357 -0
  65. package/workflows/_uncategorized/ads-full-optimization.md +308 -0
  66. package/workflows/_uncategorized/ads-plan.md +247 -0
  67. package/workflows/_uncategorized/ads-user-analysis.md +337 -0
  68. package/workflows/_uncategorized/skill-health.md +35 -0
  69. package/workflows/_uncategorized/skill-rollback.md +35 -0
  70. package/workflows/ads/admob.md +62 -0
  71. package/workflows/ads/ads-analyst.md +201 -0
  72. package/workflows/ads/ads-audit.md +106 -0
  73. package/workflows/ads/ads-optimize.md +97 -0
  74. package/workflows/ads/ads-targeting.md +241 -0
  75. package/workflows/ads/adsExpert.md +160 -0
  76. package/workflows/ads/smali-ads-config.md +400 -0
  77. package/workflows/ads/smali-ads-flow.md +331 -0
  78. package/workflows/ads/smali-ads-interstitial.md +377 -0
  79. package/workflows/ads/smali-ads-native.md +382 -0
  80. package/workflows/context/auto-execution-workflow.md +291 -0
  81. package/workflows/context/auto-implement.md +211 -0
  82. package/workflows/context/codebase-sync.md +163 -0
  83. package/workflows/context/logic-reasoning-workflow.md +260 -0
  84. package/workflows/context/next.md +195 -0
  85. package/workflows/context/recap.md +212 -0
  86. package/workflows/context/save-brain.md +285 -0
  87. package/workflows/context/user-intent-analysis-workflow.md +206 -0
  88. package/workflows/expert/codeExpert.md +126 -0
  89. package/workflows/expert/debugExpert.md +136 -0
  90. package/workflows/expert/planExpert.md +112 -0
  91. package/workflows/git/cloudflare-tunnel.md +135 -0
  92. package/workflows/git/git-commit-workflow.md +75 -0
  93. package/workflows/git/hotfix.md +357 -0
  94. package/workflows/git/release-notes.md +160 -0
  95. package/workflows/git/rollback.md +52 -0
  96. package/workflows/git/smart-git-ops.md +103 -0
  97. package/workflows/lifecycle/brainstorm.md +377 -0
  98. package/workflows/lifecycle/code.md +663 -0
  99. package/workflows/lifecycle/debug.md +116 -0
  100. package/workflows/lifecycle/deploy.md +95 -0
  101. package/workflows/lifecycle/init.md +152 -0
  102. package/workflows/lifecycle/master-code-workflow.md +300 -0
  103. package/workflows/lifecycle/migration.md +196 -0
  104. package/workflows/lifecycle/plan.md +91 -0
  105. package/workflows/lifecycle/refactor.md +165 -0
  106. package/workflows/lifecycle/run.md +52 -0
  107. package/workflows/lifecycle/test.md +91 -0
  108. package/workflows/meta/customize.md +346 -0
  109. package/workflows/meta/file-protection-rules.md +129 -0
  110. package/workflows/meta/help.html +350 -0
  111. package/workflows/meta/project-identity-enforcement.md +180 -0
  112. package/workflows/mobile/app-analysis.md +64 -0
  113. package/workflows/mobile/maestro-qa-workflow.md +470 -0
  114. package/workflows/mobile/maestro-test-workflow.md +84 -0
  115. package/workflows/mobile/structure-clean-architect.md +271 -0
  116. package/workflows/mobile/turbo-mobile-build.md +190 -0
  117. package/workflows/quality/accessibility-audit.md +311 -0
  118. package/workflows/quality/audit.md +217 -0
  119. package/workflows/quality/bug-hunter.md +243 -0
  120. package/workflows/quality/code-janitor.md +209 -0
  121. package/workflows/quality/code-quality-rules.md +132 -0
  122. package/workflows/quality/performance-audit.md +343 -0
  123. package/workflows/quality/project-audit.md +61 -0
  124. package/workflows/quality/self-healing-test.md +192 -0
  125. package/workflows/quality/ui-review.md +130 -0
  126. package/workflows/quality/ux-audit.md +213 -0
  127. package/workflows/quality/visual-debug.md +34 -0
  128. package/workflows/roles/oracle.md +267 -0
  129. package/workflows/roles/product-manager-workflow.md +52 -0
  130. package/workflows/roles/qa-engineer-workflow.md +41 -0
  131. package/workflows/roles/tech-lead-workflow.md +45 -0
  132. package/workflows/roles/ui-ux-designer-workflow.md +42 -0
  133. package/workflows/roles/vibe-coding-master-workflow.md +52 -0
  134. package/workflows/ui/app-screen-analyzer.md +152 -0
  135. package/workflows/ui/create-feature.md +332 -0
  136. package/workflows/ui/create-spec-architect.md +184 -0
  137. package/workflows/ui/design-to-ui.md +308 -0
  138. package/workflows/ui/ui-first-methodology.md +279 -0
  139. package/workflows/ui/visualize.md +298 -0
@@ -0,0 +1,337 @@
1
+ # WORKFLOW: /ads-user-analysis - Phân tích & Phát hiện Người dùng Tiềm năng
2
+
3
+ Bạn là **Antigravity User Insight Expert** - chuyên gia phân tích dữ liệu để phát hiện nhóm người dùng tiềm năng bị bỏ qua.
4
+
5
+ ---
6
+
7
+ ## 🎯 MỤC TIÊU
8
+
9
+ - Phân tích dữ liệu từ Play Console, App Store, AdMob
10
+ - Phát hiện thị trường/nhóm người dùng tiềm năng chưa được khai thác
11
+ - Đề xuất chiến lược targeting tối ưu
12
+
13
+ ---
14
+
15
+ ## PHASE 1: THU THẬP DỮ LIỆU
16
+
17
+ ### 1.1 Google Play Console
18
+ ```
19
+ 📊 Yêu cầu user cung cấp CSV:
20
+
21
+ 1. Store Listing Conversion:
22
+ - "View by: Country/Region" → conversion by country
23
+ - "View by: Search Term" → keyword performance
24
+ - CSV starts: "country / region, store listing visitors" hoặc "search term, store listing visitors"
25
+
26
+ 2. User Acquisition:
27
+ - Installs by country
28
+ - Organic vs Paid breakdown
29
+
30
+ 3. Ratings & Reviews:
31
+ - By country/language
32
+ ```
33
+
34
+ ### 1.2 App Store Connect (iOS)
35
+ ```
36
+ 🍎 Yêu cầu user cung cấp:
37
+
38
+ 1. App Analytics:
39
+ - Impressions, Downloads by Territory
40
+ - Source Type breakdown
41
+
42
+ 2. Sales & Trends:
43
+ - Units by Territory
44
+ ```
45
+
46
+ ### 1.3 AdMob Revenue
47
+ ```
48
+ 💰 Yêu cầu CSV với cấu trúc:
49
+
50
+ - Country, Estimated Revenue, eCPM, Impressions, Ad Requests
51
+ - Hoặc format tương tự
52
+ ```
53
+
54
+ ### 1.4 Google Ads (Bổ sung)
55
+ ```
56
+ 📈 Sử dụng MCP:
57
+ → mcp_mcp-google-ads_run_gaql() để lấy:
58
+ - Cost by country
59
+ - Conversions by country
60
+ - CPI by country
61
+ ```
62
+
63
+ ---
64
+
65
+ ## PHASE 2: PHÂN TÍCH DỮ LIỆU
66
+
67
+ ### 2.1 Tính toán Metrics chính
68
+ ```
69
+ 📐 Công thức quan trọng:
70
+
71
+ 1. ROAS (Return on Ad Spend):
72
+ ROAS = Revenue / Ad Cost
73
+
74
+ 2. LTV Estimate (Lifetime Value):
75
+ LTV = (Revenue / Users) × Retention Factor
76
+
77
+ 3. Efficiency Score:
78
+ Score = (Conversion Rate × eCPM) / CPI
79
+
80
+ 4. Potential Score:
81
+ Potential = (Global Benchmark - Current Performance) × Market Size
82
+ ```
83
+
84
+ ### 2.2 Ma trận Phân loại Quốc gia
85
+ ```
86
+ 🌍 Phân loại theo 4 góc phần tư:
87
+
88
+ HIGH eCPM
89
+
90
+ ┌─────────────┼─────────────┐
91
+ │ 🔥 SCALE │ 💎 EXPAND │
92
+ │ High Rev │ High Rev │
93
+ LOW │ High Vol │ Low Vol │ HIGH
94
+ VOL │─────────────┼─────────────│ VOL
95
+ │ ❄️ CUT │ 🎯 TEST │
96
+ │ Low Rev │ Low Rev │
97
+ │ Low Vol │ High Vol │
98
+ └─────────────┼─────────────┘
99
+ LOW eCPM
100
+
101
+ 🔥 SCALE: Đang tốt, cần scale
102
+ 💎 EXPAND: eCPM cao nhưng ít user → tiềm năng lớn!
103
+ 🎯 TEST: Volume cao, eCPM thấp → cần test monetization
104
+ ❄️ CUT: Không hiệu quả → giảm hoặc bỏ
105
+ ```
106
+
107
+ ### 2.3 Phát hiện Hidden Gems
108
+ ```
109
+ 💎 Tiêu chí "Hidden Gem":
110
+
111
+ 1. eCPM cao hơn trung bình (>1.2x average)
112
+ 2. Volume thấp (<5% total installs)
113
+ 3. Conversion Rate tốt (>average)
114
+ 4. Chưa có campaign targeting riêng
115
+
116
+ → Đây là thị trường TIỀM NĂNG bị bỏ qua!
117
+ ```
118
+
119
+ ---
120
+
121
+ ## PHASE 3: PHÂN TÍCH CHI TIẾT
122
+
123
+ ### 3.1 Phân tích theo Quốc gia
124
+ ```
125
+ 🌍 Tạo bảng phân tích:
126
+
127
+ | Country | Installs | Revenue | eCPM | CPI | ROAS | Conversion | Classification |
128
+ |---------|----------|---------|------|-----|------|------------|----------------|
129
+ | [Country] | X | $Y | $Z | $W | X% | Y% | [SCALE/EXPAND/TEST/CUT] |
130
+
131
+ Highlight:
132
+ - 🟢 Top 5 ROAS
133
+ - 🟡 Top 5 eCPM (nhưng low volume)
134
+ - 🔴 Bottom 5 efficiency
135
+ ```
136
+
137
+ ### 3.2 Phân tích theo Ngôn ngữ
138
+ ```
139
+ 🗣️ Nhóm theo ngôn ngữ:
140
+
141
+ | Language | Countries | Total Users | Avg eCPM | Localized? |
142
+ |----------|-----------|-------------|----------|------------|
143
+ | English | US,UK,AU... | X | $Y | Yes/No |
144
+ | Japanese | JP | X | $Y | Yes/No |
145
+ | ... | ... | ... | ... | ... |
146
+
147
+ → Phát hiện ngôn ngữ có eCPM cao nhưng chưa localize
148
+ ```
149
+
150
+ ### 3.3 Phân tích Keywords (Play Console)
151
+ ```
152
+ 🔑 Từ Search Term data:
153
+
154
+ | Keyword | Visitors | Installs | Conv Rate | Competition |
155
+ |---------|----------|----------|-----------|-------------|
156
+ | [term] | X | Y | Z% | High/Med/Low |
157
+
158
+ Phát hiện:
159
+ - Keywords có conversion cao nhưng ít traffic → SEO opportunity
160
+ - Keywords có traffic cao nhưng conversion thấp → optimize listing
161
+ ```
162
+
163
+ ### 3.4 Phân tích Thời gian
164
+ ```
165
+ 📅 Nếu có data theo thời gian:
166
+
167
+ - Ngày trong tuần nào có conversion cao nhất?
168
+ - Tháng nào có eCPM peak?
169
+ - Có seasonal pattern không?
170
+
171
+ → Timing optimization cho ad campaigns
172
+ ```
173
+
174
+ ---
175
+
176
+ ## PHASE 4: PHÁT HIỆN CƠ HỘI
177
+
178
+ ### 4.1 Underserved Markets
179
+ ```
180
+ 🎯 Tiêu chí phát hiện thị trường bị bỏ qua:
181
+
182
+ 1. High eCPM + Low Ad Spend
183
+ → Có tiền nhưng chưa target
184
+
185
+ 2. High Organic + Low Paid Ratio
186
+ → Demand có sẵn, chưa push ads
187
+
188
+ 3. High Conversion + Low Impressions
189
+ → App phù hợp nhưng chưa reach
190
+
191
+ 4. Similar Language Markets
192
+ → US tốt → UK, AU, CA có thể tốt
193
+ → Brazil tốt → Portugal có thể tốt
194
+ ```
195
+
196
+ ### 4.2 User Segments chưa khai thác
197
+ ```
198
+ 👥 Phân khúc tiềm năng:
199
+
200
+ 1. Geo Clusters:
201
+ - Nếu JP tốt → KR, TW có thể tốt (Asian high-eCPM)
202
+ - Nếu DE tốt → AT, CH có thể tốt (DACH region)
203
+
204
+ 2. Device/OS Insights:
205
+ - Tablet users (often higher eCPM)
206
+ - Older device users (different behavior)
207
+
208
+ 3. Time-based Segments:
209
+ - Night owls (different engagement)
210
+ - Weekend users
211
+ ```
212
+
213
+ ### 4.3 Competitor Gap Analysis
214
+ ```
215
+ 🔍 Từ keyword/search data:
216
+
217
+ - Keywords đối thủ rank nhưng mình không
218
+ - Countries đối thủ mạnh nhưng mình yếu
219
+ - Features người dùng tìm nhưng mình chưa highlight
220
+ ```
221
+
222
+ ---
223
+
224
+ ## PHASE 5: ĐỀ XUẤT HÀNH ĐỘNG
225
+
226
+ ### 5.1 Ưu tiên Markets
227
+ ```
228
+ 📋 Ranking theo Priority Score:
229
+
230
+ Priority = (Potential Revenue × Ease of Entry) / Required Investment
231
+
232
+ | Rank | Market | Potential | Action | Effort |
233
+ |------|--------|-----------|--------|--------|
234
+ | 1 | [Country] | High | Scale ads | Low |
235
+ | 2 | [Country] | High | Localize + Ads | Medium |
236
+ | 3 | [Country] | Medium | Test campaign | Low |
237
+ ```
238
+
239
+ ### 5.2 Action Items
240
+ ```
241
+ ✅ Đề xuất cụ thể:
242
+
243
+ 1. IMMEDIATE (Tuần này):
244
+ - [ ] Tạo campaign targeting [Hidden Gem 1]
245
+ - [ ] Tăng budget cho [Top ROAS country]
246
+
247
+ 2. SHORT-TERM (Tháng này):
248
+ - [ ] Localize cho [High eCPM language]
249
+ - [ ] A/B test ads cho [High volume, low conv]
250
+
251
+ 3. LONG-TERM (Quý này):
252
+ - [ ] Expand to [Similar market cluster]
253
+ - [ ] Develop feature for [Keyword gap]
254
+ ```
255
+
256
+ ---
257
+
258
+ ## 📊 OUTPUT REPORT TEMPLATE
259
+
260
+ ```markdown
261
+ # User Analysis Report - [App Name]
262
+
263
+ ## Executive Summary
264
+ - Total Markets Analyzed: X countries
265
+ - Hidden Gems Discovered: Y markets
266
+ - Potential Revenue Uplift: +Z%
267
+
268
+ ## Key Findings
269
+
270
+ ### 🔥 Top Performers (Current)
271
+ | Country | ROAS | Action |
272
+ |---------|------|--------|
273
+ | ... | ... | Scale |
274
+
275
+ ### 💎 Hidden Gems (Opportunity)
276
+ | Country | eCPM | Current Spend | Potential |
277
+ |---------|------|---------------|-----------|
278
+ | ... | High | Low | +X% revenue |
279
+
280
+ ### 🎯 Quick Wins
281
+ 1. [Action 1] - Est. impact: +X%
282
+ 2. [Action 2] - Est. impact: +Y%
283
+
284
+ ### ⚠️ Underperformers (Review)
285
+ | Country | Issue | Recommendation |
286
+ |---------|-------|----------------|
287
+ | ... | Low ROAS | Reduce/Cut |
288
+
289
+ ## Recommended Campaign Structure
290
+ [Tier breakdown with countries]
291
+
292
+ ## Next Steps
293
+ 1. ...
294
+ 2. ...
295
+ ```
296
+
297
+ ---
298
+
299
+ ## 🛠 TOOLS
300
+
301
+ | Task | Method |
302
+ |------|--------|
303
+ | Read CSV | AI phân tích file user cung cấp |
304
+ | Google Ads data | `mcp_mcp-google-ads_run_gaql` |
305
+ | Visualize | Tạo markdown tables |
306
+
307
+ ---
308
+
309
+ ## 📜 History Tracking Rule (Bắt buộc)
310
+
311
+ Sau khi hoàn thành workflow, AI **PHẢI** ghi log vào file `brain/ads_history_log.md` theo format sau:
312
+
313
+ ```markdown
314
+ ### [YYYY-MM-DD HH:mm] /ads-user-analysis
315
+ - **Action:** [User Analysis / Hidden Gems Discovery]
316
+ - **Target:** [App Name]
317
+ - **Findings:** [Hidden Gems Count / Top Opportunities]
318
+ - **Report:** [Path to report if saved]
319
+ ```
320
+
321
+ **Lưu ý:** Nếu file không tồn tại, hãy tạo mới.
322
+
323
+ ---
324
+
325
+ ## 💡 SỬ DỤNG
326
+
327
+ ```
328
+ /ads-user-analysis
329
+ ```
330
+
331
+ AI sẽ hỏi tuần tự:
332
+ 1. "Cung cấp CSV từ Play Console (Country/Region)"
333
+ 2. "Cung cấp CSV từ AdMob (Revenue by country)"
334
+ 3. "Có data từ App Store không?" (optional)
335
+ 4. "Customer ID Google Ads?" (để cross-reference)
336
+
337
+ Sau đó AI phân tích và output báo cáo với Hidden Gems.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: 🩺 Kiểm tra tình trạng độ bền và sự ổn định của hệ thống quy trình (Health Monitoring)
3
+ ---
4
+
5
+ # 🩺 AWK Skill & Workflow Health Check
6
+
7
+ > **Workflow này tính toán độ "Health" (khỏe mạnh) của các agentic workflows dựa trên dữ liệu từ Beads và Linting.**
8
+ > - Phát hiện Token Creep (khi SKILL.md phình to).
9
+ > - Phát hiện High Correction Rate (khi 1 Bead in_progress quá lâu hoặc có comment phàn nàn).
10
+
11
+ ---
12
+
13
+ ## 1. Kiểm tra kích thước và lạm phát Rules (Token Creep)
14
+ Chạy lệnh phân tích chất lượng codebase (`awkit lint`) để bắt các Workflow có dòng lệnh vượt giới hạn 500 lines:
15
+
16
+ ```bash
17
+ awkit lint || true
18
+ ```
19
+ Nếu có cảnh báo, khuyên User sử dụng `/refactor` để chẻ nhỏ files nhằm tiết kiệm Context Window.
20
+
21
+ ## 2. Kiểm tra hiệu suất chạy (Beads-Driven)
22
+ Lấy top 5 Beads (Tasks) mới nhất ở trạng thái `done` hoặc `in_progress` để đánh giá thời gian chênh lệch:
23
+
24
+ ```bash
25
+ bd list --status done --limit 5
26
+ bd list --status in_progress
27
+ ```
28
+
29
+ **Phân tích của hệ thống AI**:
30
+ - Task nào tốn quá nhiều cuộc hội thoại liên tục (High Correction Rate) hay bị Re-open?
31
+ - Task nào đóng/mở nhanh gọn?
32
+ - Suy luận kỹ năng (Skill / Workflow) nào đang bị thoái hoá so với trước đây cần được viết lại. (Khả năng do Prompt/Instructions chưa cụ thể).
33
+
34
+ ## 3. Khôi phục nếu bị lỗi nặng
35
+ Nếu Workflow đang quá khổ hoặc gây bug tốn thời gian, AI cần khuyến cáo User chạy`/skill-rollback <Tên_Workflow>` để kéo bản snapshot tại lịch sử cũ thông qua `awf-version-tracker`.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: ⏪ Phục hồi (rollback) các plugins và quy trình (Skills/Workflows) dựa trên snapshot cũ khi lỗi
3
+ ---
4
+
5
+ # ⏪ Lùi lại bản hệ thống cũ (AWK Skill Rollback)
6
+
7
+ > **Mục tiêu:** Kéo lại bản sao của toàn bộ thư mục `skills/` và `global_workflows/` từ những snapshot cũ nhất phòng khi `SKILL.md` hay Code bị hỏng (Regression/Bug). Cứ mỗi session mới thì `awf-version-tracker` tự sinh một file `awk_snapshot_xxx.zip` trên `/.gemini/antigravity/brain/versions`.
8
+
9
+ ---
10
+
11
+ ## Bước 1. Hiển thị danh sách các bản Snapshot gần nhất
12
+
13
+ Dùng terminal list ra các file snapshot để người dùng xem và quyết định:
14
+
15
+ ```bash
16
+ ls -lt ~/.gemini/antigravity/brain/versions/awk_snapshot_*.zip
17
+ ```
18
+ *(Nếu thư mục rỗng, báo cho User biết không có bản snapshots nào. Quá trình Rollback kết thúc).*
19
+
20
+ ## Bước 2. Chọn Snapshot và Rollback
21
+
22
+ Nếu có file, gợi ý người dùng bản mới nhất không tính bản bị lỗi. Chờ họ xác nhận tên file cụ thể (vd: `awk_snapshot_20260228_153000.zip`).
23
+
24
+ Sau khi nhận tên file, AI tự động thay thế bằng file ZIP đó với lệnh bash (overwrite everything):
25
+
26
+ ```bash
27
+ unzip -o ~/.gemini/antigravity/brain/versions/awk_snapshot_YYYYMMDD_HHMMSS.zip -d ~/.gemini/antigravity/
28
+ ```
29
+
30
+ ## Bước 3. Xác minh tính toàn vẹn trở lại
31
+ Chạy lệnh Health Check để đảm bảo file lùi lại có trạng thái tốt nhất:
32
+ ```bash
33
+ awkit lint
34
+ ```
35
+ Báo cáo: `Đã khôi phục thành công hệ thống Antigravity cho thư mục Skills & Workflows, tất cả cảnh báo đã được dọn dẹp!`
@@ -0,0 +1,62 @@
1
+ ---
2
+ description: 📺 Tích hợp quảng cáo AdMob
3
+ safe_auto_run: false
4
+ ---
5
+
6
+ # AI Coding Agent Instructions for the Google Mobile Ads SDK
7
+
8
+ ## Integrate the SDK
9
+
10
+ * When I ask to integrate the Google Mobile Ads SDK, **always** use the latest
11
+ stable version for `com.google.android.gms:play-services-ads`.
12
+ * After looking up the latest stable version of
13
+ `com.google.android.gms:play-services-ads`, **always** check the project for
14
+ a version catalog to manage dependencies.
15
+ * Make sure the project meets the SDK requirements of `minSdk` 23 or higher
16
+ and `compileSdk` of 35 or higher.
17
+ * **Always** make sure there is a `<metadata>` tag for application ID in the
18
+ project. If it's not there, add it.
19
+ * You MUST initialize the Google Mobile Ads SDK on a background thread, as
20
+ recommended in the Google Mobile Ads SDK v24.0.0 release notes.
21
+
22
+ ## Banner Ads
23
+
24
+ * When I ask to implement a banner ad or something similar, without specifying
25
+ a type, **always** follow up to confirm the type of ad.
26
+ * When I ask for an "anchored adaptive" ad, ask me if I want the ad anchored
27
+ to the top or bottom of the screen.
28
+ * When I ask for an "inline" adaptive banner ad, explain that inline adaptive
29
+ ads are used for scrolling content. If my application has no scrollable view
30
+ elements (e.g. `ScrollView` or `List`), default to implement an anchored
31
+ adaptive banner ad.
32
+ * When I ask for a "collapsible" banner ad, create an extra parameter that
33
+ aligns the expanded ad to the `AdView`. Ask me if I want the ad collapsed to
34
+ the top or bottom.
35
+ * When I ask for a "fixed size" banner ad, **always** ask me if I'm sure or
36
+ would I like to implement an anchored adaptive banner ad. Explain why
37
+ anchored adaptive banner ads perform better than fixed size ads.
38
+
39
+ * **Mandatory `AdView` Implementation Steps:**
40
+ * **Always** provide the code for a UI container intended to host the
41
+ `AdView`.
42
+ * **Always** call `adView.destroy()` to prevent memory leaks.
43
+
44
+ ## Migrate to the GMA Next-Gen SDK
45
+
46
+ * When I ask to migrate to the "Next Gen" SDK, **always** use the latest
47
+ stable version for
48
+ `com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk`.
49
+ * Make sure the project meets the SDK requirements of `minSdk` 24 or higher
50
+ and `compileSdk` of 35 or higher.
51
+ * Replace the `com.google.android.gms:play-services-ads` dependency with the
52
+ Next Gen `com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk`
53
+ dependency.
54
+ * All `com.google.android.gms.ads.*` import statements must change to
55
+ `com.google.android.libraries.ads.mobile.sdk.*`.
56
+ * If the change is in a custom event adapter, ask me if I'm sure I want to
57
+ migrate this class before making the change.
58
+ * Preserve the `com.google.android.gms.ads.APPLICATION_ID` `<meta-data>` tag
59
+ in the `AndroidManifest.xml` file if present.
60
+ * YOU MUST analyze the code until all errors have been resolved. Resolve the
61
+ errors by using the APIs from the GMA Next-Gen SDK. Refer to the Android
62
+ documentation.
@@ -0,0 +1,201 @@
1
+ ---
2
+ description: 📊 Phân tích dữ liệu quảng cáo & ASO
3
+ ---
4
+
5
+ # WORKFLOW: /ads-analyst - The Data Detective
6
+
7
+ Bạn là **Antigravity Ads Analyst** - chuyên gia phân tích dữ liệu quảng cáo và ASO.
8
+
9
+ **Nhiệm vụ:** Biến dữ liệu thô thành insights có thể hành động.
10
+
11
+ ---
12
+
13
+ ## 🎯 Non-Tech Mode
14
+
15
+ **Đọc preferences.json để điều chỉnh ngôn ngữ:**
16
+
17
+ ```
18
+ if technical_level == "newbie":
19
+ → Giải thích bằng ngôn ngữ đời thường
20
+ → Dùng ví dụ cụ thể và con số
21
+ → Ưu tiên recommendations hơn raw data
22
+ ```
23
+
24
+ ### Bảng dịch thuật ngữ:
25
+ | Thuật ngữ | Giải thích đời thường |
26
+ |-----------|----------------------|
27
+ | CPI | Chi phí để có 1 lượt cài đặt |
28
+ | CTR | % người click vào quảng cáo sau khi thấy |
29
+ | CVR | % người cài app sau khi click |
30
+ | ROAS | Mỗi $1 chi cho ads thu về được bao nhiêu |
31
+ | LTV | Tổng tiền 1 user sẽ chi trong suốt thời gian dùng app |
32
+ | ASO | Tối ưu để app dễ tìm trên store |
33
+ | Impression | Số lần quảng cáo được hiển thị |
34
+ | Retention | % user quay lại dùng app |
35
+
36
+ ---
37
+
38
+ ## Giai đoạn 1: Data Collection
39
+
40
+ ### 1.1. Yêu cầu dữ liệu từ user
41
+
42
+ ```
43
+ 📋 Để phân tích, em cần anh/chị cung cấp:
44
+
45
+ 1️⃣ Firebase Analytics CSV (Bắt buộc)
46
+ - Export từ Firebase Console → Analytics → Export
47
+
48
+ 2️⃣ Google Play Console CSV (Khuyến nghị)
49
+ - Store Listing Conversion (view by: search term)
50
+ - Store Listing Conversion (view by: country/region)
51
+
52
+ 3️⃣ Google Ads Data (Tùy chọn - tự động lấy qua MCP)
53
+
54
+ Anh/chị có loại dữ liệu nào?
55
+ ```
56
+
57
+ ### 1.2. Định dạng dữ liệu được hỗ trợ
58
+
59
+ | Nguồn | Cấu trúc CSV |
60
+ |-------|-------------|
61
+ | Firebase Analytics | `report csv export`, `language, users, new users...` |
62
+ | Play Console - Search Terms | `search term, store listing visitors` |
63
+ | Play Console - Countries | `country / region, store listing visitors` |
64
+ | Google Ads | Tự động qua MCP tools |
65
+
66
+ ---
67
+
68
+ ## Giai đoạn 2: Data Analysis
69
+
70
+ ### 2.1. Firebase Analytics Analysis
71
+ ```
72
+ ✅ Đánh giá chi tiết:
73
+ - User trends (7 days vs 30 days)
74
+ - Engagement patterns
75
+ - Revenue fluctuations (nếu có)
76
+ - Top performing languages/countries
77
+ ```
78
+
79
+ ### 2.2. ASO Analysis (Google Play Console)
80
+ ```
81
+ ✅ Phân tích từ khóa:
82
+ - Top 20 keywords theo visitors
83
+ - Conversion rate theo keyword
84
+ - Gợi ý keywords tiền năng (hidden gems)
85
+
86
+ ✅ Phân tích thị trường:
87
+ - Top countries theo conversion
88
+ - Untapped markets
89
+ - Regional opportunities
90
+ ```
91
+
92
+ ### 2.3. Google Ads Analysis (via MCP)
93
+ ```javascript
94
+ // Sử dụng các tools:
95
+ list_accounts()
96
+ get_campaign_performance({ customer_id, days: 30 })
97
+ get_ad_performance({ customer_id, days: 30 })
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Giai đoạn 3: Competitive Analysis
103
+
104
+ ### 3.1. So sánh với industry benchmarks
105
+ | Chỉ số | App của bạn | Industry Average | Status |
106
+ |--------|-------------|------------------|--------|
107
+ | CPI | $X.XX | $Y.YY | ✅/⚠️/❌ |
108
+ | CTR | X% | Y% | ✅/⚠️/❌ |
109
+ | CVR | X% | Y% | ✅/⚠️/❌ |
110
+ | Retention D1 | X% | Y% | ✅/⚠️/❌ |
111
+
112
+ ### 3.2. Competitive keywords
113
+ - Tìm từ khóa đối thủ đang rank cao
114
+ - So sánh store listing elements
115
+ - Identify gaps và opportunities
116
+
117
+ ---
118
+
119
+ ## Giai đoạn 4: Report Generation
120
+
121
+ ### 4.1. Performance Report
122
+ ```markdown
123
+ # 📊 Ads & ASO Analysis Report - [App Name]
124
+ ## Date: [Date]
125
+
126
+ ## 📈 Overview
127
+ - Total Users (30d): XXX
128
+ - Total Revenue (30d): $XXX
129
+ - Avg CPI: $X.XX
130
+ - Top Market: [Country]
131
+
132
+ ## 🏆 Strengths
133
+ 1. [Điểm mạnh 1]
134
+ 2. [Điểm mạnh 2]
135
+
136
+ ## ⚠️ Weaknesses
137
+ 1. [Điểm yếu 1]
138
+ 2. [Điểm yếu 2]
139
+
140
+ ## 🎯 Recommendations (Priority Order)
141
+ 1. [Hành động 1] - Expected Impact: +X%
142
+ 2. [Hành động 2] - Expected Impact: +X%
143
+ 3. [Hành động 3] - Expected Impact: +X%
144
+
145
+ ## 📊 Detailed Metrics
146
+ [Tables and charts...]
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Giai đoạn 5: Actionable Insights
152
+
153
+ ### Format đời thường:
154
+ ```
155
+ ❌ ĐỪNG: "CTR của anh là 1.2%, dưới benchmark 2.5%"
156
+ ✅ NÊN: "Cứ 100 người thấy quảng cáo thì chỉ 1 người click.
157
+ Đối thủ trung bình có 2-3 người. Anh cần cải thiện
158
+ hình ảnh/tiêu đề quảng cáo để hấp dẫn hơn."
159
+ ```
160
+
161
+ ### Recommendations Template:
162
+ ```
163
+ 💡 GỢI Ý #1: [Tên hành động]
164
+ 📊 Dữ liệu: [Con số cụ thể]
165
+ 🎯 Kết quả dự kiến: [Impact estimate]
166
+ 🔧 Cách làm: [Steps cụ thể]
167
+ ⏰ Timeline: [Thời gian thực hiện]
168
+ ```
169
+
170
+ ---
171
+
172
+ ## 📜 History Tracking Rule (Bắt buộc)
173
+
174
+ Sau khi hoàn thành workflow, AI **PHẢI** ghi log vào file `brain/ads_history_log.md` theo format sau:
175
+
176
+ ```markdown
177
+ ### [YYYY-MM-DD HH:mm] /ads-analyst
178
+ - **Action:** [Analysis Report]
179
+ - **Target:** [Account ID / App Name]
180
+ - **Insights:** [Top findings / Hidden Gems discovered]
181
+ - **Recommendations:** [Top 3 recommendations]
182
+ ```
183
+
184
+ **Lưu ý:** Nếu file không tồn tại, hãy tạo mới.
185
+
186
+ ---
187
+
188
+ ## ⚠️ NEXT STEPS (Decision Matrix):
189
+
190
+ Dựa trên insights vừa tìm được:
191
+ 1. **Nếu tìm thấy điểm lãng phí hoặc cơ hội tối ưu:**
192
+ - Chạy `/ads-optimize` để thực hiện hành động ngay.
193
+
194
+ 2. **Nếu tìm thấy thị trường ngách hoặc từ khóa mới:**
195
+ - Chạy `/ads-targeting` để tạo nhóm quảng cáo nhắm mục tiêu mới.
196
+
197
+ 3. **Nếu cần tạo nội dung mới để khai thác insights:**
198
+ - Chạy `/ads-creative` để tạo bộ ads mới (A/B testing).
199
+
200
+ 4. **Nếu cần lưu trữ kiến thức dài hạn:**
201
+ - Chạy `/save-brain` để ghi nhớ các metrics quan trọng.