@brookmind/ai-toolkit 1.0.5 → 1.1.1

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 (152) hide show
  1. package/README.md +54 -14
  2. package/agents/code-reviewer.md +6 -1
  3. package/agents/code-simplifier.md +52 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +257 -220
  6. package/dist/index.js.map +1 -1
  7. package/mcps/context7/.mcp.json +13 -0
  8. package/mcps/expo-mcp/.mcp.json +13 -0
  9. package/mcps/figma-mcp/.mcp.json +4 -6
  10. package/package.json +4 -4
  11. package/skills/pdf-processing-pro/FORMS.md +610 -0
  12. package/skills/pdf-processing-pro/OCR.md +137 -0
  13. package/skills/pdf-processing-pro/SKILL.md +296 -0
  14. package/skills/pdf-processing-pro/TABLES.md +626 -0
  15. package/skills/pdf-processing-pro/scripts/analyze_form.py +307 -0
  16. package/skills/react-best-practices/AGENTS.md +915 -0
  17. package/skills/react-best-practices/README.md +127 -0
  18. package/skills/react-best-practices/SKILL.md +110 -0
  19. package/skills/react-best-practices/metadata.json +14 -0
  20. package/skills/react-best-practices/rules/_sections.md +41 -0
  21. package/skills/react-best-practices/rules/_template.md +28 -0
  22. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +80 -0
  23. package/skills/react-best-practices/rules/advanced-use-latest.md +76 -0
  24. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  25. package/skills/react-best-practices/rules/async-dependencies.md +36 -0
  26. package/skills/react-best-practices/rules/async-parallel.md +28 -0
  27. package/skills/react-best-practices/rules/async-suspense-boundaries.md +100 -0
  28. package/skills/react-best-practices/rules/bundle-barrel-imports.md +42 -0
  29. package/skills/react-best-practices/rules/bundle-conditional.md +106 -0
  30. package/skills/react-best-practices/rules/bundle-preload.md +44 -0
  31. package/skills/react-best-practices/rules/client-event-listeners.md +131 -0
  32. package/skills/react-best-practices/rules/client-swr-dedup.md +133 -0
  33. package/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  34. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  35. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  36. package/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  37. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  38. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  39. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  40. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  41. package/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  42. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  43. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  44. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  45. package/skills/react-best-practices/rules/rendering-activity.md +90 -0
  46. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  47. package/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  48. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  49. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +65 -0
  50. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  51. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  52. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  53. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  54. package/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  55. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  56. package/skills/react-best-practices/rules/rerender-memo.md +85 -0
  57. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  58. package/themes/README.md +68 -0
  59. package/themes/claude-vivid.json +72 -0
  60. package/mcps/context7/.claude-plugin +0 -1
  61. package/mcps/context7/README.md +0 -1
  62. package/mcps/context7/server.json +0 -1
  63. package/mcps/expo-mcp/README.md +0 -33
  64. package/mcps/expo-mcp/package.json +0 -30
  65. package/mcps/figma-mcp/README.md +0 -554
  66. package/mcps/figma-mcp/server.json +0 -17
  67. package/mcps/figma-mcp/skills/code-connect-components +0 -1
  68. package/mcps/figma-mcp/skills/create-design-system-rules +0 -1
  69. package/mcps/figma-mcp/skills/implement-design +0 -1
  70. package/mcps/pg-aiguide/.claude-plugin +0 -1
  71. package/mcps/pg-aiguide/CLAUDE.md +0 -21
  72. package/mcps/pg-aiguide/README.md +0 -275
  73. package/mcps/pg-aiguide/skills/design-postgres-tables +0 -1
  74. package/mcps/pg-aiguide/skills/find-hypertable-candidates +0 -1
  75. package/mcps/pg-aiguide/skills/migrate-postgres-tables-to-hypertables +0 -1
  76. package/mcps/pg-aiguide/skills/setup-timescaledb-hypertables +0 -1
  77. package/mcps/pg-aiguide/skills.yaml +0 -4
  78. package/skills/cloudflare-cli/SKILL.md +0 -151
  79. package/skills/docx/LICENSE.txt +0 -30
  80. package/skills/docx/SKILL.md +0 -197
  81. package/skills/docx/docx-js.md +0 -350
  82. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  83. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  84. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  85. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  86. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  87. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  88. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  89. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  90. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  91. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  92. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  93. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  94. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  95. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  96. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  97. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  98. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  99. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  100. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  101. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  102. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  103. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  104. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  105. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  106. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  107. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  108. package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  109. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
  110. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
  111. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
  112. package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
  113. package/skills/docx/ooxml/schemas/mce/mc.xsd +0 -75
  114. package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +0 -560
  115. package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +0 -67
  116. package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +0 -14
  117. package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +0 -20
  118. package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +0 -13
  119. package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  120. package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +0 -8
  121. package/skills/docx/ooxml/scripts/pack.py +0 -159
  122. package/skills/docx/ooxml/scripts/unpack.py +0 -29
  123. package/skills/docx/ooxml/scripts/validate.py +0 -69
  124. package/skills/docx/ooxml/scripts/validation/__init__.py +0 -15
  125. package/skills/docx/ooxml/scripts/validation/base.py +0 -951
  126. package/skills/docx/ooxml/scripts/validation/docx.py +0 -274
  127. package/skills/docx/ooxml/scripts/validation/pptx.py +0 -315
  128. package/skills/docx/ooxml/scripts/validation/redlining.py +0 -279
  129. package/skills/docx/ooxml.md +0 -610
  130. package/skills/docx/scripts/__init__.py +0 -1
  131. package/skills/docx/scripts/document.py +0 -1276
  132. package/skills/docx/scripts/templates/comments.xml +0 -3
  133. package/skills/docx/scripts/templates/commentsExtended.xml +0 -3
  134. package/skills/docx/scripts/templates/commentsExtensible.xml +0 -3
  135. package/skills/docx/scripts/templates/commentsIds.xml +0 -3
  136. package/skills/docx/scripts/templates/people.xml +0 -3
  137. package/skills/docx/scripts/utilities.py +0 -374
  138. package/skills/pdf/LICENSE.txt +0 -30
  139. package/skills/pdf/SKILL.md +0 -294
  140. package/skills/pdf/forms.md +0 -205
  141. package/skills/pdf/reference.md +0 -612
  142. package/skills/pdf/scripts/check_bounding_boxes.py +0 -70
  143. package/skills/pdf/scripts/check_bounding_boxes_test.py +0 -226
  144. package/skills/pdf/scripts/check_fillable_fields.py +0 -12
  145. package/skills/pdf/scripts/convert_pdf_to_images.py +0 -35
  146. package/skills/pdf/scripts/create_validation_image.py +0 -41
  147. package/skills/pdf/scripts/extract_form_field_info.py +0 -152
  148. package/skills/pdf/scripts/fill_fillable_fields.py +0 -114
  149. package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -108
  150. package/skills/xlsx/LICENSE.txt +0 -30
  151. package/skills/xlsx/SKILL.md +0 -289
  152. package/skills/xlsx/recalc.py +0 -178
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # CKW AI Toolkit
1
+ # OpenCode AI Toolkit
2
2
 
3
- A collection of agents, skills, and MCPs for Claude Code and OpenCode.
3
+ A collection of agents, skills, and MCPs for OpenCode.
4
4
 
5
5
  ## Quick Install
6
6
 
@@ -8,30 +8,37 @@ A collection of agents, skills, and MCPs for Claude Code and OpenCode.
8
8
  npx @brookmind/ai-toolkit
9
9
  ```
10
10
 
11
- The interactive installer will guide you through selecting:
12
- - **Platform**: Claude Code, OpenCode, or Both
13
- - **Agents**: AI assistants for specific tasks
14
- - **Skills**: Extended capabilities and workflows
15
- - **MCPs**: Model Context Protocol servers
11
+ The installer will:
12
+ 1. **Check if OpenCode is installed** - If not, it will offer to install it for you
13
+ 2. **Guide you through selecting**:
14
+ - **Agents**: AI assistants for specific tasks
15
+ - **Skills**: Extended capabilities and workflows
16
+ - **MCPs**: Model Context Protocol servers
17
+ 3. **Theme installation**:
18
+ - **New installations**: claude-vivid theme is installed automatically
19
+ - **Existing installations**: You'll be asked if you want to install the theme
16
20
 
17
21
  ## What's Included
18
22
 
19
23
  ### Agents
20
24
  - `code-reviewer` - Expert code review for quality and security
25
+ - `code-simplifier` - Simplifies and refines code for clarity and maintainability
21
26
 
22
27
  ### Skills
23
- - `cloudflare-cli` - Cloudflare Workers, KV, D1, R2 operations
24
28
  - `github-cli` - GitHub operations (issues, PRs, releases)
25
- - `docx` - Word document manipulation
26
- - `pdf` - PDF processing and forms
27
- - `xlsx` - Spreadsheet operations
29
+ - `pdf-processing-pro` - Advanced PDF processing (OCR, tables, forms extraction)
30
+ - `react-best-practices` - React performance optimization guidelines from Vercel Engineering
28
31
  - `skill-creator` - Create new skills
29
32
 
30
33
  ### MCPs
31
34
  - `context7` - Up-to-date library documentation
32
35
  - `expo-mcp` - Expo/React Native utilities
33
- - `figma-mcp` - Figma design integration
34
- - `pg-aiguide` - PostgreSQL assistance
36
+ - `figma-mcp` - Figma design integration (requires Figma Desktop app)
37
+
38
+ ### Theme
39
+ - `claude-vivid` - High-contrast theme with vivid colors inspired by Claude Code
40
+ - Auto-installed for new OpenCode users
41
+ - Optional for existing OpenCode users
35
42
 
36
43
  ## Manual Installation
37
44
 
@@ -47,7 +54,40 @@ npm start
47
54
  ## Requirements
48
55
 
49
56
  - Node.js 18+
50
- - Claude Code and/or OpenCode installed
57
+ - OpenCode installed
58
+ - For Figma MCP: Figma Desktop app running
59
+
60
+ ## Configuration
61
+
62
+ After installation, some MCPs require API keys. Edit `~/.config/opencode/opencode.json` and replace `TOKEN_PLACEHOLDER` with your actual keys:
63
+
64
+ - **context7**: Get your API key at https://context7.com
65
+ - **expo-mcp**: Get your API key at https://expo.dev
66
+
67
+ ## Connecting GitHub Copilot
68
+
69
+ To use GitHub Copilot with OpenCode, follow these steps:
70
+
71
+ 1. **Run the connect command** in OpenCode:
72
+ ```
73
+ /connect
74
+ ```
75
+
76
+ ![Step 1: Run /connect command](docs/images/github-copilot-step1.png)
77
+
78
+ 2. **Select GitHub Copilot** from the list of providers:
79
+
80
+ ![Step 2: Select GitHub Copilot](docs/images/github-copilot-step2.png)
81
+
82
+ 3. **Copy the code and open the URL**: OpenCode will display a URL (`https://github.com/login/device`) and a code. Open the URL in your browser.
83
+
84
+ ![Step 3: Get authorization URL and code](docs/images/github-copilot-step3.png)
85
+
86
+ 4. **Complete authorization**: On the GitHub Device Activation page, verify your account and click the green "Continue" button to authorize OpenCode to use your GitHub Copilot license.
87
+
88
+ ![Step 4: Authorize on GitHub](docs/images/github-copilot-step4.png)
89
+
90
+ That's it! GitHub Copilot will now be available as a provider in OpenCode.
51
91
 
52
92
  ## License
53
93
 
@@ -1,7 +1,12 @@
1
1
  ---
2
2
  name: code-reviewer
3
3
  description: Expert code review specialist for quality, security, and maintainability. Use PROACTIVELY after writing or modifying code to ensure high development standards.
4
- tools: Read, Write, Edit, Bash, Grep
4
+ tools:
5
+ Read: true
6
+ Write: true
7
+ Edit: true
8
+ Bash: true
9
+ Grep: true
5
10
  model: sonnet
6
11
  ---
7
12
 
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: code-simplifier
3
+ description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
4
+ model: opus
5
+ ---
6
+
7
+ You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.
8
+
9
+ You will analyze recently modified code and apply refinements that:
10
+
11
+ 1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
12
+
13
+ 2. **Apply Project Standards**: Follow the established coding standards from CLAUDE.md including:
14
+
15
+ - Use ES modules with proper import sorting and extensions
16
+ - Prefer `function` keyword over arrow functions
17
+ - Use explicit return type annotations for top-level functions
18
+ - Follow proper React component patterns with explicit Props types
19
+ - Use proper error handling patterns (avoid try/catch when possible)
20
+ - Maintain consistent naming conventions
21
+
22
+ 3. **Enhance Clarity**: Simplify code structure by:
23
+
24
+ - Reducing unnecessary complexity and nesting
25
+ - Eliminating redundant code and abstractions
26
+ - Improving readability through clear variable and function names
27
+ - Consolidating related logic
28
+ - Removing unnecessary comments that describe obvious code
29
+ - IMPORTANT: Avoid nested ternary operators - prefer switch statements or if/else chains for multiple conditions
30
+ - Choose clarity over brevity - explicit code is often better than overly compact code
31
+
32
+ 4. **Maintain Balance**: Avoid over-simplification that could:
33
+
34
+ - Reduce code clarity or maintainability
35
+ - Create overly clever solutions that are hard to understand
36
+ - Combine too many concerns into single functions or components
37
+ - Remove helpful abstractions that improve code organization
38
+ - Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners)
39
+ - Make the code harder to debug or extend
40
+
41
+ 5. **Focus Scope**: Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.
42
+
43
+ Your refinement process:
44
+
45
+ 1. Identify the recently modified code sections
46
+ 2. Analyze for opportunities to improve elegance and consistency
47
+ 3. Apply project-specific best practices and coding standards
48
+ 4. Ensure all functionality remains unchanged
49
+ 5. Verify the refined code is simpler and more maintainable
50
+ 6. Document only significant changes that affect understanding
51
+
52
+ You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuEA,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAkQzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiLA,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAiJzC"}