@techwavedev/agi-agent-kit 1.1.3 → 1.1.7

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 (207) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/LICENSE +201 -0
  3. package/package.json +1 -1
  4. package/templates/base/skill-creator/LICENSE.txt +0 -0
  5. package/templates/base/skill-creator/SKILL_skillcreator.md +36 -23
  6. package/templates/base/skill-creator/references/output-patterns.md +0 -0
  7. package/templates/base/skill-creator/references/workflows.md +0 -0
  8. package/templates/base/skill-creator/scripts/init_skill.py +135 -18
  9. package/templates/base/skill-creator/scripts/package_skill.py +0 -0
  10. package/templates/base/skill-creator/scripts/quick_validate.py +0 -0
  11. package/templates/skills/core/documentation/SKILL.md +0 -0
  12. package/templates/skills/core/documentation/references/best_practices.md +0 -0
  13. package/templates/skills/core/documentation/scripts/analyze_code.py +0 -0
  14. package/templates/skills/core/documentation/scripts/detect_changes.py +0 -0
  15. package/templates/skills/core/documentation/scripts/generate_changelog.py +0 -0
  16. package/templates/skills/core/documentation/scripts/sync_docs.py +0 -0
  17. package/templates/skills/core/documentation/scripts/update_skill_docs.py +0 -0
  18. package/templates/skills/core/pdf-reader/SKILL.md +0 -0
  19. package/templates/skills/core/pdf-reader/references/pdf_libraries.md +0 -0
  20. package/templates/skills/core/pdf-reader/scripts/extract_text.py +0 -0
  21. package/templates/skills/core/qdrant-memory/SKILL.md +0 -0
  22. package/templates/skills/core/qdrant-memory/references/advanced_patterns.md +0 -0
  23. package/templates/skills/core/qdrant-memory/references/collection_schemas.md +0 -0
  24. package/templates/skills/core/qdrant-memory/references/complete_guide.md +0 -0
  25. package/templates/skills/core/qdrant-memory/references/embedding_models.md +0 -0
  26. package/templates/skills/core/qdrant-memory/scripts/__pycache__/embedding_utils.cpython-314.pyc +0 -0
  27. package/templates/skills/core/qdrant-memory/scripts/__pycache__/init_collection.cpython-314.pyc +0 -0
  28. package/templates/skills/core/qdrant-memory/scripts/benchmark_token_savings.py +0 -0
  29. package/templates/skills/core/qdrant-memory/scripts/embedding_utils.py +0 -0
  30. package/templates/skills/core/qdrant-memory/scripts/hybrid_search.py +0 -0
  31. package/templates/skills/core/qdrant-memory/scripts/init_collection.py +0 -0
  32. package/templates/skills/core/qdrant-memory/scripts/memory_retrieval.py +0 -0
  33. package/templates/skills/core/qdrant-memory/scripts/semantic_cache.py +0 -0
  34. package/templates/skills/core/qdrant-memory/scripts/test_skill.py +0 -0
  35. package/templates/skills/core/webcrawler/references/advanced_crawling.md +0 -0
  36. package/templates/skills/core/webcrawler/scripts/crawl_docs.py +0 -0
  37. package/templates/skills/core/webcrawler/scripts/extract_page.py +0 -0
  38. package/templates/skills/core/webcrawler/scripts/filter_docs.py +0 -0
  39. package/templates/skills/design-md/README.md +34 -0
  40. package/templates/skills/design-md/SKILL.md +193 -0
  41. package/templates/skills/design-md/examples/DESIGN.md +154 -0
  42. package/templates/skills/knowledge/SKILLS_CATALOG.md +796 -0
  43. package/templates/skills/knowledge/api-patterns/SKILL.md +0 -0
  44. package/templates/skills/knowledge/api-patterns/api-style.md +0 -0
  45. package/templates/skills/knowledge/api-patterns/auth.md +0 -0
  46. package/templates/skills/knowledge/api-patterns/documentation.md +0 -0
  47. package/templates/skills/knowledge/api-patterns/graphql.md +0 -0
  48. package/templates/skills/knowledge/api-patterns/rate-limiting.md +0 -0
  49. package/templates/skills/knowledge/api-patterns/response.md +0 -0
  50. package/templates/skills/knowledge/api-patterns/rest.md +0 -0
  51. package/templates/skills/knowledge/api-patterns/scripts/api_validator.py +0 -0
  52. package/templates/skills/knowledge/api-patterns/security-testing.md +0 -0
  53. package/templates/skills/knowledge/api-patterns/trpc.md +0 -0
  54. package/templates/skills/knowledge/api-patterns/versioning.md +0 -0
  55. package/templates/skills/knowledge/app-builder/SKILL.md +0 -0
  56. package/templates/skills/knowledge/app-builder/agent-coordination.md +0 -0
  57. package/templates/skills/knowledge/app-builder/feature-building.md +0 -0
  58. package/templates/skills/knowledge/app-builder/project-detection.md +0 -0
  59. package/templates/skills/knowledge/app-builder/scaffolding.md +0 -0
  60. package/templates/skills/knowledge/app-builder/tech-stack.md +0 -0
  61. package/templates/skills/knowledge/app-builder/templates/SKILL.md +0 -0
  62. package/templates/skills/knowledge/app-builder/templates/astro-static/TEMPLATE.md +0 -0
  63. package/templates/skills/knowledge/app-builder/templates/chrome-extension/TEMPLATE.md +0 -0
  64. package/templates/skills/knowledge/app-builder/templates/cli-tool/TEMPLATE.md +0 -0
  65. package/templates/skills/knowledge/app-builder/templates/electron-desktop/TEMPLATE.md +0 -0
  66. package/templates/skills/knowledge/app-builder/templates/express-api/TEMPLATE.md +0 -0
  67. package/templates/skills/knowledge/app-builder/templates/flutter-app/TEMPLATE.md +0 -0
  68. package/templates/skills/knowledge/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -0
  69. package/templates/skills/knowledge/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -0
  70. package/templates/skills/knowledge/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -0
  71. package/templates/skills/knowledge/app-builder/templates/nextjs-static/TEMPLATE.md +0 -0
  72. package/templates/skills/knowledge/app-builder/templates/nuxt-app/TEMPLATE.md +0 -0
  73. package/templates/skills/knowledge/app-builder/templates/python-fastapi/TEMPLATE.md +0 -0
  74. package/templates/skills/knowledge/app-builder/templates/react-native-app/TEMPLATE.md +0 -0
  75. package/templates/skills/knowledge/architecture/SKILL.md +0 -0
  76. package/templates/skills/knowledge/architecture/context-discovery.md +0 -0
  77. package/templates/skills/knowledge/architecture/examples.md +0 -0
  78. package/templates/skills/knowledge/architecture/pattern-selection.md +0 -0
  79. package/templates/skills/knowledge/architecture/patterns-reference.md +0 -0
  80. package/templates/skills/knowledge/architecture/trade-off-analysis.md +0 -0
  81. package/templates/skills/knowledge/bash-linux/SKILL.md +0 -0
  82. package/templates/skills/knowledge/behavioral-modes/SKILL.md +0 -0
  83. package/templates/skills/knowledge/brainstorming/SKILL.md +0 -0
  84. package/templates/skills/knowledge/brainstorming/dynamic-questioning.md +0 -0
  85. package/templates/skills/knowledge/clean-code/SKILL.md +0 -0
  86. package/templates/skills/knowledge/code-review-checklist/SKILL.md +0 -0
  87. package/templates/skills/knowledge/database-design/SKILL.md +0 -0
  88. package/templates/skills/knowledge/database-design/database-selection.md +0 -0
  89. package/templates/skills/knowledge/database-design/indexing.md +0 -0
  90. package/templates/skills/knowledge/database-design/migrations.md +0 -0
  91. package/templates/skills/knowledge/database-design/optimization.md +0 -0
  92. package/templates/skills/knowledge/database-design/orm-selection.md +0 -0
  93. package/templates/skills/knowledge/database-design/schema-design.md +0 -0
  94. package/templates/skills/knowledge/database-design/scripts/schema_validator.py +0 -0
  95. package/templates/skills/knowledge/deployment-procedures/SKILL.md +0 -0
  96. package/templates/skills/knowledge/design-md/README.md +34 -0
  97. package/templates/skills/knowledge/design-md/SKILL.md +193 -0
  98. package/templates/skills/knowledge/design-md/examples/DESIGN.md +154 -0
  99. package/templates/skills/knowledge/documentation-templates/SKILL.md +0 -0
  100. package/templates/skills/knowledge/frontend-design/SKILL.md +0 -0
  101. package/templates/skills/knowledge/frontend-design/animation-guide.md +0 -0
  102. package/templates/skills/knowledge/frontend-design/color-system.md +0 -0
  103. package/templates/skills/knowledge/frontend-design/decision-trees.md +0 -0
  104. package/templates/skills/knowledge/frontend-design/motion-graphics.md +0 -0
  105. package/templates/skills/knowledge/frontend-design/scripts/accessibility_checker.py +0 -0
  106. package/templates/skills/knowledge/frontend-design/scripts/ux_audit.py +0 -0
  107. package/templates/skills/knowledge/frontend-design/typography-system.md +0 -0
  108. package/templates/skills/knowledge/frontend-design/ux-psychology.md +0 -0
  109. package/templates/skills/knowledge/frontend-design/visual-effects.md +0 -0
  110. package/templates/skills/knowledge/game-development/2d-games/SKILL.md +0 -0
  111. package/templates/skills/knowledge/game-development/3d-games/SKILL.md +0 -0
  112. package/templates/skills/knowledge/game-development/SKILL.md +0 -0
  113. package/templates/skills/knowledge/game-development/game-art/SKILL.md +0 -0
  114. package/templates/skills/knowledge/game-development/game-audio/SKILL.md +0 -0
  115. package/templates/skills/knowledge/game-development/game-design/SKILL.md +0 -0
  116. package/templates/skills/knowledge/game-development/mobile-games/SKILL.md +0 -0
  117. package/templates/skills/knowledge/game-development/multiplayer/SKILL.md +0 -0
  118. package/templates/skills/knowledge/game-development/pc-games/SKILL.md +0 -0
  119. package/templates/skills/knowledge/game-development/vr-ar/SKILL.md +0 -0
  120. package/templates/skills/knowledge/game-development/web-games/SKILL.md +0 -0
  121. package/templates/skills/knowledge/geo-fundamentals/SKILL.md +0 -0
  122. package/templates/skills/knowledge/geo-fundamentals/scripts/geo_checker.py +0 -0
  123. package/templates/skills/knowledge/i18n-localization/SKILL.md +0 -0
  124. package/templates/skills/knowledge/i18n-localization/scripts/i18n_checker.py +0 -0
  125. package/templates/skills/knowledge/intelligent-routing/SKILL.md +0 -0
  126. package/templates/skills/knowledge/jira/scripts/__pycache__/jira_client.cpython-314.pyc +0 -0
  127. package/templates/skills/knowledge/lint-and-validate/SKILL.md +0 -0
  128. package/templates/skills/knowledge/lint-and-validate/scripts/lint_runner.py +0 -0
  129. package/templates/skills/knowledge/lint-and-validate/scripts/type_coverage.py +0 -0
  130. package/templates/skills/knowledge/mcp-builder/SKILL.md +0 -0
  131. package/templates/skills/knowledge/mobile-design/SKILL.md +0 -0
  132. package/templates/skills/knowledge/mobile-design/decision-trees.md +0 -0
  133. package/templates/skills/knowledge/mobile-design/mobile-backend.md +0 -0
  134. package/templates/skills/knowledge/mobile-design/mobile-color-system.md +0 -0
  135. package/templates/skills/knowledge/mobile-design/mobile-debugging.md +0 -0
  136. package/templates/skills/knowledge/mobile-design/mobile-design-thinking.md +0 -0
  137. package/templates/skills/knowledge/mobile-design/mobile-navigation.md +0 -0
  138. package/templates/skills/knowledge/mobile-design/mobile-performance.md +0 -0
  139. package/templates/skills/knowledge/mobile-design/mobile-testing.md +0 -0
  140. package/templates/skills/knowledge/mobile-design/mobile-typography.md +0 -0
  141. package/templates/skills/knowledge/mobile-design/platform-android.md +0 -0
  142. package/templates/skills/knowledge/mobile-design/platform-ios.md +0 -0
  143. package/templates/skills/knowledge/mobile-design/scripts/mobile_audit.py +0 -0
  144. package/templates/skills/knowledge/mobile-design/touch-psychology.md +0 -0
  145. package/templates/skills/knowledge/nextjs-best-practices/SKILL.md +0 -0
  146. package/templates/skills/knowledge/nodejs-best-practices/SKILL.md +0 -0
  147. package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +71 -0
  148. package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +24 -0
  149. package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +34 -0
  150. package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +19 -0
  151. package/templates/skills/knowledge/parallel-agents/SKILL.md +0 -0
  152. package/templates/skills/knowledge/performance-profiling/SKILL.md +0 -0
  153. package/templates/skills/knowledge/performance-profiling/scripts/lighthouse_audit.py +0 -0
  154. package/templates/skills/knowledge/plan-writing/SKILL.md +0 -0
  155. package/templates/skills/knowledge/powershell-windows/SKILL.md +0 -0
  156. package/templates/skills/knowledge/python-patterns/SKILL.md +0 -0
  157. package/templates/skills/knowledge/react-components/README.md +36 -0
  158. package/templates/skills/knowledge/react-components/SKILL.md +53 -0
  159. package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +80 -0
  160. package/templates/skills/knowledge/react-components/package-lock.json +231 -0
  161. package/templates/skills/knowledge/react-components/package.json +16 -0
  162. package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +15 -0
  163. package/templates/skills/knowledge/react-components/resources/component-template.tsx +37 -0
  164. package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +14 -0
  165. package/templates/skills/knowledge/react-components/resources/style-guide.json +27 -0
  166. package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +30 -0
  167. package/templates/skills/knowledge/react-components/scripts/validate.js +68 -0
  168. package/templates/skills/knowledge/react-patterns/SKILL.md +0 -0
  169. package/templates/skills/knowledge/red-team-tactics/SKILL.md +0 -0
  170. package/templates/skills/knowledge/self-update/SKILL.md +60 -0
  171. package/templates/skills/knowledge/self-update/scripts/update_kit.py +103 -0
  172. package/templates/skills/knowledge/seo-fundamentals/SKILL.md +0 -0
  173. package/templates/skills/knowledge/seo-fundamentals/scripts/seo_checker.py +0 -0
  174. package/templates/skills/knowledge/server-management/SKILL.md +0 -0
  175. package/templates/skills/knowledge/stitch-loop/README.md +54 -0
  176. package/templates/skills/knowledge/stitch-loop/SKILL.md +235 -0
  177. package/templates/skills/knowledge/stitch-loop/examples/SITE.md +73 -0
  178. package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +25 -0
  179. package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +61 -0
  180. package/templates/skills/knowledge/stitch-loop/resources/site-template.md +104 -0
  181. package/templates/skills/knowledge/systematic-debugging/SKILL.md +0 -0
  182. package/templates/skills/knowledge/tailwind-patterns/SKILL.md +0 -0
  183. package/templates/skills/knowledge/tdd-workflow/SKILL.md +0 -0
  184. package/templates/skills/knowledge/testing-patterns/SKILL.md +0 -0
  185. package/templates/skills/knowledge/testing-patterns/scripts/test_runner.py +0 -0
  186. package/templates/skills/knowledge/vulnerability-scanner/SKILL.md +0 -0
  187. package/templates/skills/knowledge/vulnerability-scanner/checklists.md +0 -0
  188. package/templates/skills/knowledge/vulnerability-scanner/scripts/security_scan.py +0 -0
  189. package/templates/skills/knowledge/webapp-testing/SKILL.md +0 -0
  190. package/templates/skills/knowledge/webapp-testing/scripts/playwright_runner.py +0 -0
  191. package/templates/skills/react-components/README.md +36 -0
  192. package/templates/skills/react-components/SKILL.md +53 -0
  193. package/templates/skills/react-components/examples/gold-standard-card.tsx +80 -0
  194. package/templates/skills/react-components/package-lock.json +231 -0
  195. package/templates/skills/react-components/package.json +16 -0
  196. package/templates/skills/react-components/resources/architecture-checklist.md +15 -0
  197. package/templates/skills/react-components/resources/component-template.tsx +37 -0
  198. package/templates/skills/react-components/resources/stitch-api-reference.md +14 -0
  199. package/templates/skills/react-components/resources/style-guide.json +27 -0
  200. package/templates/skills/react-components/scripts/fetch-stitch.sh +30 -0
  201. package/templates/skills/react-components/scripts/validate.js +68 -0
  202. package/templates/skills/stitch-loop/README.md +54 -0
  203. package/templates/skills/stitch-loop/SKILL.md +235 -0
  204. package/templates/skills/stitch-loop/examples/SITE.md +73 -0
  205. package/templates/skills/stitch-loop/examples/next-prompt.md +25 -0
  206. package/templates/skills/stitch-loop/resources/baton-schema.md +61 -0
  207. package/templates/skills/stitch-loop/resources/site-template.md +104 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: notebooklm-mcp
3
+ description: "Connects to Google NotebookLM via Model Context Protocol (MCP) to access notebooks, sources, and query content. Triggers when the user asks to summarize, query, or interact with NotebookLM content."
4
+ ---
5
+
6
+ # NotebookLM MCP Connector
7
+
8
+ ## Overview
9
+
10
+ This skill allows the agent to interact with Google NotebookLM content through the `notebooklm-mcp-server`. It enables listing notebooks, retrieving sources, and querying the intelligent notebook interface.
11
+
12
+ ## Capabilities
13
+
14
+ 1. **List Notebooks**: View all your NotebookLM notebooks.
15
+ 2. **Mange Sources**: Add or list sources within a notebook.
16
+ 3. **Query Content**: Ask questions about the documents in your notebooks.
17
+
18
+ ## Setup & Configuration
19
+
20
+ ### 1. Installation
21
+
22
+ The NotebookLM MCP server is installed via `uv`:
23
+
24
+ ```bash
25
+ uv tool install notebooklm-mcp-server
26
+ ```
27
+
28
+ ### 2. Authentication
29
+
30
+ Authentication requires extracting cookies from a logged-in Chrome session.
31
+
32
+ **Recommended Method (File Mode):**
33
+
34
+ 1. Install a cookie exporter extension (e.g., [Get cookies.txt LOCALLY](https://chrome.google.com/webstore/detail/get-cookies-txt-locally/cclelndahbckbenkjhflccgombaodnld)).
35
+ 2. Log in to [NotebookLM](https://notebooklm.google.com/).
36
+ 3. Export cookies for `notebooklm.google.com` to a file (e.g., `~/cookies.txt`).
37
+ 4. Run the auth tool:
38
+ ```bash
39
+ notebooklm-mcp-auth --file ~/cookies.txt
40
+ ```
41
+
42
+ **Auto Mode (Requires Chrome Debugging):**
43
+
44
+ If Chrome is running with `--remote-debugging-port=9222`, you can run:
45
+
46
+ ```bash
47
+ notebooklm-mcp-auth
48
+ ```
49
+
50
+ ### 3. MCP Configuration
51
+
52
+ Add the following to your MCP client configuration (e.g., Claude Desktop or OpenCode):
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "notebooklm-mcp-server": {
58
+ "command": "uv",
59
+ "args": ["tool", "run", "notebooklm-mcp-server"]
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ## Usage
66
+
67
+ Use the available MCP tools to interact with NotebookLM.
68
+
69
+ - `list_notebooks()`
70
+ - `get_notebook(notebook_id)`
71
+ - `query_notebook(notebook_id, query)`
@@ -0,0 +1,24 @@
1
+ # Example Asset File
2
+
3
+ This placeholder represents where asset files would be stored.
4
+ Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
5
+
6
+ Asset files are NOT intended to be loaded into context, but rather used within
7
+ the output Claude produces.
8
+
9
+ Example asset files from other skills:
10
+ - Brand guidelines: logo.png, slides_template.pptx
11
+ - Frontend builder: hello-world/ directory with HTML/React boilerplate
12
+ - Typography: custom-font.ttf, font-family.woff2
13
+ - Data: sample_data.csv, test_dataset.json
14
+
15
+ ## Common Asset Types
16
+
17
+ - Templates: .pptx, .docx, boilerplate directories
18
+ - Images: .png, .jpg, .svg, .gif
19
+ - Fonts: .ttf, .otf, .woff, .woff2
20
+ - Boilerplate code: Project directories, starter files
21
+ - Icons: .ico, .svg
22
+ - Data files: .csv, .json, .xml, .yaml
23
+
24
+ Note: This is a text placeholder. Actual assets can be any file type.
@@ -0,0 +1,34 @@
1
+ # Reference Documentation for Notebooklm Mcp
2
+
3
+ This is a placeholder for detailed reference documentation.
4
+ Replace with actual reference content or delete if not needed.
5
+
6
+ Example real reference docs from other skills:
7
+ - product-management/references/communication.md - Comprehensive guide for status updates
8
+ - product-management/references/context_building.md - Deep-dive on gathering context
9
+ - bigquery/references/ - API references and query examples
10
+
11
+ ## When Reference Docs Are Useful
12
+
13
+ Reference docs are ideal for:
14
+ - Comprehensive API documentation
15
+ - Detailed workflow guides
16
+ - Complex multi-step processes
17
+ - Information too lengthy for main SKILL.md
18
+ - Content that's only needed for specific use cases
19
+
20
+ ## Structure Suggestions
21
+
22
+ ### API Reference Example
23
+ - Overview
24
+ - Authentication
25
+ - Endpoints with examples
26
+ - Error codes
27
+ - Rate limits
28
+
29
+ ### Workflow Guide Example
30
+ - Prerequisites
31
+ - Step-by-step instructions
32
+ - Common patterns
33
+ - Troubleshooting
34
+ - Best practices
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Example helper script for notebooklm-mcp
4
+
5
+ This is a placeholder script that can be executed directly.
6
+ Replace with actual implementation or delete if not needed.
7
+
8
+ Example real scripts from other skills:
9
+ - pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
10
+ - pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
11
+ """
12
+
13
+ def main():
14
+ print("This is an example script for notebooklm-mcp")
15
+ # TODO: Add actual script logic here
16
+ # This could be data processing, file conversion, API calls, etc.
17
+
18
+ if __name__ == "__main__":
19
+ main()
File without changes
@@ -0,0 +1,36 @@
1
+ # Stitch to React Components Skill
2
+
3
+ ## Install
4
+
5
+ ```bash
6
+ npx add-skill google-labs-code/stitch-skills --skill react:components --global
7
+ ```
8
+
9
+ ## Example Prompt
10
+
11
+ ```text
12
+ Convert my Landing Page screen in my Podcast Stitch Project to a React component system.
13
+ ```
14
+
15
+ ## Skill Structure
16
+
17
+ This repository follows the **Agent Skills** open standard. Each skill is self-contained with its own logic, validation scripts, and design tokens.
18
+
19
+ ```text
20
+ skills/react-components/
21
+ ├── SKILL.md — Core instructions & workflow
22
+ ├── package.json — Validator dependencies
23
+ ├── scripts/ — Networking & AST validation
24
+ ├── resources/ — Style guides & API references
25
+ └── examples/ — Gold-standard code samples
26
+ ```
27
+
28
+ ## How it Works
29
+
30
+ When activated, the agent follows a high-fidelity engineering pipeline:
31
+
32
+ 1. **Retrieval**: Uses a system-level `curl` script to bypass TLS/SNI issues on Google Cloud Storage.
33
+ 2. **Mapping**: Cross-references Stitch metadata with the local `style-guide.json` to ensure token consistency.
34
+ 3. **Generation**: Scaffolds components using a strict Atomic Design pattern.
35
+ 4. **Validation**: Runs an automated AST check using `@swc/core` to prevent hardcoded hex values or missing interfaces.
36
+ 5. **Audit**: Performs a final self-correction check against a 20-point architecture checklist.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: react:components
3
+ description: Converts Stitch designs into modular Vite and React components using system-level networking and AST-based validation.
4
+ allowed-tools:
5
+ - "stitch*:*"
6
+ - "Bash"
7
+ - "Read"
8
+ - "Write"
9
+ - "web_fetch"
10
+ - "qdrant-memory"
11
+ ---
12
+
13
+ # Stitch to React Components
14
+
15
+ You are a frontend engineer focused on transforming designs into clean React code. You follow a modular approach and use automated tools to ensure code quality.
16
+
17
+ ## Retrieval and networking
18
+
19
+ 1. **Namespace discovery**: Run `list_tools` to find the Stitch MCP prefix. Use this prefix (e.g., `stitch:`) for all subsequent calls.
20
+ 2. **Metadata fetch**: Call `[prefix]:get_screen` to retrieve the design JSON.
21
+ 3. **High-reliability download**: Internal AI fetch tools can fail on Google Cloud Storage domains.
22
+ - Use the `Bash` tool to run: `bash scripts/fetch-stitch.sh "[htmlCode.downloadUrl]" "temp/source.html"`.
23
+ - This script handles the necessary redirects and security handshakes.
24
+ 4. **Visual audit**: Check `screenshot.downloadUrl` to confirm the design intent and layout details.
25
+
26
+ ## Architectural rules
27
+
28
+ - **Modular components**: Break the design into independent files. Avoid large, single-file outputs.
29
+ - **Logic isolation**: Move event handlers and business logic into custom hooks in `src/hooks/`.
30
+ - **Data decoupling**: Move all static text, image URLs, and lists into `src/data/mockData.ts`.
31
+ - **Type safety**: Every component must include a `Readonly` TypeScript interface named `[ComponentName]Props`.
32
+ - **Project specific**: Focus on the target project's needs and constraints. Leave Google license headers out of the generated React components.
33
+ - **Style mapping**:
34
+ - Extract the `tailwind.config` from the HTML `<head>`.
35
+ - Sync these values with `resources/style-guide.json`.
36
+ - Use theme-mapped Tailwind classes instead of arbitrary hex codes.
37
+
38
+ ## Execution steps
39
+
40
+ 1. **Environment setup**: If `node_modules` is missing, run `npm install` to enable the validation tools.
41
+ 2. **Data layer**: Create `src/data/mockData.ts` based on the design content.
42
+ 3. **Pattern Retrieval (Optional)**: If **qdrant-memory** is available, search for existing components (`type: "code"`) to reuse patterns or interfaces.
43
+ 4. **Component drafting**: Use `resources/component-template.tsx` as a base. Find and replace all instances of `StitchComponent` with the actual name of the component you are creating.
44
+ 5. **Application wiring**: Update the project entry point (like `App.tsx`) to render the new components.
45
+ 6. **Quality check**:
46
+ - Run `npm run validate <file_path>` for each component.
47
+ - Verify the final output against the `resources/architecture-checklist.md`.
48
+ - Start the dev server with `npm run dev` to verify the live result.
49
+
50
+ ## Troubleshooting
51
+
52
+ - **Fetch errors**: Ensure the URL is quoted in the bash command to prevent shell errors.
53
+ - **Validation errors**: Review the AST report and fix any missing interfaces or hardcoded styles.
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Copyright 2026 Google LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React from 'react';
18
+ // Note for Agent: The '@' alias refers to the target project's src directory.
19
+ // Ensure src/data/mockData.ts is created before generating this component.
20
+ import { cardData } from '../data/mockData';
21
+
22
+ /**
23
+ * Gold Standard: ActivityCard
24
+ * This file serves as the definitive reference for the agent.
25
+ */
26
+ interface ActivityCardProps {
27
+ readonly id: string;
28
+ readonly username: string;
29
+ readonly action: 'MERGED' | 'COMMIT';
30
+ readonly timestamp: string;
31
+ readonly avatarUrl: string;
32
+ readonly repoName: string;
33
+ }
34
+
35
+ export const ActivityCard: React.FC<ActivityCardProps> = ({
36
+ username,
37
+ action,
38
+ timestamp,
39
+ avatarUrl,
40
+ repoName,
41
+ }) => {
42
+ const isMerged = action === 'MERGED';
43
+
44
+ return (
45
+ <div className="flex items-center justify-between gap-4 rounded-lg bg-surface-dark p-4 min-h-14 shadow-sm ring-1 ring-white/10">
46
+ <div className="flex items-center gap-4 overflow-hidden">
47
+ <div
48
+ className="aspect-square h-10 w-10 flex-shrink-0 rounded-full bg-cover bg-center bg-no-repeat"
49
+ style={{ backgroundImage: `url(${avatarUrl})` }}
50
+ aria-label={`Avatar for ${username}`}
51
+ />
52
+
53
+ <div className="flex flex-wrap items-center gap-x-2 gap-y-1 text-sm sm:text-base">
54
+ <a href="#" className="font-semibold text-primary hover:underline truncate">
55
+ {username}
56
+ </a>
57
+
58
+ <span className={`inline-block px-2 py-0.5 text-xs font-semibold rounded-full ${isMerged ? 'bg-purple-500/30 text-purple-300' : 'bg-primary/30 text-primary'
59
+ }`}>
60
+ {action}
61
+ </span>
62
+
63
+ <span className="text-white/60">in</span>
64
+
65
+ <a href="#" className="text-primary hover:underline truncate">
66
+ {repoName}
67
+ </a>
68
+ </div>
69
+ </div>
70
+
71
+ <div className="shrink-0">
72
+ <p className="text-sm font-normal leading-normal text-white/50">
73
+ {timestamp}
74
+ </p>
75
+ </div>
76
+ </div>
77
+ );
78
+ };
79
+
80
+ export default ActivityCard;
@@ -0,0 +1,231 @@
1
+ {
2
+ "name": "stitch-to-react-pro",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "stitch-to-react-pro",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "@swc/core": "^1.3.100"
12
+ },
13
+ "engines": {
14
+ "node": ">=18.0.0"
15
+ }
16
+ },
17
+ "node_modules/@swc/core": {
18
+ "version": "1.15.8",
19
+ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.8.tgz",
20
+ "integrity": "sha512-T8keoJjXaSUoVBCIjgL6wAnhADIb09GOELzKg10CjNg+vLX48P93SME6jTfte9MZIm5m+Il57H3rTSk/0kzDUw==",
21
+ "hasInstallScript": true,
22
+ "license": "Apache-2.0",
23
+ "dependencies": {
24
+ "@swc/counter": "^0.1.3",
25
+ "@swc/types": "^0.1.25"
26
+ },
27
+ "engines": {
28
+ "node": ">=10"
29
+ },
30
+ "funding": {
31
+ "type": "opencollective",
32
+ "url": "https://opencollective.com/swc"
33
+ },
34
+ "optionalDependencies": {
35
+ "@swc/core-darwin-arm64": "1.15.8",
36
+ "@swc/core-darwin-x64": "1.15.8",
37
+ "@swc/core-linux-arm-gnueabihf": "1.15.8",
38
+ "@swc/core-linux-arm64-gnu": "1.15.8",
39
+ "@swc/core-linux-arm64-musl": "1.15.8",
40
+ "@swc/core-linux-x64-gnu": "1.15.8",
41
+ "@swc/core-linux-x64-musl": "1.15.8",
42
+ "@swc/core-win32-arm64-msvc": "1.15.8",
43
+ "@swc/core-win32-ia32-msvc": "1.15.8",
44
+ "@swc/core-win32-x64-msvc": "1.15.8"
45
+ },
46
+ "peerDependencies": {
47
+ "@swc/helpers": ">=0.5.17"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "@swc/helpers": {
51
+ "optional": true
52
+ }
53
+ }
54
+ },
55
+ "node_modules/@swc/core-darwin-arm64": {
56
+ "version": "1.15.8",
57
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.8.tgz",
58
+ "integrity": "sha512-M9cK5GwyWWRkRGwwCbREuj6r8jKdES/haCZ3Xckgkl8MUQJZA3XB7IXXK1IXRNeLjg6m7cnoMICpXv1v1hlJOg==",
59
+ "cpu": [
60
+ "arm64"
61
+ ],
62
+ "license": "Apache-2.0 AND MIT",
63
+ "optional": true,
64
+ "os": [
65
+ "darwin"
66
+ ],
67
+ "engines": {
68
+ "node": ">=10"
69
+ }
70
+ },
71
+ "node_modules/@swc/core-darwin-x64": {
72
+ "version": "1.15.8",
73
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.8.tgz",
74
+ "integrity": "sha512-j47DasuOvXl80sKJHSi2X25l44CMc3VDhlJwA7oewC1nV1VsSzwX+KOwE5tLnfORvVJJyeiXgJORNYg4jeIjYQ==",
75
+ "cpu": [
76
+ "x64"
77
+ ],
78
+ "license": "Apache-2.0 AND MIT",
79
+ "optional": true,
80
+ "os": [
81
+ "darwin"
82
+ ],
83
+ "engines": {
84
+ "node": ">=10"
85
+ }
86
+ },
87
+ "node_modules/@swc/core-linux-arm-gnueabihf": {
88
+ "version": "1.15.8",
89
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.8.tgz",
90
+ "integrity": "sha512-siAzDENu2rUbwr9+fayWa26r5A9fol1iORG53HWxQL1J8ym4k7xt9eME0dMPXlYZDytK5r9sW8zEA10F2U3Xwg==",
91
+ "cpu": [
92
+ "arm"
93
+ ],
94
+ "license": "Apache-2.0",
95
+ "optional": true,
96
+ "os": [
97
+ "linux"
98
+ ],
99
+ "engines": {
100
+ "node": ">=10"
101
+ }
102
+ },
103
+ "node_modules/@swc/core-linux-arm64-gnu": {
104
+ "version": "1.15.8",
105
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.8.tgz",
106
+ "integrity": "sha512-o+1y5u6k2FfPYbTRUPvurwzNt5qd0NTumCTFscCNuBksycloXY16J8L+SMW5QRX59n4Hp9EmFa3vpvNHRVv1+Q==",
107
+ "cpu": [
108
+ "arm64"
109
+ ],
110
+ "license": "Apache-2.0 AND MIT",
111
+ "optional": true,
112
+ "os": [
113
+ "linux"
114
+ ],
115
+ "engines": {
116
+ "node": ">=10"
117
+ }
118
+ },
119
+ "node_modules/@swc/core-linux-arm64-musl": {
120
+ "version": "1.15.8",
121
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.8.tgz",
122
+ "integrity": "sha512-koiCqL09EwOP1S2RShCI7NbsQuG6r2brTqUYE7pV7kZm9O17wZ0LSz22m6gVibpwEnw8jI3IE1yYsQTVpluALw==",
123
+ "cpu": [
124
+ "arm64"
125
+ ],
126
+ "license": "Apache-2.0 AND MIT",
127
+ "optional": true,
128
+ "os": [
129
+ "linux"
130
+ ],
131
+ "engines": {
132
+ "node": ">=10"
133
+ }
134
+ },
135
+ "node_modules/@swc/core-linux-x64-gnu": {
136
+ "version": "1.15.8",
137
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.8.tgz",
138
+ "integrity": "sha512-4p6lOMU3bC+Vd5ARtKJ/FxpIC5G8v3XLoPEZ5s7mLR8h7411HWC/LmTXDHcrSXRC55zvAVia1eldy6zDLz8iFQ==",
139
+ "cpu": [
140
+ "x64"
141
+ ],
142
+ "license": "Apache-2.0 AND MIT",
143
+ "optional": true,
144
+ "os": [
145
+ "linux"
146
+ ],
147
+ "engines": {
148
+ "node": ">=10"
149
+ }
150
+ },
151
+ "node_modules/@swc/core-linux-x64-musl": {
152
+ "version": "1.15.8",
153
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.8.tgz",
154
+ "integrity": "sha512-z3XBnbrZAL+6xDGAhJoN4lOueIxC/8rGrJ9tg+fEaeqLEuAtHSW2QHDHxDwkxZMjuF/pZ6MUTjHjbp8wLbuRLA==",
155
+ "cpu": [
156
+ "x64"
157
+ ],
158
+ "license": "Apache-2.0 AND MIT",
159
+ "optional": true,
160
+ "os": [
161
+ "linux"
162
+ ],
163
+ "engines": {
164
+ "node": ">=10"
165
+ }
166
+ },
167
+ "node_modules/@swc/core-win32-arm64-msvc": {
168
+ "version": "1.15.8",
169
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.8.tgz",
170
+ "integrity": "sha512-djQPJ9Rh9vP8GTS/Df3hcc6XP6xnG5c8qsngWId/BLA9oX6C7UzCPAn74BG/wGb9a6j4w3RINuoaieJB3t+7iQ==",
171
+ "cpu": [
172
+ "arm64"
173
+ ],
174
+ "license": "Apache-2.0 AND MIT",
175
+ "optional": true,
176
+ "os": [
177
+ "win32"
178
+ ],
179
+ "engines": {
180
+ "node": ">=10"
181
+ }
182
+ },
183
+ "node_modules/@swc/core-win32-ia32-msvc": {
184
+ "version": "1.15.8",
185
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.8.tgz",
186
+ "integrity": "sha512-/wfAgxORg2VBaUoFdytcVBVCgf1isWZIEXB9MZEUty4wwK93M/PxAkjifOho9RN3WrM3inPLabICRCEgdHpKKQ==",
187
+ "cpu": [
188
+ "ia32"
189
+ ],
190
+ "license": "Apache-2.0 AND MIT",
191
+ "optional": true,
192
+ "os": [
193
+ "win32"
194
+ ],
195
+ "engines": {
196
+ "node": ">=10"
197
+ }
198
+ },
199
+ "node_modules/@swc/core-win32-x64-msvc": {
200
+ "version": "1.15.8",
201
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.8.tgz",
202
+ "integrity": "sha512-GpMePrh9Sl4d61o4KAHOOv5is5+zt6BEXCOCgs/H0FLGeii7j9bWDE8ExvKFy2GRRZVNR1ugsnzaGWHKM6kuzA==",
203
+ "cpu": [
204
+ "x64"
205
+ ],
206
+ "license": "Apache-2.0 AND MIT",
207
+ "optional": true,
208
+ "os": [
209
+ "win32"
210
+ ],
211
+ "engines": {
212
+ "node": ">=10"
213
+ }
214
+ },
215
+ "node_modules/@swc/counter": {
216
+ "version": "0.1.3",
217
+ "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
218
+ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==",
219
+ "license": "Apache-2.0"
220
+ },
221
+ "node_modules/@swc/types": {
222
+ "version": "0.1.25",
223
+ "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz",
224
+ "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==",
225
+ "license": "Apache-2.0",
226
+ "dependencies": {
227
+ "@swc/counter": "^0.1.3"
228
+ }
229
+ }
230
+ }
231
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "react-components",
3
+ "version": "1.0.0",
4
+ "description": "Design-to-code prompt to React components for Stitch MCP",
5
+ "type": "module",
6
+ "scripts": {
7
+ "validate": "node scripts/validate.js",
8
+ "fetch": "bash scripts/fetch-stitch.sh"
9
+ },
10
+ "dependencies": {
11
+ "@swc/core": "^1.3.100"
12
+ },
13
+ "engines": {
14
+ "node": ">=18.0.0"
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ # Architecture Quality Gate
2
+
3
+ ### Structural integrity
4
+ - [ ] Logic extracted to custom hooks in `src/hooks/`.
5
+ - [ ] No monolithic files; strictly Atomic/Composite modularity.
6
+ - [ ] All static text/URLs moved to `src/data/mockData.ts`.
7
+
8
+ ### Type safety and syntax
9
+ - [ ] Props use `Readonly<T>` interfaces.
10
+ - [ ] File is syntactically valid TypeScript (no red squiggles).
11
+ - [ ] Placeholders from templates (e.g., `StitchComponent`) have been replaced with actual names.
12
+
13
+ ### Styling and theming
14
+ - [ ] Dark mode (`dark:`) applied to all color classes.
15
+ - [ ] No hardcoded hex values; use theme-mapped Tailwind classes.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright 2026 Google LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React from 'react';
18
+
19
+ // Use a valid identifier like 'StitchComponent' as the placeholder
20
+ interface StitchComponentProps {
21
+ readonly children?: React.ReactNode;
22
+ readonly className?: string;
23
+ }
24
+
25
+ export const StitchComponent: React.FC<StitchComponentProps> = ({
26
+ children,
27
+ className = '',
28
+ ...props
29
+ }) => {
30
+ return (
31
+ <div className={`relative ${className}`} {...props}>
32
+ {children}
33
+ </div>
34
+ );
35
+ };
36
+
37
+ export default StitchComponent;
@@ -0,0 +1,14 @@
1
+ # Stitch API reference
2
+
3
+ This document describes the data structures returned by the Stitch MCP server to ensure accurate component mapping.
4
+
5
+ ### Metadata schema
6
+ When calling `get_screen`, the server returns a JSON object with these key properties:
7
+ * **htmlCode**: Contains a `downloadUrl`. This is a signed URL that requires a system-level fetch (curl) to handle redirects and security handshakes.
8
+ * **screenshot**: Includes a `downloadUrl` for the visual design. Use this to verify layout intent that might not be obvious in the raw HTML.
9
+ * **deviceType**: Usually set to `DESKTOP`. All generated components should prioritize the corresponding viewport (2560px width) as the base layout.
10
+
11
+ ### Technical mapping rules
12
+ 1. **Element tracking**: Preserve `data-stitch-id` attributes as comments in the TSX to allow for future design synchronization.
13
+ 2. **Asset handling**: Treat background images in the HTML as dynamic data. Extract the URLs into `mockData.ts` rather than hardcoding them into the component styles.
14
+ 3. **Style extraction**: The HTML `<head>` contains a localized `tailwind.config`. This config must be merged with the local project theme to ensure colors like `primary` and `background-dark` render correctly.