@musashishao/agent-kit 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 (220) hide show
  1. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  2. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  3. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  4. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  5. package/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
  6. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  7. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  8. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  9. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  10. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  11. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  12. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  13. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  14. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  15. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  16. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  17. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  18. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  19. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  20. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  21. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  22. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  23. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  24. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  25. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  26. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +487 -0
  27. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +76 -0
  28. package/.agent/ARCHITECTURE.md +225 -0
  29. package/.agent/CONTEXT.md +229 -0
  30. package/.agent/FEATURE_ROADMAP.md +435 -0
  31. package/.agent/PROMPT_TEMPLATES.md +261 -0
  32. package/.agent/agents/backend-specialist.md +263 -0
  33. package/.agent/agents/database-architect.md +226 -0
  34. package/.agent/agents/debugger.md +225 -0
  35. package/.agent/agents/devops-engineer.md +242 -0
  36. package/.agent/agents/documentation-writer.md +104 -0
  37. package/.agent/agents/explorer-agent.md +73 -0
  38. package/.agent/agents/frontend-specialist.md +556 -0
  39. package/.agent/agents/game-developer.md +162 -0
  40. package/.agent/agents/mobile-developer.md +377 -0
  41. package/.agent/agents/orchestrator.md +416 -0
  42. package/.agent/agents/penetration-tester.md +188 -0
  43. package/.agent/agents/performance-optimizer.md +187 -0
  44. package/.agent/agents/project-planner.md +403 -0
  45. package/.agent/agents/security-auditor.md +170 -0
  46. package/.agent/agents/seo-specialist.md +111 -0
  47. package/.agent/agents/test-engineer.md +158 -0
  48. package/.agent/rules/GEMINI.md +251 -0
  49. package/.agent/skills/api-patterns/SKILL.md +81 -0
  50. package/.agent/skills/api-patterns/api-style.md +42 -0
  51. package/.agent/skills/api-patterns/auth.md +24 -0
  52. package/.agent/skills/api-patterns/documentation.md +26 -0
  53. package/.agent/skills/api-patterns/graphql.md +41 -0
  54. package/.agent/skills/api-patterns/rate-limiting.md +31 -0
  55. package/.agent/skills/api-patterns/response.md +37 -0
  56. package/.agent/skills/api-patterns/rest.md +40 -0
  57. package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  58. package/.agent/skills/api-patterns/security-testing.md +122 -0
  59. package/.agent/skills/api-patterns/trpc.md +41 -0
  60. package/.agent/skills/api-patterns/versioning.md +22 -0
  61. package/.agent/skills/app-builder/SKILL.md +75 -0
  62. package/.agent/skills/app-builder/agent-coordination.md +71 -0
  63. package/.agent/skills/app-builder/feature-building.md +53 -0
  64. package/.agent/skills/app-builder/project-detection.md +34 -0
  65. package/.agent/skills/app-builder/scaffolding.md +118 -0
  66. package/.agent/skills/app-builder/tech-stack.md +40 -0
  67. package/.agent/skills/app-builder/templates/SKILL.md +39 -0
  68. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  69. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  70. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  71. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  72. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  73. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  74. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  75. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  76. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  77. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  78. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  79. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  80. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  81. package/.agent/skills/architecture/SKILL.md +55 -0
  82. package/.agent/skills/architecture/context-discovery.md +43 -0
  83. package/.agent/skills/architecture/examples.md +94 -0
  84. package/.agent/skills/architecture/pattern-selection.md +68 -0
  85. package/.agent/skills/architecture/patterns-reference.md +50 -0
  86. package/.agent/skills/architecture/trade-off-analysis.md +77 -0
  87. package/.agent/skills/bash-linux/SKILL.md +199 -0
  88. package/.agent/skills/behavioral-modes/SKILL.md +242 -0
  89. package/.agent/skills/brainstorming/SKILL.md +163 -0
  90. package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
  91. package/.agent/skills/clean-code/SKILL.md +201 -0
  92. package/.agent/skills/code-review-checklist/SKILL.md +109 -0
  93. package/.agent/skills/database-design/SKILL.md +52 -0
  94. package/.agent/skills/database-design/database-selection.md +43 -0
  95. package/.agent/skills/database-design/indexing.md +39 -0
  96. package/.agent/skills/database-design/migrations.md +48 -0
  97. package/.agent/skills/database-design/optimization.md +36 -0
  98. package/.agent/skills/database-design/orm-selection.md +30 -0
  99. package/.agent/skills/database-design/schema-design.md +56 -0
  100. package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
  101. package/.agent/skills/deployment-procedures/SKILL.md +241 -0
  102. package/.agent/skills/doc.md +177 -0
  103. package/.agent/skills/docker-expert/SKILL.md +409 -0
  104. package/.agent/skills/documentation-templates/SKILL.md +194 -0
  105. package/.agent/skills/frontend-design/SKILL.md +396 -0
  106. package/.agent/skills/frontend-design/animation-guide.md +331 -0
  107. package/.agent/skills/frontend-design/color-system.md +311 -0
  108. package/.agent/skills/frontend-design/decision-trees.md +418 -0
  109. package/.agent/skills/frontend-design/motion-graphics.md +306 -0
  110. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  111. package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
  112. package/.agent/skills/frontend-design/typography-system.md +345 -0
  113. package/.agent/skills/frontend-design/ux-psychology.md +541 -0
  114. package/.agent/skills/frontend-design/visual-effects.md +383 -0
  115. package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
  116. package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
  117. package/.agent/skills/game-development/SKILL.md +167 -0
  118. package/.agent/skills/game-development/game-art/SKILL.md +185 -0
  119. package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
  120. package/.agent/skills/game-development/game-design/SKILL.md +129 -0
  121. package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
  122. package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
  123. package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
  124. package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
  125. package/.agent/skills/game-development/web-games/SKILL.md +150 -0
  126. package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
  127. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  128. package/.agent/skills/i18n-localization/SKILL.md +154 -0
  129. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  130. package/.agent/skills/lint-and-validate/SKILL.md +45 -0
  131. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
  132. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  133. package/.agent/skills/mcp-builder/SKILL.md +176 -0
  134. package/.agent/skills/mobile-design/SKILL.md +394 -0
  135. package/.agent/skills/mobile-design/decision-trees.md +516 -0
  136. package/.agent/skills/mobile-design/mobile-backend.md +491 -0
  137. package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
  138. package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
  139. package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
  140. package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
  141. package/.agent/skills/mobile-design/mobile-performance.md +767 -0
  142. package/.agent/skills/mobile-design/mobile-testing.md +356 -0
  143. package/.agent/skills/mobile-design/mobile-typography.md +433 -0
  144. package/.agent/skills/mobile-design/platform-android.md +666 -0
  145. package/.agent/skills/mobile-design/platform-ios.md +561 -0
  146. package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
  147. package/.agent/skills/mobile-design/touch-psychology.md +537 -0
  148. package/.agent/skills/nestjs-expert/SKILL.md +552 -0
  149. package/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
  150. package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
  151. package/.agent/skills/parallel-agents/SKILL.md +175 -0
  152. package/.agent/skills/performance-profiling/SKILL.md +143 -0
  153. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  154. package/.agent/skills/plan-writing/SKILL.md +152 -0
  155. package/.agent/skills/powershell-windows/SKILL.md +167 -0
  156. package/.agent/skills/prisma-expert/SKILL.md +355 -0
  157. package/.agent/skills/python-patterns/SKILL.md +441 -0
  158. package/.agent/skills/react-patterns/SKILL.md +198 -0
  159. package/.agent/skills/red-team-tactics/SKILL.md +199 -0
  160. package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
  161. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  162. package/.agent/skills/server-management/SKILL.md +161 -0
  163. package/.agent/skills/systematic-debugging/SKILL.md +109 -0
  164. package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
  165. package/.agent/skills/tdd-workflow/SKILL.md +149 -0
  166. package/.agent/skills/testing-patterns/SKILL.md +178 -0
  167. package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
  168. package/.agent/skills/typescript-expert/SKILL.md +429 -0
  169. package/.agent/skills/typescript-expert/references/tsconfig-strict.json +92 -0
  170. package/.agent/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
  171. package/.agent/skills/typescript-expert/references/utility-types.ts +335 -0
  172. package/.agent/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
  173. package/.agent/skills/ui-ux-pro-max/SKILL.md +351 -0
  174. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  175. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  176. package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
  177. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  178. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  179. package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  180. package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  181. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  182. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  183. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  184. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  185. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  186. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  187. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  188. package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  189. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  190. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  191. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  192. package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
  193. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  194. package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  195. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  196. package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  197. package/.agent/skills/ui-ux-pro-max/scripts/core.py +257 -0
  198. package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +487 -0
  199. package/.agent/skills/ui-ux-pro-max/scripts/search.py +76 -0
  200. package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
  201. package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
  202. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  203. package/.agent/skills/webapp-testing/SKILL.md +187 -0
  204. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  205. package/.agent/workflows/brainstorm.md +113 -0
  206. package/.agent/workflows/create.md +59 -0
  207. package/.agent/workflows/debug.md +103 -0
  208. package/.agent/workflows/deploy.md +176 -0
  209. package/.agent/workflows/enhance.md +63 -0
  210. package/.agent/workflows/orchestrate.md +237 -0
  211. package/.agent/workflows/plan.md +89 -0
  212. package/.agent/workflows/preview.md +80 -0
  213. package/.agent/workflows/status.md +86 -0
  214. package/.agent/workflows/test.md +144 -0
  215. package/.agent/workflows/ui-ux-pro-max.md +231 -0
  216. package/LICENSE +21 -0
  217. package/README.md +101 -0
  218. package/bin/cli.js +235 -0
  219. package/index.js +1 -0
  220. package/package.json +43 -0
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: geo-fundamentals
3
+ description: Generative Engine Optimization for AI search engines (ChatGPT, Claude, Perplexity).
4
+ allowed-tools: Read, Glob, Grep
5
+ ---
6
+
7
+ # GEO Fundamentals
8
+
9
+ > Optimization for AI-powered search engines.
10
+
11
+ ---
12
+
13
+ ## 1. What is GEO?
14
+
15
+ **GEO** = Generative Engine Optimization
16
+
17
+ | Goal | Platform |
18
+ |------|----------|
19
+ | Be cited in AI responses | ChatGPT, Claude, Perplexity, Gemini |
20
+
21
+ ### SEO vs GEO
22
+
23
+ | Aspect | SEO | GEO |
24
+ |--------|-----|-----|
25
+ | Goal | #1 ranking | AI citations |
26
+ | Platform | Google | AI engines |
27
+ | Metrics | Rankings, CTR | Citation rate |
28
+ | Focus | Keywords | Entities, data |
29
+
30
+ ---
31
+
32
+ ## 2. AI Engine Landscape
33
+
34
+ | Engine | Citation Style | Opportunity |
35
+ |--------|----------------|-------------|
36
+ | **Perplexity** | Numbered [1][2] | Highest citation rate |
37
+ | **ChatGPT** | Inline/footnotes | Custom GPTs |
38
+ | **Claude** | Contextual | Long-form content |
39
+ | **Gemini** | Sources section | SEO crossover |
40
+
41
+ ---
42
+
43
+ ## 3. RAG Retrieval Factors
44
+
45
+ How AI engines select content to cite:
46
+
47
+ | Factor | Weight |
48
+ |--------|--------|
49
+ | Semantic relevance | ~40% |
50
+ | Keyword match | ~20% |
51
+ | Authority signals | ~15% |
52
+ | Freshness | ~10% |
53
+ | Source diversity | ~15% |
54
+
55
+ ---
56
+
57
+ ## 4. Content That Gets Cited
58
+
59
+ | Element | Why It Works |
60
+ |---------|--------------|
61
+ | **Original statistics** | Unique, citable data |
62
+ | **Expert quotes** | Authority transfer |
63
+ | **Clear definitions** | Easy to extract |
64
+ | **Step-by-step guides** | Actionable value |
65
+ | **Comparison tables** | Structured info |
66
+ | **FAQ sections** | Direct answers |
67
+
68
+ ---
69
+
70
+ ## 5. GEO Content Checklist
71
+
72
+ ### Content Elements
73
+
74
+ - [ ] Question-based titles
75
+ - [ ] Summary/TL;DR at top
76
+ - [ ] Original data with sources
77
+ - [ ] Expert quotes (name, title)
78
+ - [ ] FAQ section (3-5 Q&A)
79
+ - [ ] Clear definitions
80
+ - [ ] "Last updated" timestamp
81
+ - [ ] Author with credentials
82
+
83
+ ### Technical Elements
84
+
85
+ - [ ] Article schema with dates
86
+ - [ ] Person schema for author
87
+ - [ ] FAQPage schema
88
+ - [ ] Fast loading (< 2.5s)
89
+ - [ ] Clean HTML structure
90
+
91
+ ---
92
+
93
+ ## 6. Entity Building
94
+
95
+ | Action | Purpose |
96
+ |--------|---------|
97
+ | Google Knowledge Panel | Entity recognition |
98
+ | Wikipedia (if notable) | Authority source |
99
+ | Consistent info across web | Entity consolidation |
100
+ | Industry mentions | Authority signals |
101
+
102
+ ---
103
+
104
+ ## 7. AI Crawler Access
105
+
106
+ ### Key AI User-Agents
107
+
108
+ | Crawler | Engine |
109
+ |---------|--------|
110
+ | GPTBot | ChatGPT/OpenAI |
111
+ | Claude-Web | Claude |
112
+ | PerplexityBot | Perplexity |
113
+ | Googlebot | Gemini (shared) |
114
+
115
+ ### Access Decision
116
+
117
+ | Strategy | When |
118
+ |----------|------|
119
+ | Allow all | Want AI citations |
120
+ | Block GPTBot | Don't want OpenAI training |
121
+ | Selective | Allow some, block others |
122
+
123
+ ---
124
+
125
+ ## 8. Measurement
126
+
127
+ | Metric | How to Track |
128
+ |--------|--------------|
129
+ | AI citations | Manual monitoring |
130
+ | "According to [Brand]" mentions | Search in AI |
131
+ | Competitor citations | Compare share |
132
+ | AI-referred traffic | UTM parameters |
133
+
134
+ ---
135
+
136
+ ## 9. Anti-Patterns
137
+
138
+ | ❌ Don't | ✅ Do |
139
+ |----------|-------|
140
+ | Publish without dates | Add timestamps |
141
+ | Vague attributions | Name sources |
142
+ | Skip author info | Show credentials |
143
+ | Thin content | Comprehensive coverage |
144
+
145
+ ---
146
+
147
+ > **Remember:** AI cites content that's clear, authoritative, and easy to extract. Be the best answer.
148
+
149
+ ---
150
+
151
+ ## Script
152
+
153
+ | Script | Purpose | Command |
154
+ |--------|---------|---------|
155
+ | `scripts/geo_checker.py` | GEO audit (AI citation readiness) | `python scripts/geo_checker.py <project_path>` |
156
+
@@ -0,0 +1,289 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ GEO Checker - Generative Engine Optimization Audit
4
+ Checks PUBLIC WEB CONTENT for AI citation readiness.
5
+
6
+ PURPOSE:
7
+ - Analyze pages that will be INDEXED by AI engines (ChatGPT, Perplexity, etc.)
8
+ - Check for structured data, author info, dates, FAQ sections
9
+ - Help content rank in AI-generated answers
10
+
11
+ WHAT IT CHECKS:
12
+ - HTML files (actual web pages)
13
+ - JSX/TSX files (React page components)
14
+ - NOT markdown files (those are developer docs, not public content)
15
+
16
+ Usage:
17
+ python geo_checker.py <project_path>
18
+ """
19
+ import sys
20
+ import re
21
+ import json
22
+ from pathlib import Path
23
+
24
+ # Fix Windows console encoding
25
+ try:
26
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
27
+ sys.stderr.reconfigure(encoding='utf-8', errors='replace')
28
+ except AttributeError:
29
+ pass
30
+
31
+
32
+ # Directories to skip (not public content)
33
+ SKIP_DIRS = {
34
+ 'node_modules', '.next', 'dist', 'build', '.git', '.github',
35
+ '__pycache__', '.vscode', '.idea', 'coverage', 'test', 'tests',
36
+ '__tests__', 'spec', 'docs', 'documentation'
37
+ }
38
+
39
+ # Files to skip (not public pages)
40
+ SKIP_FILES = {
41
+ 'jest.config', 'webpack.config', 'vite.config', 'tsconfig',
42
+ 'package.json', 'package-lock', 'yarn.lock', '.eslintrc',
43
+ 'tailwind.config', 'postcss.config', 'next.config'
44
+ }
45
+
46
+
47
+ def is_page_file(file_path: Path) -> bool:
48
+ """Check if this file is likely a public-facing page."""
49
+ name = file_path.stem.lower()
50
+
51
+ # Skip config/utility files
52
+ if any(skip in name for skip in SKIP_FILES):
53
+ return False
54
+
55
+ # Skip test files
56
+ if name.endswith('.test') or name.endswith('.spec'):
57
+ return False
58
+ if name.startswith('test_') or name.startswith('spec_'):
59
+ return False
60
+
61
+ # Likely page indicators
62
+ page_indicators = ['page', 'index', 'home', 'about', 'contact', 'blog',
63
+ 'post', 'article', 'product', 'service', 'landing']
64
+
65
+ # Check if it's in a pages/app directory (Next.js, etc.)
66
+ parts = [p.lower() for p in file_path.parts]
67
+ if 'pages' in parts or 'app' in parts or 'routes' in parts:
68
+ return True
69
+
70
+ # Check filename indicators
71
+ if any(ind in name for ind in page_indicators):
72
+ return True
73
+
74
+ # HTML files are usually pages
75
+ if file_path.suffix.lower() == '.html':
76
+ return True
77
+
78
+ return False
79
+
80
+
81
+ def find_web_pages(project_path: Path) -> list:
82
+ """Find public-facing web pages only."""
83
+ patterns = ['**/*.html', '**/*.htm', '**/*.jsx', '**/*.tsx']
84
+
85
+ files = []
86
+ for pattern in patterns:
87
+ for f in project_path.glob(pattern):
88
+ # Skip excluded directories
89
+ if any(skip in f.parts for skip in SKIP_DIRS):
90
+ continue
91
+
92
+ # Check if it's likely a page
93
+ if is_page_file(f):
94
+ files.append(f)
95
+
96
+ return files[:30] # Limit to 30 pages
97
+
98
+
99
+ def check_page(file_path: Path) -> dict:
100
+ """Check a single web page for GEO elements."""
101
+ try:
102
+ content = file_path.read_text(encoding='utf-8', errors='ignore')
103
+ except Exception as e:
104
+ return {'file': str(file_path.name), 'passed': [], 'issues': [f"Error: {e}"], 'score': 0}
105
+
106
+ issues = []
107
+ passed = []
108
+
109
+ # 1. JSON-LD Structured Data (Critical for AI)
110
+ if 'application/ld+json' in content:
111
+ passed.append("JSON-LD structured data found")
112
+ if '"@type"' in content:
113
+ if 'Article' in content:
114
+ passed.append("Article schema present")
115
+ if 'FAQPage' in content:
116
+ passed.append("FAQ schema present")
117
+ if 'Organization' in content or 'Person' in content:
118
+ passed.append("Entity schema present")
119
+ else:
120
+ issues.append("No JSON-LD structured data (AI engines prefer structured content)")
121
+
122
+ # 2. Heading Structure
123
+ h1_count = len(re.findall(r'<h1[^>]*>', content, re.I))
124
+ h2_count = len(re.findall(r'<h2[^>]*>', content, re.I))
125
+
126
+ if h1_count == 1:
127
+ passed.append("Single H1 heading (clear topic)")
128
+ elif h1_count == 0:
129
+ issues.append("No H1 heading - page topic unclear")
130
+ else:
131
+ issues.append(f"Multiple H1 headings ({h1_count}) - confusing for AI")
132
+
133
+ if h2_count >= 2:
134
+ passed.append(f"{h2_count} H2 subheadings (good structure)")
135
+ else:
136
+ issues.append("Add more H2 subheadings for scannable content")
137
+
138
+ # 3. Author Attribution (E-E-A-T signal)
139
+ author_patterns = ['author', 'byline', 'written-by', 'contributor', 'rel="author"']
140
+ has_author = any(p in content.lower() for p in author_patterns)
141
+ if has_author:
142
+ passed.append("Author attribution found")
143
+ else:
144
+ issues.append("No author info (AI prefers attributed content)")
145
+
146
+ # 4. Publication Date (Freshness signal)
147
+ date_patterns = ['datePublished', 'dateModified', 'datetime=', 'pubdate', 'article:published']
148
+ has_date = any(re.search(p, content, re.I) for p in date_patterns)
149
+ if has_date:
150
+ passed.append("Publication date found")
151
+ else:
152
+ issues.append("No publication date (freshness matters for AI)")
153
+
154
+ # 5. FAQ Section (Highly citable)
155
+ faq_patterns = [r'<details', r'faq', r'frequently.?asked', r'"FAQPage"']
156
+ has_faq = any(re.search(p, content, re.I) for p in faq_patterns)
157
+ if has_faq:
158
+ passed.append("FAQ section detected (highly citable)")
159
+
160
+ # 6. Lists (Structured content)
161
+ list_count = len(re.findall(r'<(ul|ol)[^>]*>', content, re.I))
162
+ if list_count >= 2:
163
+ passed.append(f"{list_count} lists (structured content)")
164
+
165
+ # 7. Tables (Comparison data)
166
+ table_count = len(re.findall(r'<table[^>]*>', content, re.I))
167
+ if table_count >= 1:
168
+ passed.append(f"{table_count} table(s) (comparison data)")
169
+
170
+ # 8. Entity Recognition (E-E-A-T signal) - NEW 2025
171
+ entity_patterns = [
172
+ r'"@type"\s*:\s*"Organization"',
173
+ r'"@type"\s*:\s*"LocalBusiness"',
174
+ r'"@type"\s*:\s*"Brand"',
175
+ r'itemtype.*schema\.org/(Organization|Person|Brand)',
176
+ r'rel="author"'
177
+ ]
178
+ has_entity = any(re.search(p, content, re.I) for p in entity_patterns)
179
+ if has_entity:
180
+ passed.append("Entity/Brand recognition (E-E-A-T)")
181
+
182
+ # 9. Original Statistics/Data (AI citation magnet) - NEW 2025
183
+ stat_patterns = [
184
+ r'\d+%', # Percentages
185
+ r'\$[\d,]+', # Dollar amounts
186
+ r'study\s+(shows|found)', # Research citations
187
+ r'according to', # Source attribution
188
+ r'data\s+(shows|reveals)', # Data-backed claims
189
+ r'\d+x\s+(faster|better|more)', # Comparison stats
190
+ r'(million|billion|trillion)', # Large numbers
191
+ ]
192
+ stat_matches = sum(1 for p in stat_patterns if re.search(p, content, re.I))
193
+ if stat_matches >= 2:
194
+ passed.append("Original statistics/data (citation magnet)")
195
+
196
+ # 10. Conversational/Direct answers - NEW 2025
197
+ direct_answer_patterns = [
198
+ r'is defined as',
199
+ r'refers to',
200
+ r'means that',
201
+ r'the answer is',
202
+ r'in short,',
203
+ r'simply put,',
204
+ r'<dfn'
205
+ ]
206
+ has_direct = any(re.search(p, content, re.I) for p in direct_answer_patterns)
207
+ if has_direct:
208
+ passed.append("Direct answer patterns (LLM-friendly)")
209
+
210
+ # Calculate score
211
+ total = len(passed) + len(issues)
212
+ score = (len(passed) / total * 100) if total > 0 else 0
213
+
214
+ return {
215
+ 'file': str(file_path.name),
216
+ 'passed': passed,
217
+ 'issues': issues,
218
+ 'score': round(score)
219
+ }
220
+
221
+
222
+ def main():
223
+ target = sys.argv[1] if len(sys.argv) > 1 else "."
224
+ target_path = Path(target).resolve()
225
+
226
+ print("\n" + "=" * 60)
227
+ print(" GEO CHECKER - AI Citation Readiness Audit")
228
+ print("=" * 60)
229
+ print(f"Project: {target_path}")
230
+ print("-" * 60)
231
+
232
+ # Find web pages only
233
+ pages = find_web_pages(target_path)
234
+
235
+ if not pages:
236
+ print("\n[!] No public web pages found.")
237
+ print(" Looking for: HTML, JSX, TSX files in pages/app directories")
238
+ print(" Skipping: docs, tests, config files, node_modules")
239
+ output = {"script": "geo_checker", "pages_found": 0, "passed": True}
240
+ print("\n" + json.dumps(output, indent=2))
241
+ sys.exit(0)
242
+
243
+ print(f"Found {len(pages)} public pages to analyze\n")
244
+
245
+ # Check each page
246
+ results = []
247
+ for page in pages:
248
+ result = check_page(page)
249
+ results.append(result)
250
+
251
+ # Print results
252
+ for result in results:
253
+ status = "[OK]" if result['score'] >= 60 else "[!]"
254
+ print(f"{status} {result['file']}: {result['score']}%")
255
+ if result['issues'] and result['score'] < 60:
256
+ for issue in result['issues'][:2]: # Show max 2 issues
257
+ print(f" - {issue}")
258
+
259
+ # Average score
260
+ avg_score = sum(r['score'] for r in results) / len(results) if results else 0
261
+
262
+ print("\n" + "=" * 60)
263
+ print(f"AVERAGE GEO SCORE: {avg_score:.0f}%")
264
+ print("=" * 60)
265
+
266
+ if avg_score >= 80:
267
+ print("[OK] Excellent - Content well-optimized for AI citations")
268
+ elif avg_score >= 60:
269
+ print("[OK] Good - Some improvements recommended")
270
+ elif avg_score >= 40:
271
+ print("[!] Needs work - Add structured elements")
272
+ else:
273
+ print("[X] Poor - Content needs GEO optimization")
274
+
275
+ # JSON output
276
+ output = {
277
+ "script": "geo_checker",
278
+ "project": str(target_path),
279
+ "pages_checked": len(results),
280
+ "average_score": round(avg_score),
281
+ "passed": avg_score >= 60
282
+ }
283
+ print("\n" + json.dumps(output, indent=2))
284
+
285
+ sys.exit(0 if avg_score >= 60 else 1)
286
+
287
+
288
+ if __name__ == "__main__":
289
+ main()
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: i18n-localization
3
+ description: Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
4
+ allowed-tools: Read, Glob, Grep
5
+ ---
6
+
7
+ # i18n & Localization
8
+
9
+ > Internationalization (i18n) and Localization (L10n) best practices.
10
+
11
+ ---
12
+
13
+ ## 1. Core Concepts
14
+
15
+ | Term | Meaning |
16
+ |------|---------|
17
+ | **i18n** | Internationalization - making app translatable |
18
+ | **L10n** | Localization - actual translations |
19
+ | **Locale** | Language + Region (en-US, tr-TR) |
20
+ | **RTL** | Right-to-left languages (Arabic, Hebrew) |
21
+
22
+ ---
23
+
24
+ ## 2. When to Use i18n
25
+
26
+ | Project Type | i18n Needed? |
27
+ |--------------|--------------|
28
+ | Public web app | ✅ Yes |
29
+ | SaaS product | ✅ Yes |
30
+ | Internal tool | ⚠️ Maybe |
31
+ | Single-region app | ⚠️ Consider future |
32
+ | Personal project | ❌ Optional |
33
+
34
+ ---
35
+
36
+ ## 3. Implementation Patterns
37
+
38
+ ### React (react-i18next)
39
+
40
+ ```tsx
41
+ import { useTranslation } from 'react-i18next';
42
+
43
+ function Welcome() {
44
+ const { t } = useTranslation();
45
+ return <h1>{t('welcome.title')}</h1>;
46
+ }
47
+ ```
48
+
49
+ ### Next.js (next-intl)
50
+
51
+ ```tsx
52
+ import { useTranslations } from 'next-intl';
53
+
54
+ export default function Page() {
55
+ const t = useTranslations('Home');
56
+ return <h1>{t('title')}</h1>;
57
+ }
58
+ ```
59
+
60
+ ### Python (gettext)
61
+
62
+ ```python
63
+ from gettext import gettext as _
64
+
65
+ print(_("Welcome to our app"))
66
+ ```
67
+
68
+ ---
69
+
70
+ ## 4. File Structure
71
+
72
+ ```
73
+ locales/
74
+ ├── en/
75
+ │ ├── common.json
76
+ │ ├── auth.json
77
+ │ └── errors.json
78
+ ├── tr/
79
+ │ ├── common.json
80
+ │ ├── auth.json
81
+ │ └── errors.json
82
+ └── ar/ # RTL
83
+ └── ...
84
+ ```
85
+
86
+ ---
87
+
88
+ ## 5. Best Practices
89
+
90
+ ### DO ✅
91
+
92
+ - Use translation keys, not raw text
93
+ - Namespace translations by feature
94
+ - Support pluralization
95
+ - Handle date/number formats per locale
96
+ - Plan for RTL from the start
97
+ - Use ICU message format for complex strings
98
+
99
+ ### DON'T ❌
100
+
101
+ - Hardcode strings in components
102
+ - Concatenate translated strings
103
+ - Assume text length (German is 30% longer)
104
+ - Forget about RTL layout
105
+ - Mix languages in same file
106
+
107
+ ---
108
+
109
+ ## 6. Common Issues
110
+
111
+ | Issue | Solution |
112
+ |-------|----------|
113
+ | Missing translation | Fallback to default language |
114
+ | Hardcoded strings | Use linter/checker script |
115
+ | Date format | Use Intl.DateTimeFormat |
116
+ | Number format | Use Intl.NumberFormat |
117
+ | Pluralization | Use ICU message format |
118
+
119
+ ---
120
+
121
+ ## 7. RTL Support
122
+
123
+ ```css
124
+ /* CSS Logical Properties */
125
+ .container {
126
+ margin-inline-start: 1rem; /* Not margin-left */
127
+ padding-inline-end: 1rem; /* Not padding-right */
128
+ }
129
+
130
+ [dir="rtl"] .icon {
131
+ transform: scaleX(-1);
132
+ }
133
+ ```
134
+
135
+ ---
136
+
137
+ ## 8. Checklist
138
+
139
+ Before shipping:
140
+
141
+ - [ ] All user-facing strings use translation keys
142
+ - [ ] Locale files exist for all supported languages
143
+ - [ ] Date/number formatting uses Intl API
144
+ - [ ] RTL layout tested (if applicable)
145
+ - [ ] Fallback language configured
146
+ - [ ] No hardcoded strings in components
147
+
148
+ ---
149
+
150
+ ## Script
151
+
152
+ | Script | Purpose | Command |
153
+ |--------|---------|---------|
154
+ | `scripts/i18n_checker.py` | Detect hardcoded strings & missing translations | `python scripts/i18n_checker.py <project_path>` |