@iamnishankhan/opencode-kit-grok 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 (198) hide show
  1. package/bin/cli.js +46 -0
  2. package/kit/.opencode/AGENTS.md +392 -0
  3. package/kit/.opencode/README.md +71 -0
  4. package/kit/.opencode/USAGE.md +405 -0
  5. package/kit/.opencode/agents/backend-specialist.md +278 -0
  6. package/kit/.opencode/agents/code-archaeologist.md +114 -0
  7. package/kit/.opencode/agents/database-architect.md +233 -0
  8. package/kit/.opencode/agents/debugger.md +234 -0
  9. package/kit/.opencode/agents/devops-engineer.md +252 -0
  10. package/kit/.opencode/agents/documentation-writer.md +111 -0
  11. package/kit/.opencode/agents/explorer-agent.md +83 -0
  12. package/kit/.opencode/agents/frontend-specialist.md +606 -0
  13. package/kit/.opencode/agents/game-developer.md +169 -0
  14. package/kit/.opencode/agents/mobile-developer.md +385 -0
  15. package/kit/.opencode/agents/orchestrator.md +213 -0
  16. package/kit/.opencode/agents/penetration-tester.md +197 -0
  17. package/kit/.opencode/agents/performance-optimizer.md +194 -0
  18. package/kit/.opencode/agents/product-manager.md +120 -0
  19. package/kit/.opencode/agents/product-owner.md +103 -0
  20. package/kit/.opencode/agents/project-planner.md +418 -0
  21. package/kit/.opencode/agents/qa-automation-engineer.md +113 -0
  22. package/kit/.opencode/agents/security-auditor.md +179 -0
  23. package/kit/.opencode/agents/seo-specialist.md +119 -0
  24. package/kit/.opencode/agents/test-engineer.md +169 -0
  25. package/kit/.opencode/commands/brainstorm.md +113 -0
  26. package/kit/.opencode/commands/coordinate.md +72 -0
  27. package/kit/.opencode/commands/create.md +63 -0
  28. package/kit/.opencode/commands/debug.md +102 -0
  29. package/kit/.opencode/commands/deploy.md +175 -0
  30. package/kit/.opencode/commands/enhance.md +62 -0
  31. package/kit/.opencode/commands/orchestrate.md +241 -0
  32. package/kit/.opencode/commands/plan.md +89 -0
  33. package/kit/.opencode/commands/preview.md +80 -0
  34. package/kit/.opencode/commands/remember.md +67 -0
  35. package/kit/.opencode/commands/status.md +86 -0
  36. package/kit/.opencode/commands/test.md +143 -0
  37. package/kit/.opencode/commands/verify.md +71 -0
  38. package/kit/.opencode/memory/MEMORY.md +6 -0
  39. package/kit/.opencode/memory/feedback-history.md +9 -0
  40. package/kit/.opencode/memory/project-conventions.md +16 -0
  41. package/kit/.opencode/memory/tech-decisions.md +10 -0
  42. package/kit/.opencode/memory/user-preferences.md +9 -0
  43. package/kit/.opencode/opencode.json +15 -0
  44. package/kit/.opencode/scripts/README.md +95 -0
  45. package/kit/.opencode/scripts/auto_preview.py +149 -0
  46. package/kit/.opencode/scripts/checklist.py +75 -0
  47. package/kit/.opencode/scripts/component_registry.py +238 -0
  48. package/kit/.opencode/scripts/dependency_graph.py +73 -0
  49. package/kit/.opencode/scripts/generate_manifest.py +44 -0
  50. package/kit/.opencode/scripts/session_manager.py +120 -0
  51. package/kit/.opencode/scripts/tests/test_toolkit.py +238 -0
  52. package/kit/.opencode/scripts/validate_kit.py +397 -0
  53. package/kit/.opencode/scripts/validation_runner.py +216 -0
  54. package/kit/.opencode/scripts/verify_all.py +85 -0
  55. package/kit/.opencode/skills/api-patterns/SKILL.md +83 -0
  56. package/kit/.opencode/skills/api-patterns/api-style.md +42 -0
  57. package/kit/.opencode/skills/api-patterns/auth.md +24 -0
  58. package/kit/.opencode/skills/api-patterns/documentation.md +26 -0
  59. package/kit/.opencode/skills/api-patterns/graphql.md +41 -0
  60. package/kit/.opencode/skills/api-patterns/rate-limiting.md +31 -0
  61. package/kit/.opencode/skills/api-patterns/response.md +37 -0
  62. package/kit/.opencode/skills/api-patterns/rest.md +40 -0
  63. package/kit/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
  64. package/kit/.opencode/skills/api-patterns/security-testing.md +122 -0
  65. package/kit/.opencode/skills/api-patterns/trpc.md +41 -0
  66. package/kit/.opencode/skills/api-patterns/versioning.md +22 -0
  67. package/kit/.opencode/skills/app-builder/SKILL.md +78 -0
  68. package/kit/.opencode/skills/app-builder/agent-coordination.md +71 -0
  69. package/kit/.opencode/skills/app-builder/feature-building.md +53 -0
  70. package/kit/.opencode/skills/app-builder/project-detection.md +45 -0
  71. package/kit/.opencode/skills/app-builder/scaffolding.md +110 -0
  72. package/kit/.opencode/skills/app-builder/tech-stack.md +41 -0
  73. package/kit/.opencode/skills/app-builder/templates/SKILL.md +39 -0
  74. package/kit/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +78 -0
  75. package/kit/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +96 -0
  76. package/kit/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  77. package/kit/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +97 -0
  78. package/kit/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +89 -0
  79. package/kit/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +93 -0
  80. package/kit/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +97 -0
  81. package/kit/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -0
  82. package/kit/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +125 -0
  83. package/kit/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +174 -0
  84. package/kit/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +127 -0
  85. package/kit/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +94 -0
  86. package/kit/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +121 -0
  87. package/kit/.opencode/skills/architecture/SKILL.md +57 -0
  88. package/kit/.opencode/skills/architecture/context-discovery.md +43 -0
  89. package/kit/.opencode/skills/architecture/examples.md +94 -0
  90. package/kit/.opencode/skills/architecture/pattern-selection.md +68 -0
  91. package/kit/.opencode/skills/architecture/patterns-reference.md +50 -0
  92. package/kit/.opencode/skills/architecture/trade-off-analysis.md +77 -0
  93. package/kit/.opencode/skills/bash-linux/SKILL.md +201 -0
  94. package/kit/.opencode/skills/batch-operations/SKILL.md +105 -0
  95. package/kit/.opencode/skills/behavioral-modes/SKILL.md +253 -0
  96. package/kit/.opencode/skills/brainstorming/SKILL.md +178 -0
  97. package/kit/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
  98. package/kit/.opencode/skills/clean-code/SKILL.md +201 -0
  99. package/kit/.opencode/skills/code-review-checklist/SKILL.md +111 -0
  100. package/kit/.opencode/skills/code-review-graph/SKILL.md +305 -0
  101. package/kit/.opencode/skills/context-compression/SKILL.md +145 -0
  102. package/kit/.opencode/skills/coordinator-mode/SKILL.md +208 -0
  103. package/kit/.opencode/skills/database-design/SKILL.md +54 -0
  104. package/kit/.opencode/skills/database-design/database-selection.md +43 -0
  105. package/kit/.opencode/skills/database-design/indexing.md +39 -0
  106. package/kit/.opencode/skills/database-design/migrations.md +48 -0
  107. package/kit/.opencode/skills/database-design/optimization.md +36 -0
  108. package/kit/.opencode/skills/database-design/orm-selection.md +30 -0
  109. package/kit/.opencode/skills/database-design/schema-design.md +56 -0
  110. package/kit/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
  111. package/kit/.opencode/skills/deployment-procedures/SKILL.md +243 -0
  112. package/kit/.opencode/skills/design-spec/SKILL.md +185 -0
  113. package/kit/.opencode/skills/design-spec/collection.md +106 -0
  114. package/kit/.opencode/skills/documentation-templates/SKILL.md +196 -0
  115. package/kit/.opencode/skills/frontend-architecture/SKILL.md +245 -0
  116. package/kit/.opencode/skills/frontend-design/SKILL.md +1222 -0
  117. package/kit/.opencode/skills/frontend-design/redesign.md +178 -0
  118. package/kit/.opencode/skills/frontend-design/scripts/accessibility_checker.py +145 -0
  119. package/kit/.opencode/skills/frontend-design/scripts/ux_audit.py +722 -0
  120. package/kit/.opencode/skills/frontend-design/style-brutalist.md +92 -0
  121. package/kit/.opencode/skills/frontend-design/style-minimalist.md +85 -0
  122. package/kit/.opencode/skills/game-development/2d-games/SKILL.md +118 -0
  123. package/kit/.opencode/skills/game-development/3d-games/SKILL.md +134 -0
  124. package/kit/.opencode/skills/game-development/SKILL.md +169 -0
  125. package/kit/.opencode/skills/game-development/game-art/SKILL.md +184 -0
  126. package/kit/.opencode/skills/game-development/game-audio/SKILL.md +189 -0
  127. package/kit/.opencode/skills/game-development/game-design/SKILL.md +128 -0
  128. package/kit/.opencode/skills/game-development/mobile-games/SKILL.md +107 -0
  129. package/kit/.opencode/skills/game-development/multiplayer/SKILL.md +131 -0
  130. package/kit/.opencode/skills/game-development/pc-games/SKILL.md +143 -0
  131. package/kit/.opencode/skills/game-development/vr-ar/SKILL.md +122 -0
  132. package/kit/.opencode/skills/game-development/web-games/SKILL.md +149 -0
  133. package/kit/.opencode/skills/geo-fundamentals/SKILL.md +158 -0
  134. package/kit/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +273 -0
  135. package/kit/.opencode/skills/i18n-localization/SKILL.md +156 -0
  136. package/kit/.opencode/skills/i18n-localization/scripts/i18n_checker.py +223 -0
  137. package/kit/.opencode/skills/intelligent-routing/SKILL.md +337 -0
  138. package/kit/.opencode/skills/lint-and-validate/SKILL.md +47 -0
  139. package/kit/.opencode/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  140. package/kit/.opencode/skills/lint-and-validate/scripts/type_coverage.py +245 -0
  141. package/kit/.opencode/skills/mcp-builder/SKILL.md +205 -0
  142. package/kit/.opencode/skills/memory-system/SKILL.md +181 -0
  143. package/kit/.opencode/skills/mobile-design/SKILL.md +396 -0
  144. package/kit/.opencode/skills/mobile-design/decision-trees.md +516 -0
  145. package/kit/.opencode/skills/mobile-design/mobile-backend.md +491 -0
  146. package/kit/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
  147. package/kit/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
  148. package/kit/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
  149. package/kit/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
  150. package/kit/.opencode/skills/mobile-design/mobile-performance.md +767 -0
  151. package/kit/.opencode/skills/mobile-design/mobile-testing.md +356 -0
  152. package/kit/.opencode/skills/mobile-design/mobile-typography.md +433 -0
  153. package/kit/.opencode/skills/mobile-design/platform-android.md +666 -0
  154. package/kit/.opencode/skills/mobile-design/platform-ios.md +561 -0
  155. package/kit/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
  156. package/kit/.opencode/skills/mobile-design/touch-psychology.md +537 -0
  157. package/kit/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
  158. package/kit/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  159. package/kit/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  160. package/kit/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  161. package/kit/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  162. package/kit/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  163. package/kit/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  164. package/kit/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  165. package/kit/.opencode/skills/nextjs-react-expert/9-cache-components.md +103 -0
  166. package/kit/.opencode/skills/nextjs-react-expert/SKILL.md +293 -0
  167. package/kit/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  168. package/kit/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +281 -0
  169. package/kit/.opencode/skills/nodejs-best-practices/SKILL.md +336 -0
  170. package/kit/.opencode/skills/parallel-agents/SKILL.md +192 -0
  171. package/kit/.opencode/skills/performance-profiling/SKILL.md +145 -0
  172. package/kit/.opencode/skills/performance-profiling/scripts/bundle_analyzer.py +120 -0
  173. package/kit/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +108 -0
  174. package/kit/.opencode/skills/plan-writing/SKILL.md +153 -0
  175. package/kit/.opencode/skills/powershell-windows/SKILL.md +169 -0
  176. package/kit/.opencode/skills/python-patterns/SKILL.md +443 -0
  177. package/kit/.opencode/skills/red-team-tactics/SKILL.md +201 -0
  178. package/kit/.opencode/skills/rust-pro/SKILL.md +177 -0
  179. package/kit/.opencode/skills/seo-fundamentals/SKILL.md +131 -0
  180. package/kit/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  181. package/kit/.opencode/skills/server-management/SKILL.md +163 -0
  182. package/kit/.opencode/skills/simplify-code/SKILL.md +131 -0
  183. package/kit/.opencode/skills/skillify/SKILL.md +115 -0
  184. package/kit/.opencode/skills/systematic-debugging/SKILL.md +111 -0
  185. package/kit/.opencode/skills/tailwind-patterns/SKILL.md +271 -0
  186. package/kit/.opencode/skills/tdd-workflow/SKILL.md +151 -0
  187. package/kit/.opencode/skills/testing-patterns/SKILL.md +180 -0
  188. package/kit/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
  189. package/kit/.opencode/skills/verify-changes/SKILL.md +127 -0
  190. package/kit/.opencode/skills/vulnerability-scanner/SKILL.md +278 -0
  191. package/kit/.opencode/skills/vulnerability-scanner/checklists.md +124 -0
  192. package/kit/.opencode/skills/vulnerability-scanner/scripts/dependency_analyzer.py +144 -0
  193. package/kit/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +410 -0
  194. package/kit/.opencode/skills/web-design-guidelines/SKILL.md +56 -0
  195. package/kit/.opencode/skills/webapp-testing/SKILL.md +189 -0
  196. package/kit/.opencode/skills/webapp-testing/scripts/playwright_runner.py +123 -0
  197. package/lib/init.js +61 -0
  198. package/package.json +21 -0
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: rust-pro
3
+ description: Master modern Rust (2024 edition) with async patterns, advanced type system features, and production-ready systems programming. Expert in the current Rust ecosystem including Tokio, axum, and modern crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When writing Rust code, working with .rs files, Cargo.toml, Tokio, axum, or any Rust ecosystem tools.\""
7
+ version: "1.0.0"
8
+ ---
9
+ You are a Rust expert specializing in modern Rust development (2024 edition) with advanced async programming, systems-level performance, and production-ready applications.
10
+
11
+ ## Use this skill when
12
+
13
+ - Building Rust services, libraries, or systems tooling
14
+ - Solving ownership, lifetime, or async design issues
15
+ - Optimizing performance with memory safety guarantees
16
+
17
+ ## Do not use this skill when
18
+
19
+ - You need a quick script or dynamic runtime
20
+ - You only need basic Rust syntax
21
+ - You cannot introduce Rust into the stack
22
+
23
+ ## Instructions
24
+
25
+ 1. Clarify performance, safety, and runtime constraints.
26
+ 2. Choose async/runtime and crate ecosystem approach.
27
+ 3. Implement with tests and linting.
28
+ 4. Profile and optimize hotspots.
29
+
30
+ ## Purpose
31
+ Expert Rust developer mastering modern Rust (2024 edition) features, advanced type system usage, and building high-performance, memory-safe systems. Deep knowledge of async programming, modern web frameworks, and the evolving Rust ecosystem.
32
+
33
+ ## Capabilities
34
+
35
+ ### Modern Rust Language Features
36
+ - Modern Rust features: const generics, GATs, improved type inference (all long-stable)
37
+ - Advanced lifetime annotations and lifetime elision rules
38
+ - Generic associated types (GATs) and advanced trait system features
39
+ - Pattern matching with advanced destructuring and guards
40
+ - Const evaluation and compile-time computation
41
+ - Macro system with procedural and declarative macros
42
+ - Module system and visibility controls
43
+ - Advanced error handling with Result, Option, and custom error types
44
+
45
+ ### Ownership & Memory Management
46
+ - Ownership rules, borrowing, and move semantics mastery
47
+ - Reference counting with Rc, Arc, and weak references
48
+ - Smart pointers: Box, RefCell, Mutex, RwLock
49
+ - Memory layout optimization and zero-cost abstractions
50
+ - RAII patterns and automatic resource management
51
+ - Phantom types and zero-sized types (ZSTs)
52
+ - Memory safety without garbage collection
53
+ - Custom allocators and memory pool management
54
+
55
+ ### Async Programming & Concurrency
56
+ - Advanced async/await patterns with Tokio runtime
57
+ - Stream processing and async iterators
58
+ - Channel patterns: mpsc, broadcast, watch channels
59
+ - Tokio ecosystem: axum, tower, hyper for web services
60
+ - Select patterns and concurrent task management
61
+ - Backpressure handling and flow control
62
+ - Async trait objects and dynamic dispatch
63
+ - Performance optimization in async contexts
64
+
65
+ ### Type System & Traits
66
+ - Advanced trait implementations and trait bounds
67
+ - Associated types and generic associated types
68
+ - Higher-kinded types and type-level programming
69
+ - Phantom types and marker traits
70
+ - Orphan rule navigation and newtype patterns
71
+ - Derive macros and custom derive implementations
72
+ - Type erasure and dynamic dispatch strategies
73
+ - Compile-time polymorphism and monomorphization
74
+
75
+ ### Performance & Systems Programming
76
+ - Zero-cost abstractions and compile-time optimizations
77
+ - SIMD programming with portable-simd
78
+ - Memory mapping and low-level I/O operations
79
+ - Lock-free programming and atomic operations
80
+ - Cache-friendly data structures and algorithms
81
+ - Profiling with perf, valgrind, and cargo-flamegraph
82
+ - Binary size optimization and embedded targets
83
+ - Cross-compilation and target-specific optimizations
84
+
85
+ ### Web Development & Services
86
+ - Modern web frameworks: axum, warp, actix-web
87
+ - HTTP/2 and HTTP/3 support with hyper
88
+ - WebSocket and real-time communication
89
+ - Authentication and middleware patterns
90
+ - Database integration with sqlx and diesel
91
+ - Serialization with serde and custom formats
92
+ - GraphQL APIs with async-graphql
93
+ - gRPC services with tonic
94
+
95
+ ### Error Handling & Safety
96
+ - Comprehensive error handling with thiserror and anyhow
97
+ - Custom error types and error propagation
98
+ - Panic handling and graceful degradation
99
+ - Result and Option patterns and combinators
100
+ - Error conversion and context preservation
101
+ - Logging and structured error reporting
102
+ - Testing error conditions and edge cases
103
+ - Recovery strategies and fault tolerance
104
+
105
+ ### Testing & Quality Assurance
106
+ - Unit testing with built-in test framework
107
+ - Property-based testing with proptest and quickcheck
108
+ - Integration testing and test organization
109
+ - Mocking and test doubles with mockall
110
+ - Benchmark testing with criterion.rs
111
+ - Documentation tests and examples
112
+ - Coverage analysis with tarpaulin
113
+ - Continuous integration and automated testing
114
+
115
+ ### Unsafe Code & FFI
116
+ - Safe abstractions over unsafe code
117
+ - Foreign Function Interface (FFI) with C libraries
118
+ - Memory safety invariants and documentation
119
+ - Pointer arithmetic and raw pointer manipulation
120
+ - Interfacing with system APIs and kernel modules
121
+ - Bindgen for automatic binding generation
122
+ - Cross-language interoperability patterns
123
+ - Auditing and minimizing unsafe code blocks
124
+
125
+ ### Modern Tooling & Ecosystem
126
+ - Cargo workspace management and feature flags
127
+ - Cross-compilation and target configuration
128
+ - Clippy lints and custom lint configuration
129
+ - Rustfmt and code formatting standards
130
+ - Cargo extensions: audit, deny, outdated, edit
131
+ - IDE integration and development workflows
132
+ - Dependency management and version resolution
133
+ - Package publishing and documentation hosting
134
+
135
+ ## Behavioral Traits
136
+ - Leverages the type system for compile-time correctness
137
+ - Prioritizes memory safety without sacrificing performance
138
+ - Uses zero-cost abstractions and avoids runtime overhead
139
+ - Implements explicit error handling with Result types
140
+ - Writes comprehensive tests including property-based tests
141
+ - Follows Rust idioms and community conventions
142
+ - Documents unsafe code blocks with safety invariants
143
+ - Optimizes for both correctness and performance
144
+ - Embraces functional programming patterns where appropriate
145
+ - Stays current with Rust language evolution and ecosystem
146
+
147
+ ## Knowledge Base
148
+ - Rust 2024 edition language features and recent compiler improvements
149
+ - Modern async programming with Tokio ecosystem
150
+ - Advanced type system features and trait patterns
151
+ - Performance optimization and systems programming
152
+ - Web development frameworks and service patterns
153
+ - Error handling strategies and fault tolerance
154
+ - Testing methodologies and quality assurance
155
+ - Unsafe code patterns and FFI integration
156
+ - Cross-platform development and deployment
157
+ - Rust ecosystem trends and emerging crates
158
+
159
+ ## Response Approach
160
+ 1. **Analyze requirements** for Rust-specific safety and performance needs
161
+ 2. **Design type-safe APIs** with comprehensive error handling
162
+ 3. **Implement efficient algorithms** with zero-cost abstractions
163
+ 4. **Include extensive testing** with unit, integration, and property-based tests
164
+ 5. **Consider async patterns** for concurrent and I/O-bound operations
165
+ 6. **Document safety invariants** for any unsafe code blocks
166
+ 7. **Optimize for performance** while maintaining memory safety
167
+ 8. **Recommend modern ecosystem** crates and patterns
168
+
169
+ ## Example Interactions
170
+ - "Design a high-performance async web service with proper error handling"
171
+ - "Implement a lock-free concurrent data structure with atomic operations"
172
+ - "Optimize this Rust code for better memory usage and cache locality"
173
+ - "Create a safe wrapper around a C library using FFI"
174
+ - "Build a streaming data processor with backpressure handling"
175
+ - "Design a plugin system with dynamic loading and type safety"
176
+ - "Implement a custom allocator for a specific use case"
177
+ - "Debug and fix lifetime issues in this complex generic code"
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: seo-fundamentals
3
+ description: SEO fundamentals, E-E-A-T, Core Web Vitals, and Google algorithm principles.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When optimizing web pages for search engines, implementing meta tags, improving E-E-A-T, or fixing Core Web Vitals.\""
7
+ version: "1.0.0"
8
+ ---
9
+ # SEO Fundamentals
10
+
11
+ > Principles for search engine visibility.
12
+
13
+ ---
14
+
15
+ ## 1. E-E-A-T Framework
16
+
17
+ | Principle | Signals |
18
+ |-----------|---------|
19
+ | **Experience** | First-hand knowledge, real examples |
20
+ | **Expertise** | Credentials, depth of knowledge |
21
+ | **Authoritativeness** | Backlinks, mentions, industry recognition |
22
+ | **Trustworthiness** | HTTPS, transparency, accurate info |
23
+
24
+ ---
25
+
26
+ ## 2. Core Web Vitals
27
+
28
+ | Metric | Target | Measures |
29
+ |--------|--------|----------|
30
+ | **LCP** | < 2.5s | Loading performance |
31
+ | **INP** | < 200ms | Interactivity |
32
+ | **CLS** | < 0.1 | Visual stability |
33
+
34
+ ---
35
+
36
+ ## 3. Technical SEO Principles
37
+
38
+ ### Site Structure
39
+
40
+ | Element | Purpose |
41
+ |---------|---------|
42
+ | XML sitemap | Help crawling |
43
+ | robots.txt | Control access |
44
+ | Canonical tags | Prevent duplicates |
45
+ | HTTPS | Security signal |
46
+
47
+ ### Performance
48
+
49
+ | Factor | Impact |
50
+ |--------|--------|
51
+ | Page speed | Core Web Vital |
52
+ | Mobile-friendly | Ranking factor |
53
+ | Clean URLs | Crawlability |
54
+
55
+ ---
56
+
57
+ ## 4. Content SEO Principles
58
+
59
+ ### Page Elements
60
+
61
+ | Element | Best Practice |
62
+ |---------|---------------|
63
+ | Title tag | 50-60 chars, keyword front |
64
+ | Meta description | 150-160 chars, compelling |
65
+ | H1 | One per page, main keyword |
66
+ | H2-H6 | Logical hierarchy |
67
+ | Alt text | Descriptive, not stuffed |
68
+
69
+ ### Content Quality
70
+
71
+ | Factor | Importance |
72
+ |--------|------------|
73
+ | Depth | Comprehensive coverage |
74
+ | Freshness | Regular updates |
75
+ | Uniqueness | Original value |
76
+ | Readability | Clear writing |
77
+
78
+ ---
79
+
80
+ ## 5. Schema Markup Types
81
+
82
+ | Type | Use |
83
+ |------|-----|
84
+ | Article | Blog posts, news |
85
+ | Organization | Company info |
86
+ | Person | Author profiles |
87
+ | FAQPage | Q&A content |
88
+ | Product | E-commerce |
89
+ | Review | Ratings |
90
+ | BreadcrumbList | Navigation |
91
+
92
+ ---
93
+
94
+ ## 6. AI Content Guidelines
95
+
96
+ ### What Google Looks For
97
+
98
+ | ✅ Do | ❌ Don't |
99
+ |-------|----------|
100
+ | AI draft + human edit | Publish raw AI content |
101
+ | Add original insights | Copy without value |
102
+ | Expert review | Skip fact-checking |
103
+ | Follow E-E-A-T | Keyword stuffing |
104
+
105
+ ---
106
+
107
+ ## 7. Ranking Factors (Prioritized)
108
+
109
+ | Priority | Factor |
110
+ |----------|--------|
111
+ | 1 | Quality, relevant content |
112
+ | 2 | Backlinks from authority sites |
113
+ | 3 | Page experience (Core Web Vitals) |
114
+ | 4 | Mobile optimization |
115
+ | 5 | Technical SEO fundamentals |
116
+
117
+ ---
118
+
119
+ ## 8. Measurement
120
+
121
+ | Metric | Tool |
122
+ |--------|------|
123
+ | Rankings | Search Console, Ahrefs |
124
+ | Traffic | Analytics |
125
+ | Core Web Vitals | PageSpeed Insights |
126
+ | Indexing | Search Console |
127
+ | Backlinks | Ahrefs, Semrush |
128
+
129
+ ---
130
+
131
+ > **Remember:** SEO is a long-term game. Quality content + technical excellence + patience = results.
@@ -0,0 +1,219 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SEO Checker - Search Engine Optimization Audit
4
+ Checks HTML/JSX/TSX pages for SEO best practices.
5
+
6
+ PURPOSE:
7
+ - Verify meta tags, titles, descriptions
8
+ - Check Open Graph tags for social sharing
9
+ - Validate heading hierarchy
10
+ - Check image accessibility (alt attributes)
11
+
12
+ WHAT IT CHECKS:
13
+ - HTML files (actual web pages)
14
+ - JSX/TSX files (React page components)
15
+ - Only files that are likely PUBLIC pages
16
+
17
+ Usage:
18
+ python seo_checker.py <project_path>
19
+ """
20
+ import sys
21
+ import json
22
+ import re
23
+ from pathlib import Path
24
+ from datetime import datetime
25
+
26
+ # Fix Windows console encoding
27
+ try:
28
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
29
+ except:
30
+ pass
31
+
32
+
33
+ # Directories to skip
34
+ SKIP_DIRS = {
35
+ 'node_modules', '.next', 'dist', 'build', '.git', '.github',
36
+ '__pycache__', '.vscode', '.idea', 'coverage', 'test', 'tests',
37
+ '__tests__', 'spec', 'docs', 'documentation', 'examples'
38
+ }
39
+
40
+ # Files to skip (not pages)
41
+ SKIP_PATTERNS = [
42
+ 'config', 'setup', 'util', 'helper', 'hook', 'context', 'store',
43
+ 'service', 'api', 'lib', 'constant', 'type', 'interface', 'mock',
44
+ '.test.', '.spec.', '_test.', '_spec.'
45
+ ]
46
+
47
+
48
+ def is_page_file(file_path: Path) -> bool:
49
+ """Check if this file is likely a public-facing page."""
50
+ name = file_path.name.lower()
51
+ stem = file_path.stem.lower()
52
+
53
+ # Skip utility/config files
54
+ if any(skip in name for skip in SKIP_PATTERNS):
55
+ return False
56
+
57
+ # Check path - pages in specific directories are likely pages
58
+ parts = [p.lower() for p in file_path.parts]
59
+ page_dirs = ['pages', 'app', 'routes', 'views', 'screens']
60
+
61
+ if any(d in parts for d in page_dirs):
62
+ return True
63
+
64
+ # Filename indicators for pages
65
+ page_names = ['page', 'index', 'home', 'about', 'contact', 'blog',
66
+ 'post', 'article', 'product', 'landing', 'layout']
67
+
68
+ if any(p in stem for p in page_names):
69
+ return True
70
+
71
+ # HTML files are usually pages
72
+ if file_path.suffix.lower() in ['.html', '.htm']:
73
+ return True
74
+
75
+ return False
76
+
77
+
78
+ def find_pages(project_path: Path) -> list:
79
+ """Find page files to check."""
80
+ patterns = ['**/*.html', '**/*.htm', '**/*.jsx', '**/*.tsx']
81
+
82
+ files = []
83
+ for pattern in patterns:
84
+ for f in project_path.glob(pattern):
85
+ # Skip excluded directories
86
+ if any(skip in f.parts for skip in SKIP_DIRS):
87
+ continue
88
+
89
+ # Check if it's likely a page
90
+ if is_page_file(f):
91
+ files.append(f)
92
+
93
+ return files[:50] # Limit to 50 files
94
+
95
+
96
+ def check_page(file_path: Path) -> dict:
97
+ """Check a single page for SEO issues."""
98
+ issues = []
99
+
100
+ try:
101
+ content = file_path.read_text(encoding='utf-8', errors='ignore')
102
+ except Exception as e:
103
+ return {"file": str(file_path.name), "issues": [f"Error: {e}"]}
104
+
105
+ # Detect if this is a layout/template file (has Head component)
106
+ is_layout = '<Head' in content or '<head>' in content.lower() or '<head ' in content.lower()
107
+
108
+ # 1. Title tag
109
+ has_title = '<title' in content.lower() or 'title=' in content or 'Head>' in content
110
+ if not has_title and is_layout:
111
+ issues.append("Missing <title> tag")
112
+
113
+ # 2. Meta description
114
+ has_description = 'name="description"' in content.lower() or 'name=\'description\'' in content.lower()
115
+ if not has_description and is_layout:
116
+ issues.append("Missing meta description")
117
+
118
+ # 3. Open Graph tags
119
+ has_og = 'og:' in content or 'property="og:' in content.lower()
120
+ if not has_og and is_layout:
121
+ issues.append("Missing Open Graph tags")
122
+
123
+ # 4. Heading hierarchy - multiple H1s
124
+ h1_matches = re.findall(r'<h1[^>]*>', content, re.I)
125
+ if len(h1_matches) > 1:
126
+ issues.append(f"Multiple H1 tags ({len(h1_matches)})")
127
+
128
+ # 5. Images without alt
129
+ img_pattern = r'<img[^>]+>'
130
+ imgs = re.findall(img_pattern, content, re.I)
131
+ for img in imgs:
132
+ if 'alt=' not in img.lower():
133
+ issues.append("Image missing alt attribute")
134
+ break
135
+ if 'alt=""' in img or "alt=''" in img:
136
+ issues.append("Image has empty alt attribute")
137
+ break
138
+
139
+ # 6. Check for canonical link (nice to have)
140
+ # has_canonical = 'rel="canonical"' in content.lower()
141
+
142
+ return {
143
+ "file": str(file_path.name),
144
+ "issues": issues
145
+ }
146
+
147
+
148
+ def main():
149
+ project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
150
+
151
+ print(f"\n{'='*60}")
152
+ print(f" SEO CHECKER - Search Engine Optimization Audit")
153
+ print(f"{'='*60}")
154
+ print(f"Project: {project_path}")
155
+ print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
156
+ print("-"*60)
157
+
158
+ # Find pages
159
+ pages = find_pages(project_path)
160
+
161
+ if not pages:
162
+ print("\n[!] No page files found.")
163
+ print(" Looking for: HTML, JSX, TSX in pages/app/routes directories")
164
+ output = {"script": "seo_checker", "files_checked": 0, "passed": True}
165
+ print("\n" + json.dumps(output, indent=2))
166
+ sys.exit(0)
167
+
168
+ print(f"Found {len(pages)} page files to analyze\n")
169
+
170
+ # Check each page
171
+ all_issues = []
172
+ for f in pages:
173
+ result = check_page(f)
174
+ if result["issues"]:
175
+ all_issues.append(result)
176
+
177
+ # Summary
178
+ print("=" * 60)
179
+ print("SEO ANALYSIS RESULTS")
180
+ print("=" * 60)
181
+
182
+ if all_issues:
183
+ # Group by issue type
184
+ issue_counts = {}
185
+ for item in all_issues:
186
+ for issue in item["issues"]:
187
+ issue_counts[issue] = issue_counts.get(issue, 0) + 1
188
+
189
+ print("\nIssue Summary:")
190
+ for issue, count in sorted(issue_counts.items(), key=lambda x: -x[1]):
191
+ print(f" [{count}] {issue}")
192
+
193
+ print(f"\nAffected files ({len(all_issues)}):")
194
+ for item in all_issues[:5]:
195
+ print(f" - {item['file']}")
196
+ if len(all_issues) > 5:
197
+ print(f" ... and {len(all_issues) - 5} more")
198
+ else:
199
+ print("\n[OK] No SEO issues found!")
200
+
201
+ total_issues = sum(len(item["issues"]) for item in all_issues)
202
+ passed = total_issues == 0
203
+
204
+ output = {
205
+ "script": "seo_checker",
206
+ "project": str(project_path),
207
+ "files_checked": len(pages),
208
+ "files_with_issues": len(all_issues),
209
+ "issues_found": total_issues,
210
+ "passed": passed
211
+ }
212
+
213
+ print("\n" + json.dumps(output, indent=2))
214
+
215
+ sys.exit(0 if passed else 1)
216
+
217
+
218
+ if __name__ == "__main__":
219
+ main()
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: server-management
3
+ description: Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.
4
+ compatibility: opencode
5
+ metadata:
6
+ when_to_use: "\"When managing servers, configuring process managers (PM2), setting up monitoring, or planning scaling strategies.\""
7
+ version: "1.0.0"
8
+ ---
9
+ # Server Management
10
+
11
+ > Server management principles for production operations.
12
+ > **Learn to THINK, not memorize commands.**
13
+
14
+ ---
15
+
16
+ ## 1. Process Management Principles
17
+
18
+ ### Tool Selection
19
+
20
+ | Scenario | Tool |
21
+ |----------|------|
22
+ | **Node.js app** | PM2 (clustering, reload) |
23
+ | **Any app** | systemd (Linux native) |
24
+ | **Containers** | Docker/Podman |
25
+ | **Orchestration** | Kubernetes, Docker Swarm |
26
+
27
+ ### Process Management Goals
28
+
29
+ | Goal | What It Means |
30
+ |------|---------------|
31
+ | **Restart on crash** | Auto-recovery |
32
+ | **Zero-downtime reload** | No service interruption |
33
+ | **Clustering** | Use all CPU cores |
34
+ | **Persistence** | Survive server reboot |
35
+
36
+ ---
37
+
38
+ ## 2. Monitoring Principles
39
+
40
+ ### What to Monitor
41
+
42
+ | Category | Key Metrics |
43
+ |----------|-------------|
44
+ | **Availability** | Uptime, health checks |
45
+ | **Performance** | Response time, throughput |
46
+ | **Errors** | Error rate, types |
47
+ | **Resources** | CPU, memory, disk |
48
+
49
+ ### Alert Severity Strategy
50
+
51
+ | Level | Response |
52
+ |-------|----------|
53
+ | **Critical** | Immediate action |
54
+ | **Warning** | Investigate soon |
55
+ | **Info** | Review daily |
56
+
57
+ ### Monitoring Tool Selection
58
+
59
+ | Need | Options |
60
+ |------|---------|
61
+ | Simple/Free | PM2 metrics, htop |
62
+ | Full observability | Grafana, Datadog |
63
+ | Error tracking | Sentry |
64
+ | Uptime | UptimeRobot, Pingdom |
65
+
66
+ ---
67
+
68
+ ## 3. Log Management Principles
69
+
70
+ ### Log Strategy
71
+
72
+ | Log Type | Purpose |
73
+ |----------|---------|
74
+ | **Application logs** | Debug, audit |
75
+ | **Access logs** | Traffic analysis |
76
+ | **Error logs** | Issue detection |
77
+
78
+ ### Log Principles
79
+
80
+ 1. **Rotate logs** to prevent disk fill
81
+ 2. **Structured logging** (JSON) for parsing
82
+ 3. **Appropriate levels** (error/warn/info/debug)
83
+ 4. **No sensitive data** in logs
84
+
85
+ ---
86
+
87
+ ## 4. Scaling Decisions
88
+
89
+ ### When to Scale
90
+
91
+ | Symptom | Solution |
92
+ |---------|----------|
93
+ | High CPU | Add instances (horizontal) |
94
+ | High memory | Increase RAM or fix leak |
95
+ | Slow response | Profile first, then scale |
96
+ | Traffic spikes | Auto-scaling |
97
+
98
+ ### Scaling Strategy
99
+
100
+ | Type | When to Use |
101
+ |------|-------------|
102
+ | **Vertical** | Quick fix, single instance |
103
+ | **Horizontal** | Sustainable, distributed |
104
+ | **Auto** | Variable traffic |
105
+
106
+ ---
107
+
108
+ ## 5. Health Check Principles
109
+
110
+ ### What Constitutes Healthy
111
+
112
+ | Check | Meaning |
113
+ |-------|---------|
114
+ | **HTTP 200** | Service responding |
115
+ | **Database connected** | Data accessible |
116
+ | **Dependencies OK** | External services reachable |
117
+ | **Resources OK** | CPU/memory not exhausted |
118
+
119
+ ### Health Check Implementation
120
+
121
+ - Simple: Just return 200
122
+ - Deep: Check all dependencies
123
+ - Choose based on load balancer needs
124
+
125
+ ---
126
+
127
+ ## 6. Security Principles
128
+
129
+ | Area | Principle |
130
+ |------|-----------|
131
+ | **Access** | SSH keys only, no passwords |
132
+ | **Firewall** | Only needed ports open |
133
+ | **Updates** | Regular security patches |
134
+ | **Secrets** | Environment vars, not files |
135
+ | **Audit** | Log access and changes |
136
+
137
+ ---
138
+
139
+ ## 7. Troubleshooting Priority
140
+
141
+ When something's wrong:
142
+
143
+ 1. **Check if running** (process status)
144
+ 2. **Check logs** (error messages)
145
+ 3. **Check resources** (disk, memory, CPU)
146
+ 4. **Check network** (ports, DNS)
147
+ 5. **Check dependencies** (database, APIs)
148
+
149
+ ---
150
+
151
+ ## 8. Anti-Patterns
152
+
153
+ | ❌ Don't | ✅ Do |
154
+ |----------|-------|
155
+ | Run as root | Use non-root user |
156
+ | Ignore logs | Set up log rotation |
157
+ | Skip monitoring | Monitor from day one |
158
+ | Manual restarts | Auto-restart config |
159
+ | No backups | Regular backup schedule |
160
+
161
+ ---
162
+
163
+ > **Remember:** A well-managed server is boring. That's the goal.