gkt-node 3.3.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 (758) hide show
  1. package/README.md +89 -0
  2. package/assets/.agent/brain/agent_index.json +208 -0
  3. package/assets/.agent/brain/project_context.json +31 -0
  4. package/assets/.agent/skills/ab-test-setup/SKILL.md +232 -0
  5. package/assets/.agent/skills/agent-evaluation/SKILL.md +64 -0
  6. package/assets/.agent/skills/agent-memory-mcp/SKILL.md +82 -0
  7. package/assets/.agent/skills/agent-memory-systems/SKILL.md +67 -0
  8. package/assets/.agent/skills/agent-orchestration-multi-agent-optimize/SKILL.md +239 -0
  9. package/assets/.agent/skills/agent-tool-builder/SKILL.md +53 -0
  10. package/assets/.agent/skills/ai-agents-architect/SKILL.md +90 -0
  11. package/assets/.agent/skills/ai-engineer/SKILL.md +171 -0
  12. package/assets/.agent/skills/ai-product/SKILL.md +54 -0
  13. package/assets/.agent/skills/ai-wrapper-product/SKILL.md +273 -0
  14. package/assets/.agent/skills/airflow-dag-patterns/SKILL.md +41 -0
  15. package/assets/.agent/skills/airflow-dag-patterns/resources/implementation-playbook.md +509 -0
  16. package/assets/.agent/skills/airtable-automation/SKILL.md +170 -0
  17. package/assets/.agent/skills/analytics-tracking/SKILL.md +404 -0
  18. package/assets/.agent/skills/api-design-principles/SKILL.md +37 -0
  19. package/assets/.agent/skills/api-design-principles/assets/__pycache__/rest-api-template.cpython-314.pyc +0 -0
  20. package/assets/.agent/skills/api-design-principles/assets/api-design-checklist.md +155 -0
  21. package/assets/.agent/skills/api-design-principles/assets/rest-api-template.py +182 -0
  22. package/assets/.agent/skills/api-design-principles/references/graphql-schema-design.md +583 -0
  23. package/assets/.agent/skills/api-design-principles/references/rest-best-practices.md +408 -0
  24. package/assets/.agent/skills/api-design-principles/resources/implementation-playbook.md +513 -0
  25. package/assets/.agent/skills/api-designer/SKILL.md +22 -0
  26. package/assets/.agent/skills/api-designer/data/api_patterns.json +107 -0
  27. package/assets/.agent/skills/api-designer/scripts/__pycache__/api_gen.cpython-314.pyc +0 -0
  28. package/assets/.agent/skills/api-designer/scripts/api_gen.py +80 -0
  29. package/assets/.agent/skills/api-documentation-generator/SKILL.md +484 -0
  30. package/assets/.agent/skills/api-documenter/SKILL.md +184 -0
  31. package/assets/.agent/skills/api-fuzzing-bug-bounty/SKILL.md +433 -0
  32. package/assets/.agent/skills/api-patterns/SKILL.md +81 -0
  33. package/assets/.agent/skills/api-patterns/api-style.md +42 -0
  34. package/assets/.agent/skills/api-patterns/auth.md +24 -0
  35. package/assets/.agent/skills/api-patterns/documentation.md +26 -0
  36. package/assets/.agent/skills/api-patterns/graphql.md +41 -0
  37. package/assets/.agent/skills/api-patterns/rate-limiting.md +31 -0
  38. package/assets/.agent/skills/api-patterns/response.md +37 -0
  39. package/assets/.agent/skills/api-patterns/rest.md +40 -0
  40. package/assets/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-314.pyc +0 -0
  41. package/assets/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  42. package/assets/.agent/skills/api-patterns/security-testing.md +122 -0
  43. package/assets/.agent/skills/api-patterns/trpc.md +41 -0
  44. package/assets/.agent/skills/api-patterns/versioning.md +22 -0
  45. package/assets/.agent/skills/api-security-best-practices/SKILL.md +907 -0
  46. package/assets/.agent/skills/api-testing-observability-api-mock/SKILL.md +46 -0
  47. package/assets/.agent/skills/api-testing-observability-api-mock/resources/implementation-playbook.md +1327 -0
  48. package/assets/.agent/skills/app-store-optimization/HOW_TO_USE.md +281 -0
  49. package/assets/.agent/skills/app-store-optimization/README.md +430 -0
  50. package/assets/.agent/skills/app-store-optimization/SKILL.md +403 -0
  51. package/assets/.agent/skills/app-store-optimization/__pycache__/ab_test_planner.cpython-314.pyc +0 -0
  52. package/assets/.agent/skills/app-store-optimization/__pycache__/aso_scorer.cpython-314.pyc +0 -0
  53. package/assets/.agent/skills/app-store-optimization/__pycache__/competitor_analyzer.cpython-314.pyc +0 -0
  54. package/assets/.agent/skills/app-store-optimization/__pycache__/keyword_analyzer.cpython-314.pyc +0 -0
  55. package/assets/.agent/skills/app-store-optimization/__pycache__/launch_checklist.cpython-314.pyc +0 -0
  56. package/assets/.agent/skills/app-store-optimization/__pycache__/localization_helper.cpython-314.pyc +0 -0
  57. package/assets/.agent/skills/app-store-optimization/__pycache__/metadata_optimizer.cpython-314.pyc +0 -0
  58. package/assets/.agent/skills/app-store-optimization/__pycache__/review_analyzer.cpython-314.pyc +0 -0
  59. package/assets/.agent/skills/app-store-optimization/ab_test_planner.py +662 -0
  60. package/assets/.agent/skills/app-store-optimization/aso_scorer.py +482 -0
  61. package/assets/.agent/skills/app-store-optimization/competitor_analyzer.py +577 -0
  62. package/assets/.agent/skills/app-store-optimization/expected_output.json +170 -0
  63. package/assets/.agent/skills/app-store-optimization/keyword_analyzer.py +406 -0
  64. package/assets/.agent/skills/app-store-optimization/launch_checklist.py +739 -0
  65. package/assets/.agent/skills/app-store-optimization/localization_helper.py +588 -0
  66. package/assets/.agent/skills/app-store-optimization/metadata_optimizer.py +581 -0
  67. package/assets/.agent/skills/app-store-optimization/review_analyzer.py +714 -0
  68. package/assets/.agent/skills/app-store-optimization/sample_input.json +30 -0
  69. package/assets/.agent/skills/architecture-auditor/SKILL.md +35 -0
  70. package/assets/.agent/skills/architecture-auditor/data/standards.json +45 -0
  71. package/assets/.agent/skills/architecture-auditor/scripts/__pycache__/auditor.cpython-314.pyc +0 -0
  72. package/assets/.agent/skills/architecture-auditor/scripts/auditor.py +69 -0
  73. package/assets/.agent/skills/architecture-decision-records/SKILL.md +441 -0
  74. package/assets/.agent/skills/architecture-patterns/SKILL.md +37 -0
  75. package/assets/.agent/skills/architecture-patterns/resources/implementation-playbook.md +479 -0
  76. package/assets/.agent/skills/asana-automation/SKILL.md +171 -0
  77. package/assets/.agent/skills/attack-tree-construction/SKILL.md +38 -0
  78. package/assets/.agent/skills/attack-tree-construction/resources/implementation-playbook.md +671 -0
  79. package/assets/.agent/skills/auth-implementation-patterns/SKILL.md +39 -0
  80. package/assets/.agent/skills/auth-implementation-patterns/resources/implementation-playbook.md +618 -0
  81. package/assets/.agent/skills/autonomous-agent-patterns/SKILL.md +761 -0
  82. package/assets/.agent/skills/aws-penetration-testing/SKILL.md +405 -0
  83. package/assets/.agent/skills/aws-penetration-testing/references/advanced-aws-pentesting.md +469 -0
  84. package/assets/.agent/skills/aws-serverless/SKILL.md +323 -0
  85. package/assets/.agent/skills/backend-architect/SKILL.md +333 -0
  86. package/assets/.agent/skills/billing-automation/SKILL.md +42 -0
  87. package/assets/.agent/skills/billing-automation/resources/implementation-playbook.md +544 -0
  88. package/assets/.agent/skills/broken-authentication/SKILL.md +476 -0
  89. package/assets/.agent/skills/bullmq-specialist/SKILL.md +57 -0
  90. package/assets/.agent/skills/business-analyst/SKILL.md +182 -0
  91. package/assets/.agent/skills/cc-skill-backend-patterns/SKILL.md +584 -0
  92. package/assets/.agent/skills/cc-skill-clickhouse-io/SKILL.md +431 -0
  93. package/assets/.agent/skills/cc-skill-coding-standards/SKILL.md +522 -0
  94. package/assets/.agent/skills/cc-skill-continuous-learning/SKILL.md +10 -0
  95. package/assets/.agent/skills/cc-skill-continuous-learning/config.json +18 -0
  96. package/assets/.agent/skills/cc-skill-continuous-learning/evaluate-session.sh +60 -0
  97. package/assets/.agent/skills/cc-skill-frontend-patterns/SKILL.md +633 -0
  98. package/assets/.agent/skills/cc-skill-project-guidelines-example/SKILL.md +352 -0
  99. package/assets/.agent/skills/cc-skill-security-review/SKILL.md +496 -0
  100. package/assets/.agent/skills/cc-skill-strategic-compact/SKILL.md +10 -0
  101. package/assets/.agent/skills/cc-skill-strategic-compact/suggest-compact.sh +52 -0
  102. package/assets/.agent/skills/ci-cd-setup/SKILL.md +14 -0
  103. package/assets/.agent/skills/ci-cd-setup/data/pipeline_templates.json +42 -0
  104. package/assets/.agent/skills/ci-cd-setup/scripts/__pycache__/ci_gen.cpython-314.pyc +0 -0
  105. package/assets/.agent/skills/ci-cd-setup/scripts/ci_gen.py +75 -0
  106. package/assets/.agent/skills/claude-code-guide/SKILL.md +68 -0
  107. package/assets/.agent/skills/clean-code/SKILL.md +94 -0
  108. package/assets/.agent/skills/clickup-automation/SKILL.md +234 -0
  109. package/assets/.agent/skills/cloud-architect/SKILL.md +135 -0
  110. package/assets/.agent/skills/cloud-penetration-testing/SKILL.md +501 -0
  111. package/assets/.agent/skills/cloud-penetration-testing/references/advanced-cloud-scripts.md +318 -0
  112. package/assets/.agent/skills/code-reviewer/SKILL.md +31 -0
  113. package/assets/.agent/skills/code-reviewer/data/review_rules.json +172 -0
  114. package/assets/.agent/skills/code-reviewer/scripts/__pycache__/reviewer.cpython-314.pyc +0 -0
  115. package/assets/.agent/skills/code-reviewer/scripts/reviewer.py +192 -0
  116. package/assets/.agent/skills/codebase-navigator/SKILL.md +37 -0
  117. package/assets/.agent/skills/codebase-navigator/data/codebase_index.json +577 -0
  118. package/assets/.agent/skills/codebase-navigator/scripts/__pycache__/navigator.cpython-314.pyc +0 -0
  119. package/assets/.agent/skills/codebase-navigator/scripts/navigator.py +240 -0
  120. package/assets/.agent/skills/color-palette-generator/SKILL.md +26 -0
  121. package/assets/.agent/skills/color-palette-generator/data/palettes.json +37 -0
  122. package/assets/.agent/skills/color-palette-generator/scripts/__pycache__/palette.cpython-314.pyc +0 -0
  123. package/assets/.agent/skills/color-palette-generator/scripts/palette.py +57 -0
  124. package/assets/.agent/skills/competitive-landscape/SKILL.md +34 -0
  125. package/assets/.agent/skills/competitive-landscape/resources/implementation-playbook.md +494 -0
  126. package/assets/.agent/skills/competitor-alternatives/SKILL.md +750 -0
  127. package/assets/.agent/skills/computer-use-agents/SKILL.md +315 -0
  128. package/assets/.agent/skills/content-creator/SKILL.md +248 -0
  129. package/assets/.agent/skills/content-creator/assets/content_calendar_template.md +99 -0
  130. package/assets/.agent/skills/content-creator/references/brand_guidelines.md +199 -0
  131. package/assets/.agent/skills/content-creator/references/content_frameworks.md +534 -0
  132. package/assets/.agent/skills/content-creator/references/social_media_optimization.md +317 -0
  133. package/assets/.agent/skills/content-creator/scripts/__pycache__/brand_voice_analyzer.cpython-314.pyc +0 -0
  134. package/assets/.agent/skills/content-creator/scripts/__pycache__/seo_optimizer.cpython-314.pyc +0 -0
  135. package/assets/.agent/skills/content-creator/scripts/brand_voice_analyzer.py +185 -0
  136. package/assets/.agent/skills/content-creator/scripts/seo_optimizer.py +419 -0
  137. package/assets/.agent/skills/content-marketer/SKILL.md +170 -0
  138. package/assets/.agent/skills/context-compression/SKILL.md +266 -0
  139. package/assets/.agent/skills/context-degradation/SKILL.md +238 -0
  140. package/assets/.agent/skills/context-driven-development/SKILL.md +400 -0
  141. package/assets/.agent/skills/context-fundamentals/SKILL.md +192 -0
  142. package/assets/.agent/skills/context-manager/SKILL.md +26 -0
  143. package/assets/.agent/skills/context-manager/scripts/__pycache__/minify.cpython-314.pyc +0 -0
  144. package/assets/.agent/skills/context-manager/scripts/minify.py +82 -0
  145. package/assets/.agent/skills/context-optimization/SKILL.md +186 -0
  146. package/assets/.agent/skills/context-router/SKILL.md +42 -0
  147. package/assets/.agent/skills/context-router/scripts/__pycache__/context_router.cpython-314.pyc +0 -0
  148. package/assets/.agent/skills/context-router/scripts/context_router.py +185 -0
  149. package/assets/.agent/skills/context-window-management/SKILL.md +53 -0
  150. package/assets/.agent/skills/conversation-memory/SKILL.md +61 -0
  151. package/assets/.agent/skills/copywriting/SKILL.md +225 -0
  152. package/assets/.agent/skills/cost-optimization/SKILL.md +286 -0
  153. package/assets/.agent/skills/cqrs-implementation/SKILL.md +35 -0
  154. package/assets/.agent/skills/cqrs-implementation/resources/implementation-playbook.md +540 -0
  155. package/assets/.agent/skills/crewai/SKILL.md +243 -0
  156. package/assets/.agent/skills/daily-news-report/SKILL.md +356 -0
  157. package/assets/.agent/skills/daily-news-report/cache.json +41 -0
  158. package/assets/.agent/skills/daily-news-report/sources.json +183 -0
  159. package/assets/.agent/skills/data-engineer/SKILL.md +224 -0
  160. package/assets/.agent/skills/data-engineering-data-driven-feature/SKILL.md +182 -0
  161. package/assets/.agent/skills/data-engineering-data-pipeline/SKILL.md +201 -0
  162. package/assets/.agent/skills/data-quality-frameworks/SKILL.md +40 -0
  163. package/assets/.agent/skills/data-quality-frameworks/resources/implementation-playbook.md +573 -0
  164. package/assets/.agent/skills/data-scientist/SKILL.md +199 -0
  165. package/assets/.agent/skills/data-storytelling/SKILL.md +465 -0
  166. package/assets/.agent/skills/database-admin/SKILL.md +165 -0
  167. package/assets/.agent/skills/database-architect/SKILL.md +268 -0
  168. package/assets/.agent/skills/database-cloud-optimization-cost-optimize/SKILL.md +44 -0
  169. package/assets/.agent/skills/database-cloud-optimization-cost-optimize/resources/implementation-playbook.md +1441 -0
  170. package/assets/.agent/skills/database-design/SKILL.md +52 -0
  171. package/assets/.agent/skills/database-design/database-selection.md +43 -0
  172. package/assets/.agent/skills/database-design/indexing.md +39 -0
  173. package/assets/.agent/skills/database-design/migrations.md +48 -0
  174. package/assets/.agent/skills/database-design/optimization.md +36 -0
  175. package/assets/.agent/skills/database-design/orm-selection.md +30 -0
  176. package/assets/.agent/skills/database-design/schema-design.md +56 -0
  177. package/assets/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-314.pyc +0 -0
  178. package/assets/.agent/skills/database-design/scripts/schema_validator.py +172 -0
  179. package/assets/.agent/skills/database-migration/SKILL.md +436 -0
  180. package/assets/.agent/skills/database-migrations-migration-observability/SKILL.md +420 -0
  181. package/assets/.agent/skills/database-migrations-sql-migrations/SKILL.md +53 -0
  182. package/assets/.agent/skills/database-migrations-sql-migrations/resources/implementation-playbook.md +499 -0
  183. package/assets/.agent/skills/database-optimizer/SKILL.md +167 -0
  184. package/assets/.agent/skills/datadog-automation/SKILL.md +235 -0
  185. package/assets/.agent/skills/db-designer/SKILL.md +22 -0
  186. package/assets/.agent/skills/db-designer/data/schema_patterns.json +156 -0
  187. package/assets/.agent/skills/db-designer/scripts/__pycache__/sql_gen.cpython-314.pyc +0 -0
  188. package/assets/.agent/skills/db-designer/scripts/sql_gen.py +90 -0
  189. package/assets/.agent/skills/dbt-transformation-patterns/SKILL.md +34 -0
  190. package/assets/.agent/skills/dbt-transformation-patterns/resources/implementation-playbook.md +547 -0
  191. package/assets/.agent/skills/debugger/SKILL.md +49 -0
  192. package/assets/.agent/skills/debugging-strategies/SKILL.md +34 -0
  193. package/assets/.agent/skills/debugging-strategies/resources/implementation-playbook.md +511 -0
  194. package/assets/.agent/skills/deep-research/SKILL.md +114 -0
  195. package/assets/.agent/skills/deployment-engineer/SKILL.md +170 -0
  196. package/assets/.agent/skills/deployment-pipeline-design/SKILL.md +371 -0
  197. package/assets/.agent/skills/deployment-procedures/SKILL.md +241 -0
  198. package/assets/.agent/skills/diff-applier/SKILL.md +34 -0
  199. package/assets/.agent/skills/diff-applier/scripts/__pycache__/apply_patch.cpython-314.pyc +0 -0
  200. package/assets/.agent/skills/diff-applier/scripts/apply_patch.py +137 -0
  201. package/assets/.agent/skills/discord-automation/SKILL.md +187 -0
  202. package/assets/.agent/skills/distributed-debugging-debug-trace/SKILL.md +44 -0
  203. package/assets/.agent/skills/distributed-debugging-debug-trace/resources/implementation-playbook.md +1307 -0
  204. package/assets/.agent/skills/distributed-tracing/SKILL.md +450 -0
  205. package/assets/.agent/skills/doc-generator/SKILL.md +14 -0
  206. package/assets/.agent/skills/doc-generator/data/doc_templates.json +40 -0
  207. package/assets/.agent/skills/doc-generator/scripts/__pycache__/doc_gen.cpython-314.pyc +0 -0
  208. package/assets/.agent/skills/doc-generator/scripts/doc_gen.py +48 -0
  209. package/assets/.agent/skills/docker-expert/SKILL.md +409 -0
  210. package/assets/.agent/skills/docker-wizard/SKILL.md +14 -0
  211. package/assets/.agent/skills/docker-wizard/data/docker_templates.json +93 -0
  212. package/assets/.agent/skills/docker-wizard/scripts/__pycache__/docker_gen.cpython-314.pyc +0 -0
  213. package/assets/.agent/skills/docker-wizard/scripts/docker_gen.py +86 -0
  214. package/assets/.agent/skills/docs-architect/SKILL.md +98 -0
  215. package/assets/.agent/skills/e2e-testing-patterns/SKILL.md +41 -0
  216. package/assets/.agent/skills/e2e-testing-patterns/resources/implementation-playbook.md +531 -0
  217. package/assets/.agent/skills/email-sequence/SKILL.md +925 -0
  218. package/assets/.agent/skills/embedding-strategies/SKILL.md +491 -0
  219. package/assets/.agent/skills/employment-contract-templates/SKILL.md +39 -0
  220. package/assets/.agent/skills/employment-contract-templates/resources/implementation-playbook.md +493 -0
  221. package/assets/.agent/skills/env-manager/SKILL.md +33 -0
  222. package/assets/.agent/skills/env-manager/scripts/__pycache__/env_scanner.cpython-314.pyc +0 -0
  223. package/assets/.agent/skills/env-manager/scripts/env_scanner.py +181 -0
  224. package/assets/.agent/skills/error-detective/SKILL.md +53 -0
  225. package/assets/.agent/skills/error-diagnostics-error-analysis/SKILL.md +47 -0
  226. package/assets/.agent/skills/error-diagnostics-error-analysis/resources/implementation-playbook.md +1143 -0
  227. package/assets/.agent/skills/error-diagnostics-error-trace/SKILL.md +48 -0
  228. package/assets/.agent/skills/error-diagnostics-error-trace/resources/implementation-playbook.md +1371 -0
  229. package/assets/.agent/skills/error-handling-patterns/SKILL.md +35 -0
  230. package/assets/.agent/skills/error-handling-patterns/resources/implementation-playbook.md +635 -0
  231. package/assets/.agent/skills/ethical-hacking-methodology/SKILL.md +466 -0
  232. package/assets/.agent/skills/event-sourcing-architect/SKILL.md +58 -0
  233. package/assets/.agent/skills/event-store-design/SKILL.md +449 -0
  234. package/assets/.agent/skills/exa-search/SKILL.md +36 -0
  235. package/assets/.agent/skills/fastapi-pro/SKILL.md +192 -0
  236. package/assets/.agent/skills/fastapi-router-py/SKILL.md +52 -0
  237. package/assets/.agent/skills/fastapi-templates/SKILL.md +32 -0
  238. package/assets/.agent/skills/fastapi-templates/resources/implementation-playbook.md +566 -0
  239. package/assets/.agent/skills/free-tool-strategy/SKILL.md +576 -0
  240. package/assets/.agent/skills/freshdesk-automation/SKILL.md +219 -0
  241. package/assets/.agent/skills/frontend-developer/SKILL.md +171 -0
  242. package/assets/.agent/skills/gcp-cloud-run/SKILL.md +288 -0
  243. package/assets/.agent/skills/gemini-api-dev/SKILL.md +127 -0
  244. package/assets/.agent/skills/geo-fundamentals/SKILL.md +156 -0
  245. package/assets/.agent/skills/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-314.pyc +0 -0
  246. package/assets/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  247. package/assets/.agent/skills/git-advanced-workflows/SKILL.md +412 -0
  248. package/assets/.agent/skills/git-manager/SKILL.md +22 -0
  249. package/assets/.agent/skills/git-manager/data/git_conventions.json +84 -0
  250. package/assets/.agent/skills/git-manager/scripts/__pycache__/commit.cpython-314.pyc +0 -0
  251. package/assets/.agent/skills/git-manager/scripts/__pycache__/log.cpython-314.pyc +0 -0
  252. package/assets/.agent/skills/git-manager/scripts/commit.py +70 -0
  253. package/assets/.agent/skills/git-manager/scripts/log.py +29 -0
  254. package/assets/.agent/skills/github-actions-templates/SKILL.md +345 -0
  255. package/assets/.agent/skills/github-automation/SKILL.md +227 -0
  256. package/assets/.agent/skills/gitlab-ci-patterns/SKILL.md +283 -0
  257. package/assets/.agent/skills/gitops-workflow/SKILL.md +303 -0
  258. package/assets/.agent/skills/gitops-workflow/references/argocd-setup.md +134 -0
  259. package/assets/.agent/skills/gitops-workflow/references/sync-policies.md +131 -0
  260. package/assets/.agent/skills/gmail-automation/SKILL.md +270 -0
  261. package/assets/.agent/skills/google-calendar-automation/SKILL.md +176 -0
  262. package/assets/.agent/skills/google-drive-automation/SKILL.md +193 -0
  263. package/assets/.agent/skills/googlesheets-automation/SKILL.md +197 -0
  264. package/assets/.agent/skills/grafana-dashboards/SKILL.md +381 -0
  265. package/assets/.agent/skills/graphql/SKILL.md +68 -0
  266. package/assets/.agent/skills/graphql-architect/SKILL.md +182 -0
  267. package/assets/.agent/skills/helm-chart-scaffolding/SKILL.md +34 -0
  268. package/assets/.agent/skills/helm-chart-scaffolding/assets/Chart.yaml.template +42 -0
  269. package/assets/.agent/skills/helm-chart-scaffolding/assets/values.yaml.template +185 -0
  270. package/assets/.agent/skills/helm-chart-scaffolding/references/chart-structure.md +500 -0
  271. package/assets/.agent/skills/helm-chart-scaffolding/resources/implementation-playbook.md +543 -0
  272. package/assets/.agent/skills/helm-chart-scaffolding/scripts/validate-chart.sh +244 -0
  273. package/assets/.agent/skills/hr-pro/SKILL.md +126 -0
  274. package/assets/.agent/skills/hubspot-automation/SKILL.md +178 -0
  275. package/assets/.agent/skills/hubspot-integration/SKILL.md +42 -0
  276. package/assets/.agent/skills/hybrid-search-implementation/SKILL.md +32 -0
  277. package/assets/.agent/skills/hybrid-search-implementation/resources/implementation-playbook.md +567 -0
  278. package/assets/.agent/skills/incident-responder/SKILL.md +213 -0
  279. package/assets/.agent/skills/incident-response-incident-response/SKILL.md +168 -0
  280. package/assets/.agent/skills/incident-response-smart-fix/SKILL.md +29 -0
  281. package/assets/.agent/skills/incident-response-smart-fix/resources/implementation-playbook.md +838 -0
  282. package/assets/.agent/skills/incident-runbook-templates/SKILL.md +395 -0
  283. package/assets/.agent/skills/infinite-gratitude/SKILL.md +26 -0
  284. package/assets/.agent/skills/inngest/SKILL.md +55 -0
  285. package/assets/.agent/skills/instagram-automation/SKILL.md +192 -0
  286. package/assets/.agent/skills/intercom-automation/SKILL.md +248 -0
  287. package/assets/.agent/skills/javascript-mastery/SKILL.md +645 -0
  288. package/assets/.agent/skills/javascript-testing-patterns/SKILL.md +35 -0
  289. package/assets/.agent/skills/javascript-testing-patterns/resources/implementation-playbook.md +1024 -0
  290. package/assets/.agent/skills/jira-automation/SKILL.md +185 -0
  291. package/assets/.agent/skills/k8s-manifest-generator/SKILL.md +35 -0
  292. package/assets/.agent/skills/k8s-manifest-generator/assets/configmap-template.yaml +296 -0
  293. package/assets/.agent/skills/k8s-manifest-generator/assets/deployment-template.yaml +203 -0
  294. package/assets/.agent/skills/k8s-manifest-generator/assets/service-template.yaml +171 -0
  295. package/assets/.agent/skills/k8s-manifest-generator/references/deployment-spec.md +753 -0
  296. package/assets/.agent/skills/k8s-manifest-generator/references/service-spec.md +724 -0
  297. package/assets/.agent/skills/k8s-manifest-generator/resources/implementation-playbook.md +510 -0
  298. package/assets/.agent/skills/k8s-security-policies/SKILL.md +346 -0
  299. package/assets/.agent/skills/k8s-security-policies/assets/network-policy-template.yaml +177 -0
  300. package/assets/.agent/skills/k8s-security-policies/references/rbac-patterns.md +187 -0
  301. package/assets/.agent/skills/knowledge-guide/SKILL.md +34 -0
  302. package/assets/.agent/skills/knowledge-guide/scripts/__pycache__/note_taker.cpython-314.pyc +0 -0
  303. package/assets/.agent/skills/knowledge-guide/scripts/note_taker.py +50 -0
  304. package/assets/.agent/skills/kpi-dashboard-design/SKILL.md +440 -0
  305. package/assets/.agent/skills/kubernetes-architect/SKILL.md +170 -0
  306. package/assets/.agent/skills/langchain-architecture/SKILL.md +350 -0
  307. package/assets/.agent/skills/langfuse/SKILL.md +238 -0
  308. package/assets/.agent/skills/langgraph/SKILL.md +287 -0
  309. package/assets/.agent/skills/launch-strategy/SKILL.md +344 -0
  310. package/assets/.agent/skills/legal-advisor/SKILL.md +70 -0
  311. package/assets/.agent/skills/linkedin-automation/SKILL.md +175 -0
  312. package/assets/.agent/skills/linux-privilege-escalation/SKILL.md +504 -0
  313. package/assets/.agent/skills/llm-app-patterns/SKILL.md +760 -0
  314. package/assets/.agent/skills/llm-evaluation/SKILL.md +483 -0
  315. package/assets/.agent/skills/mailchimp-automation/SKILL.md +231 -0
  316. package/assets/.agent/skills/market-sizing-analysis/SKILL.md +425 -0
  317. package/assets/.agent/skills/market-sizing-analysis/examples/saas-market-sizing.md +349 -0
  318. package/assets/.agent/skills/market-sizing-analysis/references/data-sources.md +360 -0
  319. package/assets/.agent/skills/marketing-ideas/SKILL.md +221 -0
  320. package/assets/.agent/skills/marketing-psychology/SKILL.md +255 -0
  321. package/assets/.agent/skills/mcp-builder/LICENSE.txt +202 -0
  322. package/assets/.agent/skills/mcp-builder/SKILL.md +236 -0
  323. package/assets/.agent/skills/mcp-builder/reference/evaluation.md +602 -0
  324. package/assets/.agent/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  325. package/assets/.agent/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  326. package/assets/.agent/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  327. package/assets/.agent/skills/mcp-builder/scripts/__pycache__/connections.cpython-314.pyc +0 -0
  328. package/assets/.agent/skills/mcp-builder/scripts/__pycache__/evaluation.cpython-314.pyc +0 -0
  329. package/assets/.agent/skills/mcp-builder/scripts/connections.py +151 -0
  330. package/assets/.agent/skills/mcp-builder/scripts/evaluation.py +373 -0
  331. package/assets/.agent/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  332. package/assets/.agent/skills/mcp-builder/scripts/requirements.txt +2 -0
  333. package/assets/.agent/skills/mermaid-expert/SKILL.md +59 -0
  334. package/assets/.agent/skills/meta-thinker/SKILL.md +41 -0
  335. package/assets/.agent/skills/meta-thinker/data/brainstorm_frameworks.json +614 -0
  336. package/assets/.agent/skills/meta-thinker/data/feature_ideas.json +352 -0
  337. package/assets/.agent/skills/meta-thinker/data/industry_database.json +1693 -0
  338. package/assets/.agent/skills/meta-thinker/data/monetization_models.json +570 -0
  339. package/assets/.agent/skills/meta-thinker/data/platform_guide.json +361 -0
  340. package/assets/.agent/skills/meta-thinker/data/product_archetypes.json +998 -0
  341. package/assets/.agent/skills/meta-thinker/scripts/__pycache__/idea_engine.cpython-314.pyc +0 -0
  342. package/assets/.agent/skills/meta-thinker/scripts/idea_engine.py +246 -0
  343. package/assets/.agent/skills/metasploit-framework/SKILL.md +478 -0
  344. package/assets/.agent/skills/micro-saas-launcher/SKILL.md +212 -0
  345. package/assets/.agent/skills/monday-automation/SKILL.md +233 -0
  346. package/assets/.agent/skills/multi-agent-patterns/SKILL.md +262 -0
  347. package/assets/.agent/skills/n8n-code-python/SKILL.md +750 -0
  348. package/assets/.agent/skills/n8n-mcp-tools-expert/SKILL.md +654 -0
  349. package/assets/.agent/skills/n8n-node-configuration/SKILL.md +796 -0
  350. package/assets/.agent/skills/neon-postgres/SKILL.md +56 -0
  351. package/assets/.agent/skills/nestjs-expert/SKILL.md +552 -0
  352. package/assets/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
  353. package/assets/.agent/skills/nocobase-plugin-developer/SKILL.md +1289 -0
  354. package/assets/.agent/skills/nodejs-backend-patterns/SKILL.md +35 -0
  355. package/assets/.agent/skills/nodejs-backend-patterns/resources/implementation-playbook.md +1019 -0
  356. package/assets/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
  357. package/assets/.agent/skills/nosql-expert/SKILL.md +111 -0
  358. package/assets/.agent/skills/notion-automation/SKILL.md +215 -0
  359. package/assets/.agent/skills/observability-engineer/SKILL.md +237 -0
  360. package/assets/.agent/skills/observability-monitoring-monitor-setup/SKILL.md +48 -0
  361. package/assets/.agent/skills/observability-monitoring-monitor-setup/resources/implementation-playbook.md +505 -0
  362. package/assets/.agent/skills/observability-monitoring-slo-implement/SKILL.md +43 -0
  363. package/assets/.agent/skills/observability-monitoring-slo-implement/resources/implementation-playbook.md +1077 -0
  364. package/assets/.agent/skills/on-call-handoff-patterns/SKILL.md +453 -0
  365. package/assets/.agent/skills/onboarding-cro/SKILL.md +433 -0
  366. package/assets/.agent/skills/openapi-spec-generation/SKILL.md +33 -0
  367. package/assets/.agent/skills/openapi-spec-generation/resources/implementation-playbook.md +1027 -0
  368. package/assets/.agent/skills/page-cro/SKILL.md +343 -0
  369. package/assets/.agent/skills/paid-ads/SKILL.md +551 -0
  370. package/assets/.agent/skills/payment-integration/SKILL.md +77 -0
  371. package/assets/.agent/skills/paypal-integration/SKILL.md +479 -0
  372. package/assets/.agent/skills/paywall-upgrade-cro/SKILL.md +570 -0
  373. package/assets/.agent/skills/pentest-checklist/SKILL.md +334 -0
  374. package/assets/.agent/skills/pentest-commands/SKILL.md +438 -0
  375. package/assets/.agent/skills/pipedrive-automation/SKILL.md +224 -0
  376. package/assets/.agent/skills/plaid-fintech/SKILL.md +50 -0
  377. package/assets/.agent/skills/popup-cro/SKILL.md +346 -0
  378. package/assets/.agent/skills/postgresql/SKILL.md +230 -0
  379. package/assets/.agent/skills/postmortem-writing/SKILL.md +386 -0
  380. package/assets/.agent/skills/pricing-strategy/SKILL.md +356 -0
  381. package/assets/.agent/skills/prisma-expert/SKILL.md +355 -0
  382. package/assets/.agent/skills/product-manager-toolkit/SKILL.md +351 -0
  383. package/assets/.agent/skills/product-manager-toolkit/references/prd_templates.md +317 -0
  384. package/assets/.agent/skills/product-manager-toolkit/scripts/__pycache__/customer_interview_analyzer.cpython-314.pyc +0 -0
  385. package/assets/.agent/skills/product-manager-toolkit/scripts/__pycache__/rice_prioritizer.cpython-314.pyc +0 -0
  386. package/assets/.agent/skills/product-manager-toolkit/scripts/customer_interview_analyzer.py +441 -0
  387. package/assets/.agent/skills/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
  388. package/assets/.agent/skills/programmatic-seo/SKILL.md +351 -0
  389. package/assets/.agent/skills/project-scaffolder/SKILL.md +26 -0
  390. package/assets/.agent/skills/project-scaffolder/data/scaffold_templates.json +150 -0
  391. package/assets/.agent/skills/project-scaffolder/scripts/__pycache__/scaffold.cpython-314.pyc +0 -0
  392. package/assets/.agent/skills/project-scaffolder/scripts/scaffold.py +249 -0
  393. package/assets/.agent/skills/projection-patterns/SKILL.md +33 -0
  394. package/assets/.agent/skills/projection-patterns/resources/implementation-playbook.md +501 -0
  395. package/assets/.agent/skills/prometheus-configuration/SKILL.md +404 -0
  396. package/assets/.agent/skills/prompt-caching/SKILL.md +61 -0
  397. package/assets/.agent/skills/prompt-engineer/README.md +659 -0
  398. package/assets/.agent/skills/prompt-engineer/SKILL.md +252 -0
  399. package/assets/.agent/skills/prompt-engineering/SKILL.md +171 -0
  400. package/assets/.agent/skills/prompt-engineering-patterns/SKILL.md +213 -0
  401. package/assets/.agent/skills/prompt-engineering-patterns/assets/few-shot-examples.json +106 -0
  402. package/assets/.agent/skills/prompt-engineering-patterns/assets/prompt-template-library.md +246 -0
  403. package/assets/.agent/skills/prompt-engineering-patterns/references/chain-of-thought.md +399 -0
  404. package/assets/.agent/skills/prompt-engineering-patterns/references/few-shot-learning.md +369 -0
  405. package/assets/.agent/skills/prompt-engineering-patterns/references/prompt-optimization.md +414 -0
  406. package/assets/.agent/skills/prompt-engineering-patterns/references/prompt-templates.md +470 -0
  407. package/assets/.agent/skills/prompt-engineering-patterns/references/system-prompts.md +189 -0
  408. package/assets/.agent/skills/prompt-engineering-patterns/scripts/__pycache__/optimize-prompt.cpython-314.pyc +0 -0
  409. package/assets/.agent/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
  410. package/assets/.agent/skills/prompt-library/SKILL.md +322 -0
  411. package/assets/.agent/skills/rag-engineer/SKILL.md +90 -0
  412. package/assets/.agent/skills/rag-implementation/SKILL.md +421 -0
  413. package/assets/.agent/skills/react-patterns/SKILL.md +198 -0
  414. package/assets/.agent/skills/react-state-management/SKILL.md +441 -0
  415. package/assets/.agent/skills/react-ui-patterns/SKILL.md +289 -0
  416. package/assets/.agent/skills/readme-generator/SKILL.md +14 -0
  417. package/assets/.agent/skills/readme-generator/data/readme_templates.json +22 -0
  418. package/assets/.agent/skills/readme-generator/scripts/__pycache__/readme_gen.cpython-314.pyc +0 -0
  419. package/assets/.agent/skills/readme-generator/scripts/readme_gen.py +81 -0
  420. package/assets/.agent/skills/red-team-tactics/SKILL.md +199 -0
  421. package/assets/.agent/skills/red-team-tools/SKILL.md +310 -0
  422. package/assets/.agent/skills/reference-builder/SKILL.md +188 -0
  423. package/assets/.agent/skills/referral-program/SKILL.md +602 -0
  424. package/assets/.agent/skills/release-manager/SKILL.md +30 -0
  425. package/assets/.agent/skills/release-manager/scripts/__pycache__/release.cpython-314.pyc +0 -0
  426. package/assets/.agent/skills/release-manager/scripts/release.py +210 -0
  427. package/assets/.agent/skills/reliability-engineer/SKILL.md +30 -0
  428. package/assets/.agent/skills/reliability-engineer/data/reliability.json +57 -0
  429. package/assets/.agent/skills/reliability-engineer/scripts/__pycache__/sre.cpython-314.pyc +0 -0
  430. package/assets/.agent/skills/reliability-engineer/scripts/sre.py +94 -0
  431. package/assets/.agent/skills/saga-orchestration/SKILL.md +496 -0
  432. package/assets/.agent/skills/sales-automator/SKILL.md +55 -0
  433. package/assets/.agent/skills/salesforce-automation/SKILL.md +190 -0
  434. package/assets/.agent/skills/sast-configuration/SKILL.md +212 -0
  435. package/assets/.agent/skills/scanning-tools/SKILL.md +589 -0
  436. package/assets/.agent/skills/schema-markup/SKILL.md +360 -0
  437. package/assets/.agent/skills/search-specialist/SKILL.md +80 -0
  438. package/assets/.agent/skills/secrets-management/SKILL.md +364 -0
  439. package/assets/.agent/skills/security-auditor/SKILL.md +169 -0
  440. package/assets/.agent/skills/security-bluebook-builder/SKILL.md +22 -0
  441. package/assets/.agent/skills/security-requirement-extraction/SKILL.md +33 -0
  442. package/assets/.agent/skills/security-requirement-extraction/resources/implementation-playbook.md +676 -0
  443. package/assets/.agent/skills/security-scanner/SKILL.md +21 -0
  444. package/assets/.agent/skills/security-scanner/data/security_patterns.json +101 -0
  445. package/assets/.agent/skills/security-scanner/scripts/__pycache__/checklist_gen.cpython-314.pyc +0 -0
  446. package/assets/.agent/skills/security-scanner/scripts/__pycache__/vuln_scan.cpython-314.pyc +0 -0
  447. package/assets/.agent/skills/security-scanner/scripts/checklist_gen.py +49 -0
  448. package/assets/.agent/skills/security-scanner/scripts/vuln_scan.py +81 -0
  449. package/assets/.agent/skills/sendgrid-automation/SKILL.md +228 -0
  450. package/assets/.agent/skills/seo-audit/SKILL.md +487 -0
  451. package/assets/.agent/skills/seo-authority-builder/SKILL.md +136 -0
  452. package/assets/.agent/skills/seo-cannibalization-detector/SKILL.md +123 -0
  453. package/assets/.agent/skills/seo-content-auditor/SKILL.md +83 -0
  454. package/assets/.agent/skills/seo-content-planner/SKILL.md +108 -0
  455. package/assets/.agent/skills/seo-content-refresher/SKILL.md +118 -0
  456. package/assets/.agent/skills/seo-content-writer/SKILL.md +96 -0
  457. package/assets/.agent/skills/seo-fundamentals/SKILL.md +173 -0
  458. package/assets/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-314.pyc +0 -0
  459. package/assets/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  460. package/assets/.agent/skills/seo-keyword-strategist/SKILL.md +95 -0
  461. package/assets/.agent/skills/seo-meta-optimizer/SKILL.md +92 -0
  462. package/assets/.agent/skills/seo-snippet-hunter/SKILL.md +114 -0
  463. package/assets/.agent/skills/seo-structure-architect/SKILL.md +108 -0
  464. package/assets/.agent/skills/service-mesh-observability/SKILL.md +395 -0
  465. package/assets/.agent/skills/shodan-reconnaissance/SKILL.md +503 -0
  466. package/assets/.agent/skills/shopify-apps/SKILL.md +42 -0
  467. package/assets/.agent/skills/shopify-automation/SKILL.md +168 -0
  468. package/assets/.agent/skills/signup-flow-cro/SKILL.md +355 -0
  469. package/assets/.agent/skills/similarity-search-patterns/SKILL.md +33 -0
  470. package/assets/.agent/skills/similarity-search-patterns/resources/implementation-playbook.md +557 -0
  471. package/assets/.agent/skills/skill-creator/LICENSE.txt +202 -0
  472. package/assets/.agent/skills/skill-creator/README.md +270 -0
  473. package/assets/.agent/skills/skill-creator/SKILL.md +593 -0
  474. package/assets/.agent/skills/skill-creator/references/output-patterns.md +82 -0
  475. package/assets/.agent/skills/skill-creator/references/workflows.md +28 -0
  476. package/assets/.agent/skills/skill-creator/scripts/__pycache__/init_skill.cpython-314.pyc +0 -0
  477. package/assets/.agent/skills/skill-creator/scripts/__pycache__/package_skill.cpython-314.pyc +0 -0
  478. package/assets/.agent/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
  479. package/assets/.agent/skills/skill-creator/scripts/init_skill.py +303 -0
  480. package/assets/.agent/skills/skill-creator/scripts/package_skill.py +110 -0
  481. package/assets/.agent/skills/skill-creator/scripts/quick_validate.py +95 -0
  482. package/assets/.agent/skills/skill-developer/ADVANCED.md +197 -0
  483. package/assets/.agent/skills/skill-developer/HOOK_MECHANISMS.md +306 -0
  484. package/assets/.agent/skills/skill-developer/PATTERNS_LIBRARY.md +152 -0
  485. package/assets/.agent/skills/skill-developer/SKILL.md +426 -0
  486. package/assets/.agent/skills/skill-developer/SKILL_RULES_REFERENCE.md +315 -0
  487. package/assets/.agent/skills/skill-developer/TRIGGER_TYPES.md +305 -0
  488. package/assets/.agent/skills/skill-developer/TROUBLESHOOTING.md +514 -0
  489. package/assets/.agent/skills/slack-automation/SKILL.md +189 -0
  490. package/assets/.agent/skills/slo-implementation/SKILL.md +341 -0
  491. package/assets/.agent/skills/social-content/SKILL.md +807 -0
  492. package/assets/.agent/skills/spark-optimization/SKILL.md +427 -0
  493. package/assets/.agent/skills/sql-injection-testing/SKILL.md +448 -0
  494. package/assets/.agent/skills/sql-optimization-patterns/SKILL.md +35 -0
  495. package/assets/.agent/skills/sql-optimization-patterns/resources/implementation-playbook.md +504 -0
  496. package/assets/.agent/skills/sql-pro/SKILL.md +173 -0
  497. package/assets/.agent/skills/ssh-penetration-testing/SKILL.md +488 -0
  498. package/assets/.agent/skills/startup-analyst/SKILL.md +328 -0
  499. package/assets/.agent/skills/startup-business-analyst-business-case/SKILL.md +487 -0
  500. package/assets/.agent/skills/startup-business-analyst-financial-projections/SKILL.md +353 -0
  501. package/assets/.agent/skills/startup-business-analyst-market-opportunity/SKILL.md +240 -0
  502. package/assets/.agent/skills/startup-financial-modeling/SKILL.md +467 -0
  503. package/assets/.agent/skills/startup-metrics-framework/SKILL.md +34 -0
  504. package/assets/.agent/skills/startup-metrics-framework/resources/implementation-playbook.md +500 -0
  505. package/assets/.agent/skills/stride-analysis-patterns/SKILL.md +33 -0
  506. package/assets/.agent/skills/stride-analysis-patterns/resources/implementation-playbook.md +655 -0
  507. package/assets/.agent/skills/stripe-automation/SKILL.md +198 -0
  508. package/assets/.agent/skills/stripe-integration/SKILL.md +454 -0
  509. package/assets/.agent/skills/supabase-postgres-best-practices/AGENTS.md +1490 -0
  510. package/assets/.agent/skills/supabase-postgres-best-practices/README.md +119 -0
  511. package/assets/.agent/skills/supabase-postgres-best-practices/SKILL.md +57 -0
  512. package/assets/.agent/skills/supabase-postgres-best-practices/metadata.json +13 -0
  513. package/assets/.agent/skills/supabase-postgres-best-practices/rules/_contributing.md +171 -0
  514. package/assets/.agent/skills/supabase-postgres-best-practices/rules/_sections.md +39 -0
  515. package/assets/.agent/skills/supabase-postgres-best-practices/rules/_template.md +34 -0
  516. package/assets/.agent/skills/supabase-postgres-best-practices/rules/advanced-full-text-search.md +55 -0
  517. package/assets/.agent/skills/supabase-postgres-best-practices/rules/advanced-jsonb-indexing.md +49 -0
  518. package/assets/.agent/skills/supabase-postgres-best-practices/rules/conn-idle-timeout.md +46 -0
  519. package/assets/.agent/skills/supabase-postgres-best-practices/rules/conn-limits.md +44 -0
  520. package/assets/.agent/skills/supabase-postgres-best-practices/rules/conn-pooling.md +41 -0
  521. package/assets/.agent/skills/supabase-postgres-best-practices/rules/conn-prepared-statements.md +46 -0
  522. package/assets/.agent/skills/supabase-postgres-best-practices/rules/data-batch-inserts.md +54 -0
  523. package/assets/.agent/skills/supabase-postgres-best-practices/rules/data-n-plus-one.md +53 -0
  524. package/assets/.agent/skills/supabase-postgres-best-practices/rules/data-pagination.md +50 -0
  525. package/assets/.agent/skills/supabase-postgres-best-practices/rules/data-upsert.md +50 -0
  526. package/assets/.agent/skills/supabase-postgres-best-practices/rules/lock-advisory.md +56 -0
  527. package/assets/.agent/skills/supabase-postgres-best-practices/rules/lock-deadlock-prevention.md +68 -0
  528. package/assets/.agent/skills/supabase-postgres-best-practices/rules/lock-short-transactions.md +50 -0
  529. package/assets/.agent/skills/supabase-postgres-best-practices/rules/lock-skip-locked.md +54 -0
  530. package/assets/.agent/skills/supabase-postgres-best-practices/rules/monitor-explain-analyze.md +45 -0
  531. package/assets/.agent/skills/supabase-postgres-best-practices/rules/monitor-pg-stat-statements.md +55 -0
  532. package/assets/.agent/skills/supabase-postgres-best-practices/rules/monitor-vacuum-analyze.md +55 -0
  533. package/assets/.agent/skills/supabase-postgres-best-practices/rules/query-composite-indexes.md +44 -0
  534. package/assets/.agent/skills/supabase-postgres-best-practices/rules/query-covering-indexes.md +40 -0
  535. package/assets/.agent/skills/supabase-postgres-best-practices/rules/query-index-types.md +45 -0
  536. package/assets/.agent/skills/supabase-postgres-best-practices/rules/query-missing-indexes.md +43 -0
  537. package/assets/.agent/skills/supabase-postgres-best-practices/rules/query-partial-indexes.md +45 -0
  538. package/assets/.agent/skills/supabase-postgres-best-practices/rules/schema-data-types.md +46 -0
  539. package/assets/.agent/skills/supabase-postgres-best-practices/rules/schema-foreign-key-indexes.md +59 -0
  540. package/assets/.agent/skills/supabase-postgres-best-practices/rules/schema-lowercase-identifiers.md +55 -0
  541. package/assets/.agent/skills/supabase-postgres-best-practices/rules/schema-partitioning.md +55 -0
  542. package/assets/.agent/skills/supabase-postgres-best-practices/rules/schema-primary-keys.md +61 -0
  543. package/assets/.agent/skills/supabase-postgres-best-practices/rules/security-privileges.md +54 -0
  544. package/assets/.agent/skills/supabase-postgres-best-practices/rules/security-rls-basics.md +50 -0
  545. package/assets/.agent/skills/supabase-postgres-best-practices/rules/security-rls-performance.md +57 -0
  546. package/assets/.agent/skills/system-diagrammer/SKILL.md +25 -0
  547. package/assets/.agent/skills/system-diagrammer/data/diagram_templates.json +69 -0
  548. package/assets/.agent/skills/system-diagrammer/scripts/__pycache__/diagram.cpython-314.pyc +0 -0
  549. package/assets/.agent/skills/system-diagrammer/scripts/diagram.py +81 -0
  550. package/assets/.agent/skills/system-strategist/SKILL.md +35 -0
  551. package/assets/.agent/skills/system-strategist/data/strategy_patterns.json +170 -0
  552. package/assets/.agent/skills/system-strategist/scripts/__pycache__/strategist.cpython-314.pyc +0 -0
  553. package/assets/.agent/skills/system-strategist/scripts/strategist.py +136 -0
  554. package/assets/.agent/skills/tavily-web/SKILL.md +36 -0
  555. package/assets/.agent/skills/team-composition-analysis/SKILL.md +413 -0
  556. package/assets/.agent/skills/tech-stack-advisor/SKILL.md +59 -0
  557. package/assets/.agent/skills/tech-stack-advisor/data/stacks.json +727 -0
  558. package/assets/.agent/skills/tech-stack-advisor/data/tech_data.json +1297 -0
  559. package/assets/.agent/skills/tech-stack-advisor/scripts/__pycache__/advisor.cpython-314.pyc +0 -0
  560. package/assets/.agent/skills/tech-stack-advisor/scripts/__pycache__/scanner.cpython-314.pyc +0 -0
  561. package/assets/.agent/skills/tech-stack-advisor/scripts/advisor.py +211 -0
  562. package/assets/.agent/skills/tech-stack-advisor/scripts/scanner.py +102 -0
  563. package/assets/.agent/skills/terraform-module-library/SKILL.md +261 -0
  564. package/assets/.agent/skills/terraform-module-library/references/aws-modules.md +63 -0
  565. package/assets/.agent/skills/terraform-skill/SKILL.md +517 -0
  566. package/assets/.agent/skills/terraform-specialist/SKILL.md +166 -0
  567. package/assets/.agent/skills/test-generator/SKILL.md +14 -0
  568. package/assets/.agent/skills/test-generator/data/test_patterns.json +39 -0
  569. package/assets/.agent/skills/test-generator/scripts/__pycache__/gen_skeleton.cpython-314.pyc +0 -0
  570. package/assets/.agent/skills/test-generator/scripts/gen_skeleton.py +61 -0
  571. package/assets/.agent/skills/testing-patterns/SKILL.md +259 -0
  572. package/assets/.agent/skills/threat-mitigation-mapping/SKILL.md +33 -0
  573. package/assets/.agent/skills/threat-mitigation-mapping/resources/implementation-playbook.md +744 -0
  574. package/assets/.agent/skills/threat-modeling-expert/SKILL.md +60 -0
  575. package/assets/.agent/skills/tool-design/SKILL.md +318 -0
  576. package/assets/.agent/skills/top-web-vulnerabilities/SKILL.md +543 -0
  577. package/assets/.agent/skills/trello-automation/SKILL.md +181 -0
  578. package/assets/.agent/skills/trigger-dev/SKILL.md +67 -0
  579. package/assets/.agent/skills/tutorial-engineer/SKILL.md +139 -0
  580. package/assets/.agent/skills/twitter-automation/SKILL.md +231 -0
  581. package/assets/.agent/skills/typescript-pro/SKILL.md +55 -0
  582. package/assets/.agent/skills/ui-ux-pro-max/SKILL.md +30 -0
  583. package/assets/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  584. package/assets/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  585. package/assets/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
  586. package/assets/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  587. package/assets/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  588. package/assets/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  589. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  590. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  591. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  592. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  593. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  594. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  595. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  596. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  597. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  598. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  599. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  600. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  601. package/assets/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  602. package/assets/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
  603. package/assets/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  604. package/assets/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  605. package/assets/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  606. package/assets/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  607. package/assets/.agent/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
  608. package/assets/.agent/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
  609. package/assets/.agent/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
  610. package/assets/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
  611. package/assets/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1110 -0
  612. package/assets/.agent/skills/ui-ux-pro-max/scripts/search.py +162 -0
  613. package/assets/.agent/skills/using-neon/SKILL.md +84 -0
  614. package/assets/.agent/skills/vector-database-engineer/SKILL.md +60 -0
  615. package/assets/.agent/skills/vector-index-tuning/SKILL.md +42 -0
  616. package/assets/.agent/skills/vector-index-tuning/resources/implementation-playbook.md +507 -0
  617. package/assets/.agent/skills/vercel-deployment/SKILL.md +79 -0
  618. package/assets/.agent/skills/voice-agents/SKILL.md +68 -0
  619. package/assets/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
  620. package/assets/.agent/skills/vulnerability-scanner/checklists.md +121 -0
  621. package/assets/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-314.pyc +0 -0
  622. package/assets/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  623. package/assets/.agent/skills/whatsapp-automation/SKILL.md +214 -0
  624. package/assets/.agent/skills/wiki-architect/SKILL.md +60 -0
  625. package/assets/.agent/skills/wiki-onboarding/SKILL.md +77 -0
  626. package/assets/.agent/skills/wiki-page-writer/SKILL.md +65 -0
  627. package/assets/.agent/skills/wiki-researcher/SKILL.md +65 -0
  628. package/assets/.agent/skills/windows-privilege-escalation/SKILL.md +496 -0
  629. package/assets/.agent/skills/wireshark-analysis/SKILL.md +497 -0
  630. package/assets/.agent/skills/wordpress-penetration-testing/SKILL.md +485 -0
  631. package/assets/.agent/skills/workflow-automation/SKILL.md +68 -0
  632. package/assets/.agent/skills/xss-html-injection/SKILL.md +499 -0
  633. package/assets/.agent/skills/zapier-make-patterns/SKILL.md +67 -0
  634. package/assets/.agent/skills/zendesk-automation/SKILL.md +215 -0
  635. package/assets/.agent/workflows/ai-agent-builder.md +93 -0
  636. package/assets/.agent/workflows/api-graphql-dev.md +45 -0
  637. package/assets/.agent/workflows/architect.md +43 -0
  638. package/assets/.agent/workflows/backend-dev.md +43 -0
  639. package/assets/.agent/workflows/claude-code-dev.md +51 -0
  640. package/assets/.agent/workflows/cloud-deployer.md +422 -0
  641. package/assets/.agent/workflows/code-reviewer.md +62 -0
  642. package/assets/.agent/workflows/context-data-eng.md +58 -0
  643. package/assets/.agent/workflows/database-eng.md +60 -0
  644. package/assets/.agent/workflows/deep-researcher.md +175 -0
  645. package/assets/.agent/workflows/designer.md +36 -0
  646. package/assets/.agent/workflows/devops.md +37 -0
  647. package/assets/.agent/workflows/doc-writer.md +211 -0
  648. package/assets/.agent/workflows/frontend-dev.md +63 -0
  649. package/assets/.agent/workflows/fullstack-coder.md +141 -0
  650. package/assets/.agent/workflows/image-creator.md +186 -0
  651. package/assets/.agent/workflows/knowledge-guide.md +48 -0
  652. package/assets/.agent/workflows/leader.md +238 -0
  653. package/assets/.agent/workflows/meta-thinker.md +204 -0
  654. package/assets/.agent/workflows/mobile-dev.md +26 -0
  655. package/assets/.agent/workflows/n8n-automator.md +114 -0
  656. package/assets/.agent/workflows/nocobase-plugin-build.md +291 -0
  657. package/assets/.agent/workflows/nocobase-plugin-expert.md +250 -0
  658. package/assets/.agent/workflows/observability-eng.md +54 -0
  659. package/assets/.agent/workflows/planner.md +48 -0
  660. package/assets/.agent/workflows/prompt-engineer.md +303 -0
  661. package/assets/.agent/workflows/qa-engineer.md +65 -0
  662. package/assets/.agent/workflows/quality-guardian.md +126 -0
  663. package/assets/.agent/workflows/quickstart.md +107 -0
  664. package/assets/.agent/workflows/release-manager.md +56 -0
  665. package/assets/.agent/workflows/research-analyst.md +483 -0
  666. package/assets/.agent/workflows/researcher.md +98 -0
  667. package/assets/.agent/workflows/saas-connector.md +86 -0
  668. package/assets/.agent/workflows/security-auditor.md +82 -0
  669. package/assets/.agent/workflows/security-engineer.md +48 -0
  670. package/assets/.agent/workflows/seo-marketer.md +91 -0
  671. package/assets/.agent/workflows/seo-specialist.md +27 -0
  672. package/assets/.agent/workflows/solution-architect.md +164 -0
  673. package/assets/.agent/workflows/startup-advisor.md +94 -0
  674. package/assets/.agent/workflows/tech-writer.md +43 -0
  675. package/assets/ide-adapters/cline/architect.md +43 -0
  676. package/assets/ide-adapters/cline/backend-dev.md +43 -0
  677. package/assets/ide-adapters/cline/designer.md +36 -0
  678. package/assets/ide-adapters/cline/devops.md +37 -0
  679. package/assets/ide-adapters/cline/frontend-dev.md +63 -0
  680. package/assets/ide-adapters/cline/knowledge-guide.md +48 -0
  681. package/assets/ide-adapters/cline/leader.md +88 -0
  682. package/assets/ide-adapters/cline/meta-thinker.md +87 -0
  683. package/assets/ide-adapters/cline/mobile-dev.md +26 -0
  684. package/assets/ide-adapters/cline/planner.md +48 -0
  685. package/assets/ide-adapters/cline/qa-engineer.md +65 -0
  686. package/assets/ide-adapters/cline/security-engineer.md +48 -0
  687. package/assets/ide-adapters/cline/seo-specialist.md +27 -0
  688. package/assets/ide-adapters/cline/tech-writer.md +43 -0
  689. package/assets/ide-adapters/copilot/architect.instructions.md +43 -0
  690. package/assets/ide-adapters/copilot/backend-dev.instructions.md +43 -0
  691. package/assets/ide-adapters/copilot/designer.instructions.md +36 -0
  692. package/assets/ide-adapters/copilot/devops.instructions.md +37 -0
  693. package/assets/ide-adapters/copilot/frontend-dev.instructions.md +63 -0
  694. package/assets/ide-adapters/copilot/knowledge-guide.instructions.md +48 -0
  695. package/assets/ide-adapters/copilot/leader.instructions.md +88 -0
  696. package/assets/ide-adapters/copilot/meta-thinker.instructions.md +87 -0
  697. package/assets/ide-adapters/copilot/mobile-dev.instructions.md +26 -0
  698. package/assets/ide-adapters/copilot/planner.instructions.md +48 -0
  699. package/assets/ide-adapters/copilot/qa-engineer.instructions.md +65 -0
  700. package/assets/ide-adapters/copilot/security-engineer.instructions.md +48 -0
  701. package/assets/ide-adapters/copilot/seo-specialist.instructions.md +27 -0
  702. package/assets/ide-adapters/copilot/tech-writer.instructions.md +43 -0
  703. package/assets/ide-adapters/cursor/architect.mdc +44 -0
  704. package/assets/ide-adapters/cursor/backend-dev.mdc +44 -0
  705. package/assets/ide-adapters/cursor/designer.mdc +37 -0
  706. package/assets/ide-adapters/cursor/devops.mdc +38 -0
  707. package/assets/ide-adapters/cursor/frontend-dev.mdc +64 -0
  708. package/assets/ide-adapters/cursor/knowledge-guide.mdc +49 -0
  709. package/assets/ide-adapters/cursor/leader.mdc +89 -0
  710. package/assets/ide-adapters/cursor/meta-thinker.mdc +88 -0
  711. package/assets/ide-adapters/cursor/mobile-dev.mdc +27 -0
  712. package/assets/ide-adapters/cursor/planner.mdc +49 -0
  713. package/assets/ide-adapters/cursor/qa-engineer.mdc +66 -0
  714. package/assets/ide-adapters/cursor/security-engineer.mdc +49 -0
  715. package/assets/ide-adapters/cursor/seo-specialist.mdc +28 -0
  716. package/assets/ide-adapters/cursor/tech-writer.mdc +44 -0
  717. package/assets/ide-adapters/kilocode/architect.md +43 -0
  718. package/assets/ide-adapters/kilocode/backend-dev.md +43 -0
  719. package/assets/ide-adapters/kilocode/designer.md +36 -0
  720. package/assets/ide-adapters/kilocode/devops.md +37 -0
  721. package/assets/ide-adapters/kilocode/frontend-dev.md +63 -0
  722. package/assets/ide-adapters/kilocode/knowledge-guide.md +48 -0
  723. package/assets/ide-adapters/kilocode/leader.md +88 -0
  724. package/assets/ide-adapters/kilocode/meta-thinker.md +87 -0
  725. package/assets/ide-adapters/kilocode/mobile-dev.md +26 -0
  726. package/assets/ide-adapters/kilocode/planner.md +48 -0
  727. package/assets/ide-adapters/kilocode/qa-engineer.md +65 -0
  728. package/assets/ide-adapters/kilocode/security-engineer.md +48 -0
  729. package/assets/ide-adapters/kilocode/seo-specialist.md +27 -0
  730. package/assets/ide-adapters/kilocode/tech-writer.md +43 -0
  731. package/assets/ide-adapters/kiro/hooks/auto-lint.json +8 -0
  732. package/assets/ide-adapters/kiro/hooks/auto-test.json +8 -0
  733. package/assets/ide-adapters/kiro/specs/.gitkeep +0 -0
  734. package/assets/ide-adapters/kiro/steering/product.md +23 -0
  735. package/assets/ide-adapters/kiro/steering/structure.md +23 -0
  736. package/assets/ide-adapters/kiro/steering/tech.md +27 -0
  737. package/assets/ide-adapters/windsurf/architect.md +41 -0
  738. package/assets/ide-adapters/windsurf/backend-dev.md +41 -0
  739. package/assets/ide-adapters/windsurf/designer.md +34 -0
  740. package/assets/ide-adapters/windsurf/devops.md +35 -0
  741. package/assets/ide-adapters/windsurf/frontend-dev.md +61 -0
  742. package/assets/ide-adapters/windsurf/knowledge-guide.md +46 -0
  743. package/assets/ide-adapters/windsurf/leader.md +86 -0
  744. package/assets/ide-adapters/windsurf/meta-thinker.md +85 -0
  745. package/assets/ide-adapters/windsurf/mobile-dev.md +24 -0
  746. package/assets/ide-adapters/windsurf/planner.md +46 -0
  747. package/assets/ide-adapters/windsurf/qa-engineer.md +63 -0
  748. package/assets/ide-adapters/windsurf/security-engineer.md +46 -0
  749. package/assets/ide-adapters/windsurf/seo-specialist.md +25 -0
  750. package/assets/ide-adapters/windsurf/tech-writer.md +41 -0
  751. package/assets/skill_groups.json +574 -0
  752. package/bin/cli.js +101 -0
  753. package/lib/commands.js +133 -0
  754. package/lib/constants.js +76 -0
  755. package/lib/download.js +165 -0
  756. package/lib/init.js +294 -0
  757. package/package.json +45 -0
  758. package/scripts/build-assets.js +177 -0
@@ -0,0 +1,1289 @@
1
+ ---
2
+ name: nocobase-plugin-developer
3
+ description: Guide for creating, structuring, and implementing NocoBase plugins (Server & Client).
4
+ ---
5
+
6
+ # NocoBase Plugin Developer Skill
7
+
8
+ Expert guide for developing NocoBase plugins. Covers full-stack architecture, all plugin categories, core module integration, and real-world patterns from 89+ built-in plugins.
9
+
10
+ ---
11
+
12
+ ## 1. NocoBase Application Architecture
13
+
14
+ ```mermaid
15
+ graph TB
16
+ subgraph "Server (Node.js / Koa)"
17
+ APP["Application"]
18
+ PM["PluginManager"]
19
+ DB["Database (Sequelize)"]
20
+ RES["Resourcer (REST API)"]
21
+ ACL["ACL (Access Control)"]
22
+ DSM["DataSourceManager"]
23
+ CACHE["CacheManager"]
24
+ TEL["Telemetry"]
25
+ EQ["EventQueue"]
26
+ AI_S["AIManager"]
27
+ LOG["Logger"]
28
+ end
29
+ subgraph "Client (React)"
30
+ C_APP["Application"]
31
+ C_PM["PluginManager"]
32
+ C_ROUTER["RouterManager"]
33
+ C_PSM["PluginSettingsManager"]
34
+ C_SIM["SchemaInitializerManager"]
35
+ C_SSM["SchemaSettingsManager"]
36
+ C_FE["FlowEngine"]
37
+ C_DSM["DataSourceManager"]
38
+ C_AI["AIManager"]
39
+ C_API["APIClient"]
40
+ C_WS["WebSocketClient"]
41
+ end
42
+ APP --> PM
43
+ APP --> DB
44
+ APP --> RES
45
+ APP --> ACL
46
+ APP --> DSM
47
+ APP --> CACHE
48
+ APP --> TEL
49
+ APP --> EQ
50
+ APP --> AI_S
51
+ C_APP --> C_PM
52
+ C_APP --> C_ROUTER
53
+ C_APP --> C_PSM
54
+ C_APP --> C_SIM
55
+ C_APP --> C_SSM
56
+ C_APP --> C_FE
57
+ C_APP --> C_DSM
58
+ C_APP --> C_AI
59
+ C_APP --> C_API
60
+ C_APP --> C_WS
61
+ ```
62
+
63
+ ### Core Modules (packages/core/)
64
+
65
+ | Module | Path | Purpose |
66
+ |---|---|---|
67
+ | `@nocobase/server` | `core/server` | Koa app, Plugin base, PluginManager, Resourcer |
68
+ | `@nocobase/client` | `core/client` | React app, Plugin base, PluginManager, UI managers |
69
+ | `@nocobase/database` | `core/database` | Sequelize wrapper, Collection, Field, Repository |
70
+ | `@nocobase/utils` | `core/utils` | Shared utilities, Registry, uid, i18n |
71
+ | `@nocobase/acl` | `core/acl` | Access control list, role, permission |
72
+ | `@nocobase/cache` | `core/cache` | Cache manager (Redis/in-memory) |
73
+ | `@nocobase/logger` | `core/logger` | Winston-based logging |
74
+ | `@nocobase/data-source-manager` | `core/data-source-manager` | Multi data-source management |
75
+ | `@nocobase/flow-engine` | `core/flow-engine` | Model-based UI logic engine |
76
+
77
+ ---
78
+
79
+ ## 2. Plugin Categories & Patterns
80
+
81
+ NocoBase has 89+ plugins organized by category. Each follows specific architectural patterns.
82
+
83
+ ### Plugin Categories Map
84
+
85
+ | Category | Prefix | Pattern | Examples |
86
+ |---|---|---|---|
87
+ | **Field** | `plugin-field-*` | Register field type in `beforeLoad()` | formula, sequence, sort, m2m-array |
88
+ | **Block** | `plugin-block-*` | Register UI block component | iframe, markdown, grid-card, list, workbench |
89
+ | **Action** | `plugin-action-*` | Register action handler | export, import, bulk-edit, bulk-update, duplicate, print |
90
+ | **Workflow** | `plugin-workflow-*` | Extend workflow with triggers/instructions | request, delay, loop, parallel, manual, aggregate |
91
+ | **Data Source** | `plugin-data-source-*` | Manage collection schemas & sources | main, manager |
92
+ | **Notification** | `plugin-notification-*` | Register channel types | manager, email, in-app-message |
93
+ | **Auth** | `plugin-auth*` | Register auth providers | auth, auth-sms |
94
+ | **System** | `plugin-*` | Core functionality | acl, users, file-manager, error-handler, logger |
95
+ | **Collection** | `plugin-collection-*` | Extended collection types | sql, tree |
96
+ | **UI** | `plugin-ui-*` | UI schema management | schema-storage, templates |
97
+
98
+ ---
99
+
100
+ ## 3. Project Structure
101
+
102
+ ```
103
+ plugin-my-feature/
104
+ ├── package.json # peerDependencies for load ordering
105
+ ├── client.d.ts # Re-export: export * from './dist/client';
106
+ ├── client.js # Re-export: module.exports = require('./dist/client');
107
+ ├── server.d.ts # Re-export: export * from './dist/server';
108
+ ├── server.js # Re-export: module.exports = require('./dist/server');
109
+ ├── src/
110
+ │ ├── index.ts # Root: export * from './server'; export { default } from './server';
111
+ │ ├── locale/ # i18n: en-US.json, zh-CN.json
112
+ │ ├── client/
113
+ │ │ ├── index.tsx # Client plugin class
114
+ │ │ ├── components/ # React components
115
+ │ │ └── hooks/ # React hooks
116
+ │ └── server/
117
+ │ ├── index.ts # Server entry: exports default + namespace
118
+ │ ├── plugin.ts # Server plugin class
119
+ │ ├── collections/ # Auto-loaded collection definitions
120
+ │ ├── actions/ # Custom action handlers
121
+ │ ├── models/ # Custom Sequelize Model classes
122
+ │ ├── repositories/ # Custom Repository classes
123
+ │ └── migrations/ # Database migrations
124
+ ```
125
+
126
+ ### package.json Convention
127
+
128
+ ```json
129
+ {
130
+ "name": "@myorg/plugin-my-feature",
131
+ "version": "1.0.0",
132
+ "main": "./dist/server/index.js",
133
+ "peerDependencies": {
134
+ "@nocobase/client": "2.x",
135
+ "@nocobase/server": "2.x",
136
+ "@nocobase/database": "2.x",
137
+ "@nocobase/test": "2.x"
138
+ }
139
+ }
140
+ ```
141
+
142
+ > [!IMPORTANT]
143
+ > `peerDependencies` control **topological sort** during plugin loading. If Plugin B depends on Plugin A, add `"@nocobase/plugin-a": "2.x"` to Plugin B's `peerDependencies` so A loads first. This uses `@hapi/topo` for ordering.
144
+
145
+ ### Entry Points
146
+
147
+ ```typescript
148
+ // src/server/index.ts
149
+ // @ts-ignore
150
+ import { name } from '../../package.json';
151
+ export { default } from './plugin';
152
+ export const namespace = name;
153
+
154
+ // src/index.ts
155
+ export * from './server';
156
+ export { default } from './server';
157
+ ```
158
+
159
+ ---
160
+
161
+ ## 4. Server-Side Architecture
162
+
163
+ ### Plugin Base Class (from `@nocobase/server`)
164
+
165
+ #### Key Properties
166
+
167
+ | Property | Type | Purpose |
168
+ |---|---|---|
169
+ | `this.app` | `Application` | Koa application with all managers |
170
+ | `this.db` | `Database` | Sequelize ORM wrapper (1146 lines, 92 methods) |
171
+ | `this.pm` | `PluginManager` | Access other plugins via `this.pm.get()` |
172
+ | `this.log` | `Logger` | Plugin-scoped Winston logger |
173
+ | `this.name` | `string` | Plugin name |
174
+ | `this.ai` | `AIManager` | AI tool registration |
175
+ | `this.options` | `any` | Plugin configuration options |
176
+ | `this.enabled` | `boolean` | Whether plugin is enabled |
177
+ | `this.installed` | `boolean` | Whether plugin is installed |
178
+
179
+ #### Lifecycle Hooks (Execution Order)
180
+
181
+ ```mermaid
182
+ graph TD
183
+ A["afterAdd() — immediate after registration"] --> B["beforeLoad() — ALL plugins first"]
184
+ B --> C["loadCollections() — auto from /collections/"]
185
+ C --> D["loadAI() — auto from /ai/"]
186
+ D --> E["load() — main initialization"]
187
+ E --> F["install() — first install only"]
188
+ F --> G["afterEnable()"]
189
+ G --> H["upgrade() — on version change"]
190
+ ```
191
+
192
+ > [!NOTE]
193
+ > **Two-Pass Loading**: `PluginManager.load()` calls `beforeLoad()` on ALL plugins FIRST, then iterates again calling `loadCollections()` + `load()` on each. This guarantees global registration (models, operators, field types) runs before any plugin's `load()`.
194
+
195
+ #### Loading Order
196
+ 1. **Preset plugins** — from `@nocobase/preset-nocobase` `builtIn` array (55 plugins)
197
+ 2. **Database plugins** — from `applicationPlugins` table, sorted by `peerDependencies`
198
+
199
+ ---
200
+
201
+ ## 5. Plugin Patterns by Category (Real Examples)
202
+
203
+ ### 5.1 Field Plugin Pattern
204
+
205
+ Field plugins register custom field types in `beforeLoad()` using `db.registerFieldTypes()`.
206
+
207
+ **Real Example: `plugin-field-formula`** (43 lines)
208
+
209
+ ```typescript
210
+ import { Plugin } from '@nocobase/server';
211
+ import { resolve } from 'path';
212
+ import { FormulaField } from './formula-field';
213
+
214
+ export default class PluginFieldFormulaServer extends Plugin {
215
+ beforeLoad() {
216
+ // Register custom field type
217
+ this.db.registerFieldTypes({
218
+ formula: FormulaField,
219
+ });
220
+
221
+ // Register migrations
222
+ this.db.addMigrations({
223
+ namespace: this.name,
224
+ directory: resolve(__dirname, './migrations'),
225
+ context: { plugin: this },
226
+ });
227
+ }
228
+ }
229
+ ```
230
+
231
+ **Real Example: `plugin-field-sequence`** — Uses Registry for pattern types
232
+
233
+ ```typescript
234
+ import { Plugin } from '@nocobase/server';
235
+ import { Registry } from '@nocobase/utils';
236
+ import { SequenceField, Pattern } from './fields/sequence-field';
237
+
238
+ export default class PluginFieldSequenceServer extends Plugin {
239
+ patternTypes = new Registry<Pattern>();
240
+
241
+ async load() {
242
+ this.db.registerFieldTypes({ sequence: SequenceField });
243
+
244
+ await this.importCollections(path.resolve(__dirname, 'collections'));
245
+
246
+ // Listen to field lifecycle events
247
+ this.db.on('fields.beforeSave', async (field, { transaction }) => {
248
+ if (field.get('type') !== 'sequence') return;
249
+ // Auto-generate sequence keys...
250
+ });
251
+
252
+ this.db.on('fields.afterDestroy', async (field, { transaction }) => {
253
+ // Cleanup sequence data...
254
+ });
255
+ }
256
+ }
257
+ ```
258
+
259
+ > [!TIP]
260
+ > Field plugins that need database storage should use `this.importCollections()` and listen to `fields.beforeSave`/`fields.afterDestroy` events for setup/cleanup.
261
+
262
+ ---
263
+
264
+ ### 5.2 Action Plugin Pattern
265
+
266
+ Action plugins register handlers via `dataSourceManager.afterAddDataSource()` to work across ALL data sources.
267
+
268
+ **Real Example: `plugin-action-export`** (71 lines)
269
+
270
+ ```typescript
271
+ import { Plugin } from '@nocobase/server';
272
+ import { exportXlsx } from './actions';
273
+ import { Logger } from '@nocobase/logger';
274
+
275
+ export default class PluginActionExportServer extends Plugin {
276
+ logger: Logger;
277
+
278
+ beforeLoad() {
279
+ // Hook into afterInstall to modify roles
280
+ this.app.on('afterInstall', async () => {
281
+ const roles = await this.app.db.getRepository('roles').find({
282
+ filter: { name: ['admin'] },
283
+ });
284
+ for (const role of roles) {
285
+ await this.app.db.getRepository('roles').update({
286
+ filter: { name: role.name },
287
+ values: {
288
+ strategy: {
289
+ ...role.strategy,
290
+ actions: [...role.strategy.actions, 'export'],
291
+ },
292
+ },
293
+ });
294
+ }
295
+ });
296
+ }
297
+
298
+ async load() {
299
+ this.logger = this.getLogger();
300
+
301
+ // Register action handler for ALL data sources
302
+ this.app.dataSourceManager.afterAddDataSource((dataSource) => {
303
+ dataSource.resourceManager.registerActionHandler('export', exportXlsx.bind(this));
304
+ dataSource.acl.setAvailableAction('export', {
305
+ displayName: '{{t("Export")}}',
306
+ allowConfigureFields: true,
307
+ aliases: ['export', 'exportAttachments'],
308
+ });
309
+ });
310
+ }
311
+
312
+ getLogger(): Logger {
313
+ return this.createLogger({
314
+ dirname: 'action-export',
315
+ filename: '%DATE%.log',
316
+ });
317
+ }
318
+ }
319
+ ```
320
+
321
+ ---
322
+
323
+ ### 5.3 Workflow Plugin Pattern (Extension Architecture)
324
+
325
+ The workflow system uses a **Registry-based extension pattern** allowing other plugins to register custom triggers and instructions.
326
+
327
+ **Core: `plugin-workflow`** (561 lines) — Exposes extension APIs:
328
+
329
+ ```typescript
330
+ import { Plugin } from '@nocobase/server';
331
+ import { Registry } from '@nocobase/utils';
332
+ import Trigger from './triggers';
333
+ import { InstructionInterface } from './instructions';
334
+
335
+ export default class PluginWorkflowServer extends Plugin {
336
+ instructions: Registry<InstructionInterface> = new Registry();
337
+ triggers: Registry<Trigger> = new Registry();
338
+ functions: Registry<CustomFunction> = new Registry();
339
+
340
+ // Public API: Register a new trigger type
341
+ registerTrigger<T extends Trigger>(type: string, trigger: T | { new (p: Plugin): T }) {
342
+ if (typeof trigger === 'function') {
343
+ this.triggers.register(type, new trigger(this));
344
+ } else {
345
+ this.triggers.register(type, trigger);
346
+ }
347
+ }
348
+
349
+ // Public API: Register a new instruction type
350
+ registerInstruction(type: string, instruction: InstructionInterface | { new (p: Plugin): InstructionInterface }) {
351
+ if (typeof instruction === 'function') {
352
+ this.instructions.register(type, new instruction(this));
353
+ } else {
354
+ this.instructions.register(type, instruction);
355
+ }
356
+ }
357
+
358
+ async load() {
359
+ // Register built-in triggers
360
+ this.registerTrigger('collection', CollectionTrigger);
361
+ this.registerTrigger('schedule', ScheduleTrigger);
362
+
363
+ // Register built-in instructions
364
+ this.registerInstruction('calculation', CalculationInstruction);
365
+ this.registerInstruction('condition', ConditionInstruction);
366
+ this.registerInstruction('create', CreateInstruction);
367
+ this.registerInstruction('query', QueryInstruction);
368
+ this.registerInstruction('update', UpdateInstruction);
369
+ this.registerInstruction('destroy', DestroyInstruction);
370
+ // ... more built-in instructions
371
+
372
+ // ACL snippets
373
+ this.app.acl.registerSnippet({
374
+ name: `pm.${this.name}.workflows`,
375
+ actions: ['workflows:*', 'workflows.nodes:*', 'executions:list', /* ... */],
376
+ });
377
+
378
+ // Model event listeners
379
+ this.db.on('workflows.beforeSave', this.onBeforeSave);
380
+ this.db.on('workflows.afterCreate', this.onAfterCreate);
381
+
382
+ // App lifecycle hooks
383
+ this.app.on('afterStart', this.onAfterStart);
384
+ this.app.on('beforeStop', this.onBeforeStop);
385
+
386
+ // Event queue subscription (multi-instance)
387
+ this.app.eventQueue.subscribe(this.channelPendingExecution, {
388
+ idle: () => this.serving() && this.dispatcher.idle,
389
+ process: this.dispatcher.onQueueExecution,
390
+ });
391
+ }
392
+ }
393
+ ```
394
+
395
+ **Extension: `plugin-workflow-request`** — Implements a custom Instruction:
396
+
397
+ ```typescript
398
+ import { Processor, Instruction, JOB_STATUS, FlowNodeModel, IJob } from '@nocobase/plugin-workflow';
399
+
400
+ export default class extends Instruction {
401
+ // Run the instruction node
402
+ async run(node: FlowNodeModel, prevJob, processor: Processor) {
403
+ const config = processor.getParsedValue(node.config, node.id);
404
+ const { workflow } = processor.execution;
405
+ const sync = this.workflow.isWorkflowSync(workflow);
406
+
407
+ if (sync) {
408
+ const response = await request(config, this.workflow.app);
409
+ return { status: JOB_STATUS.RESOLVED, result: responseSuccess(response) };
410
+ }
411
+
412
+ // Async: save pending job, exit processor, await response
413
+ const { id } = processor.saveJob({
414
+ status: JOB_STATUS.PENDING,
415
+ nodeId: node.id,
416
+ nodeKey: node.key,
417
+ upstreamId: prevJob?.id ?? null,
418
+ });
419
+ await processor.exit();
420
+ // ... handle async response and resume
421
+ }
422
+
423
+ async resume(node: FlowNodeModel, job, processor: Processor) {
424
+ // Handle resumption from pending state
425
+ return job;
426
+ }
427
+
428
+ async test(config) {
429
+ // Test mode for debugging
430
+ const response = await request(config, this.workflow.app);
431
+ return { status: JOB_STATUS.RESOLVED, result: responseSuccess(response) };
432
+ }
433
+ }
434
+ ```
435
+
436
+ **Extension: `plugin-workflow-request` Plugin Entry** — Registration:
437
+
438
+ ```typescript
439
+ import { Plugin } from '@nocobase/server';
440
+ import WorkflowPlugin from '@nocobase/plugin-workflow';
441
+ import RequestInstruction from './RequestInstruction';
442
+
443
+ export default class extends Plugin {
444
+ async load() {
445
+ const workflowPlugin = this.pm.get(WorkflowPlugin) as WorkflowPlugin;
446
+ workflowPlugin.registerInstruction('request', RequestInstruction);
447
+ }
448
+ }
449
+ ```
450
+
451
+ ---
452
+
453
+ ### 5.4 Notification Plugin Pattern (Manager-Channel)
454
+
455
+ Uses a Manager class with pluggable Channel types.
456
+
457
+ **Core: `plugin-notification-manager`** (70 lines):
458
+
459
+ ```typescript
460
+ import { Plugin } from '@nocobase/server';
461
+ import NotificationManager from './manager';
462
+ import { RegisterServerTypeFnParams, SendOptions, SendUserOptions } from './types';
463
+
464
+ export class PluginNotificationManagerServer extends Plugin {
465
+ private manager: NotificationManager;
466
+
467
+ get channelTypes() { return this.manager.channelTypes; }
468
+
469
+ registerChannelType(params: RegisterServerTypeFnParams) {
470
+ this.manager.registerType(params);
471
+ }
472
+
473
+ async send(options: SendOptions) {
474
+ return this.manager.send(options);
475
+ }
476
+
477
+ async sendToUsers(options: SendUserOptions) {
478
+ return this.manager.sendToUsers(options);
479
+ }
480
+
481
+ async afterAdd() {
482
+ this.logger = this.createLogger({
483
+ dirname: 'notification-manager',
484
+ filename: '%DATE%.log',
485
+ transports: ['dailyRotateFile'],
486
+ });
487
+ this.manager = new NotificationManager({ plugin: this });
488
+ }
489
+
490
+ async beforeLoad() {
491
+ this.app.resourceManager.registerActionHandler('messages:send', async (ctx, next) => {
492
+ this.manager.send(ctx.action?.params?.values);
493
+ next();
494
+ });
495
+ this.app.acl.registerSnippet({
496
+ name: 'pm.notification.channels',
497
+ actions: ['notificationChannels:*'],
498
+ });
499
+ }
500
+ }
501
+ ```
502
+
503
+ **Extension: `plugin-notification-email`** — Minimal (35 lines):
504
+
505
+ ```typescript
506
+ import PluginNotificationManagerServer from '@nocobase/plugin-notification-manager';
507
+ import { Plugin } from '@nocobase/server';
508
+ import { MailNotificationChannel } from './mail-server';
509
+
510
+ export default class extends Plugin {
511
+ async load() {
512
+ const notificationServer = this.pm.get(PluginNotificationManagerServer);
513
+ notificationServer.registerChannelType({
514
+ type: 'email',
515
+ Channel: MailNotificationChannel,
516
+ });
517
+ }
518
+ }
519
+ ```
520
+
521
+ ---
522
+
523
+ ### 5.5 System Plugin Pattern — ACL (693 lines)
524
+
525
+ Heavy `beforeLoad()` with middleware, event listeners, and role management.
526
+
527
+ ```typescript
528
+ export default class PluginACLServer extends Plugin {
529
+ get acl() { return this.app.acl; }
530
+
531
+ async beforeLoad() {
532
+ // Register custom models
533
+ this.db.registerModels({ RoleResourceModel, RoleResourceActionModel });
534
+
535
+ // Register middleware
536
+ this.app.resourceManager.use(setCurrentRole, { tag: 'setCurrentRole', before: 'acl' });
537
+
538
+ // Listen to role/resource events (500+ lines of event handling)
539
+ this.db.on('roles.afterSave', async (model, { transaction }) => {
540
+ this.writeRoleToACL(model, { transaction });
541
+ });
542
+
543
+ this.db.on('rolesResourcesActions.afterUpdateWithAssociations', async (model, { transaction }) => {
544
+ this.writeActionToACL(model, transaction);
545
+ });
546
+
547
+ // Wildcard collection definition listener
548
+ this.db.on('afterDefineCollection', (collection) => {
549
+ // Set default ACL for new collections
550
+ });
551
+
552
+ // Handle multi-instance sync
553
+ this.app.on('afterStart', async () => {
554
+ await this.writeRolesToACL();
555
+ });
556
+ }
557
+
558
+ async install() {
559
+ // Seed default roles: root, admin, member, guest
560
+ const repo = this.db.getRepository('roles');
561
+ await repo.createMany({
562
+ records: [
563
+ { name: 'root', title: '{{t("Root")}}' },
564
+ { name: 'admin', title: '{{t("Admin")}}' },
565
+ { name: 'member', title: '{{t("Member")}}', default: true },
566
+ ],
567
+ });
568
+ }
569
+
570
+ // Multi-instance sync
571
+ async handleSyncMessage(message) {
572
+ if (message.type === 'updateRole') {
573
+ const role = await this.db.getRepository('roles').findOne({ filterByTk: message.roleName });
574
+ if (role) await this.writeRoleToACL(role);
575
+ }
576
+ }
577
+ }
578
+ ```
579
+
580
+ ---
581
+
582
+ ## 6. Client-Side Architecture
583
+
584
+ ### Client Plugin Base Class (from `@nocobase/client`)
585
+
586
+ #### Key Properties
587
+
588
+ | Property | Type | Purpose |
589
+ |---|---|---|
590
+ | `this.app` | `Application` | React application |
591
+ | `this.app.pluginSettingsManager` | `PluginSettingsManager` | Settings pages |
592
+ | `this.app.router` | `RouterManager` | React Router |
593
+ | `this.app.pm` | `PluginManager` | Access other plugins |
594
+ | `this.flowEngine` | `FlowEngine` | Register field/block/action models |
595
+ | `this.app.schemaInitializerManager` | `SchemaInitializerManager` | UI initializers |
596
+ | `this.app.schemaSettingsManager` | `SchemaSettingsManager` | UI settings |
597
+ | `this.app.dataSourceManager` | `DataSourceManager` | Data sources |
598
+ | `this.app.apiClient` | `APIClient` | HTTP API client |
599
+ | `this.app.ws` | `WebSocketClient` | Real-time communication |
600
+
601
+ #### Client Lifecycle
602
+
603
+ ```mermaid
604
+ graph LR
605
+ A["constructor"] --> B["afterAdd()"]
606
+ B --> C["beforeLoad() — ALL plugins"]
607
+ C --> D["load()"]
608
+ D --> E["event: plugin:name:loaded"]
609
+ ```
610
+
611
+ **Static** plugins are bundled at build time. **Remote** plugins are fetched from `pm:listEnabled` API and loaded via RequireJS.
612
+
613
+ ### Client Plugin: `plugin-users` (77 lines)
614
+
615
+ ```tsx
616
+ import { Plugin, lazy } from '@nocobase/client';
617
+ import { tval } from '@nocobase/utils/client';
618
+ import ACLPlugin from '@nocobase/plugin-acl/client';
619
+ import { ChangePassword } from './ChangePassword';
620
+ import { EditProfile } from './EditProfile';
621
+
622
+ const { UsersManagement } = lazy(() => import('./UsersManagement'), 'UsersManagement');
623
+ const { RoleUsersManager } = lazy(() => import('./RoleUsersManager'), 'RoleUsersManager');
624
+
625
+ export default class PluginUsersClient extends Plugin {
626
+ async load() {
627
+ // 1. Settings page group
628
+ this.app.pluginSettingsManager.add('users-permissions', {
629
+ title: tval('Users & Permissions', { ns: 'users' }),
630
+ isPinned: true,
631
+ sort: 200,
632
+ icon: 'TeamOutlined',
633
+ });
634
+
635
+ // 2. Settings sub-page
636
+ this.app.pluginSettingsManager.add('users-permissions.users', {
637
+ title: tval('Users'),
638
+ icon: 'UserOutlined',
639
+ Component: UsersManagement,
640
+ aclSnippet: 'pm.users',
641
+ });
642
+
643
+ // 3. Cross-plugin integration: Register with ACL plugin
644
+ const acl = this.app.pm.get(ACLPlugin);
645
+ acl.rolesManager.add('users', {
646
+ title: tval('Users'),
647
+ Component: RoleUsersManager,
648
+ });
649
+
650
+ // 4. User center items
651
+ this.app.addUserCenterSettingsItem({ name: 'editProfile', Component: EditProfile, sort: 50 });
652
+ this.app.addUserCenterSettingsItem({ name: 'changePassword', Component: ChangePassword, sort: 100 });
653
+ }
654
+ }
655
+ ```
656
+
657
+ > [!TIP]
658
+ > Use `lazy()` from `@nocobase/client` for code-splitting heavy components. This reduces initial bundle size.
659
+
660
+ ---
661
+
662
+ ## 7. Database API Reference
663
+
664
+ The `Database` class (`@nocobase/database`, 1146 lines) is the primary ORM wrapper.
665
+
666
+ ### Collection Management
667
+
668
+ | Method | Purpose |
669
+ |---|---|
670
+ | `db.collection(options)` | Define a new collection |
671
+ | `db.getCollection(name)` | Get existing collection |
672
+ | `db.hasCollection(name)` | Check if collection exists |
673
+ | `db.removeCollection(name)` | Remove collection |
674
+ | `db.import({ directory })` | Import collections from directory |
675
+ | `db.getModel(name)` | Get Sequelize Model class |
676
+
677
+ ### Repository (CRUD)
678
+
679
+ ```typescript
680
+ const repo = this.db.getRepository('myCollection');
681
+ // or
682
+ const repo = this.db.getCollection('myCollection').repository;
683
+
684
+ // Create
685
+ await repo.create({ values: { title: 'Hello' } });
686
+ await repo.createMany({ records: [{ title: 'A' }, { title: 'B' }] });
687
+
688
+ // Read
689
+ await repo.find({ filter: { title: 'Hello' }, sort: ['-createdAt'], limit: 10 });
690
+ await repo.findOne({ filter: { id: 1 } });
691
+ await repo.findOne({ filterByTk: 1 });
692
+ await repo.count({ filter: { status: 'active' } });
693
+
694
+ // Update
695
+ await repo.update({ filter: { id: 1 }, values: { title: 'Updated' } });
696
+
697
+ // Delete
698
+ await repo.destroy({ filter: { id: 1 } });
699
+ await repo.destroy({ filterByTk: 1 });
700
+ ```
701
+
702
+ ### Registration APIs
703
+
704
+ | Method | Used By | Purpose |
705
+ |---|---|---|
706
+ | `db.registerFieldTypes({})` | Field plugins | Register custom field classes |
707
+ | `db.registerModels({})` | System plugins | Register custom Model subclasses |
708
+ | `db.registerRepositories({})` | Workflow, data-source | Register custom Repository subclasses |
709
+ | `db.registerOperators({})` | System plugins | Register custom query operators |
710
+ | `db.registerFieldValueParsers({})` | Field plugins | Register value parsers |
711
+ | `db.addMigrations({})` | All plugins | Register DB migrations |
712
+
713
+ ### Event System
714
+
715
+ ```typescript
716
+ // Model-level events
717
+ db.on('myCollection.beforeCreate', async (model, options) => { /* ... */ });
718
+ db.on('myCollection.afterUpdate', async (model, options) => { /* ... */ });
719
+ db.on('myCollection.beforeDestroy', async (model, options) => { /* ... */ });
720
+
721
+ // Global events
722
+ db.on('beforeDefineCollection', (collection) => { /* ... */ });
723
+ db.on('afterDefineCollection', (collection) => { /* ... */ });
724
+
725
+ // Field events
726
+ db.on('fields.beforeSave', async (field, options) => { /* ... */ });
727
+ db.on('fields.afterDestroy', async (field, options) => { /* ... */ });
728
+ ```
729
+
730
+ ### Collection Definitions
731
+
732
+ ```typescript
733
+ // src/server/collections/my-records.ts
734
+ import { defineCollection } from '@nocobase/database';
735
+
736
+ export default defineCollection({
737
+ name: 'myRecords',
738
+ fields: [
739
+ { type: 'bigInt', name: 'id', primaryKey: true, autoIncrement: true },
740
+ { type: 'string', name: 'title', length: 255 },
741
+ { type: 'text', name: 'content' },
742
+ { type: 'boolean', name: 'enabled', defaultValue: true },
743
+ { type: 'json', name: 'options' },
744
+ { type: 'date', name: 'scheduledAt' },
745
+ { type: 'belongsTo', name: 'createdBy', target: 'users' },
746
+ { type: 'hasMany', name: 'items', target: 'myItems', foreignKey: 'recordId' },
747
+ { type: 'belongsToMany', name: 'tags', target: 'tags', through: 'recordsTags' },
748
+ ],
749
+ });
750
+ ```
751
+
752
+ ### Migrations
753
+
754
+ ```typescript
755
+ // src/server/migrations/20240101000000-add-status-field.ts
756
+ import { Migration } from '@nocobase/server';
757
+
758
+ export default class extends Migration {
759
+ on = 'afterSync'; // 'beforeLoad' | 'afterSync' | 'afterLoad'
760
+
761
+ async up() {
762
+ const collection = this.db.getCollection('myRecords');
763
+ if (!collection) return;
764
+
765
+ const tableExists = await this.db.collectionExistsInDb('myRecords');
766
+ if (!tableExists) return;
767
+
768
+ const field = collection.getField('status');
769
+ if (field) return;
770
+
771
+ await this.db.getRepository('fields').create({
772
+ values: {
773
+ name: 'status',
774
+ type: 'string',
775
+ collectionName: 'myRecords',
776
+ defaultValue: 'draft',
777
+ },
778
+ });
779
+ }
780
+ }
781
+ ```
782
+
783
+ ---
784
+
785
+ ## 8. Cross-Plugin Communication
786
+
787
+ ### Server-side
788
+
789
+ ```typescript
790
+ // Get plugin by class or name
791
+ const workflowPlugin = this.pm.get(PluginWorkflowServer) as PluginWorkflowServer;
792
+ const usersPlugin = this.pm.get('users');
793
+
794
+ // App events
795
+ this.app.on('afterStart', async () => { /* runs when app starts */ });
796
+ this.app.on('beforeStop', async () => { /* cleanup */ });
797
+ this.app.on('afterInstall', async () => { /* seed data after first install */ });
798
+ await this.app.emitAsync('myPlugin:customEvent', data);
799
+
800
+ // Multi-instance sync (Redis-backed)
801
+ await this.sendSyncMessage({ type: 'cache-clear', key: 'myKey' });
802
+ async handleSyncMessage(message) {
803
+ if (message.type === 'cache-clear') {
804
+ // Handle cross-instance cache invalidation
805
+ }
806
+ }
807
+
808
+ // WebSocket to client
809
+ this.app.emit('ws:sendToUser', {
810
+ userId: 1,
811
+ message: { type: 'notification', payload: { text: 'Hello' } },
812
+ });
813
+
814
+ // Event queue (for background processing)
815
+ this.app.eventQueue.subscribe('myChannel', {
816
+ idle: () => this.serving(),
817
+ process: this.handleEvent,
818
+ });
819
+ ```
820
+
821
+ ### Client-side
822
+
823
+ ```typescript
824
+ // Get plugin by class
825
+ const aclPlugin = this.app.pm.get(ACLPlugin);
826
+ aclPlugin.rolesManager.add('myResource', { title: tval('My Resource'), Component: MyManager });
827
+
828
+ // Get plugin by name
829
+ const otherPlugin = this.app.pm.get('other-plugin-name');
830
+
831
+ // Event bus
832
+ this.app.eventBus.dispatchEvent(new CustomEvent('myEvent', { detail: data }));
833
+ this.app.eventBus.addEventListener('myEvent', handler);
834
+ ```
835
+
836
+ ---
837
+
838
+ ## 9. ACL (Access Control)
839
+
840
+ ```typescript
841
+ // Server-side ACL registration
842
+ // Allow all logged-in users
843
+ this.app.acl.allow('myResource', 'list', 'loggedIn');
844
+ this.app.acl.allow('myResource', 'get', 'loggedIn');
845
+
846
+ // Admin-only via snippets
847
+ this.app.acl.registerSnippet({
848
+ name: `pm.${this.name}`,
849
+ actions: ['myResource:*'],
850
+ });
851
+
852
+ // Register available action for role configuration
853
+ this.app.acl.setAvailableAction('export', {
854
+ displayName: '{{t("Export")}}',
855
+ allowConfigureFields: true,
856
+ });
857
+
858
+ // DataSource-level ACL (for action plugins)
859
+ this.app.dataSourceManager.afterAddDataSource((dataSource) => {
860
+ dataSource.acl.setAvailableAction('myAction', { displayName: '{{t("My Action")}}' });
861
+ });
862
+ ```
863
+
864
+ ---
865
+
866
+ ## 10. Plugin Interconnection Map
867
+
868
+ ```mermaid
869
+ graph TB
870
+ subgraph "System Core"
871
+ ACL["plugin-acl"]
872
+ USERS["plugin-users"]
873
+ AUTH["plugin-auth"]
874
+ DSM["plugin-data-source-main"]
875
+ DSMgr["plugin-data-source-manager"]
876
+ FM["plugin-file-manager"]
877
+ ERR["plugin-error-handler"]
878
+ LOG["plugin-logger"]
879
+ end
880
+ subgraph "Workflow Engine"
881
+ WF["plugin-workflow"]
882
+ WF_REQ["workflow-request"]
883
+ WF_DELAY["workflow-delay"]
884
+ WF_LOOP["workflow-loop"]
885
+ WF_PARA["workflow-parallel"]
886
+ WF_MANUAL["workflow-manual"]
887
+ WF_SQL["workflow-sql"]
888
+ end
889
+ subgraph "Notifications"
890
+ NM["notification-manager"]
891
+ NE["notification-email"]
892
+ NIA["notification-in-app"]
893
+ end
894
+ subgraph "Field Extensions"
895
+ FF["field-formula"]
896
+ FS["field-sequence"]
897
+ FSO["field-sort"]
898
+ FMA["field-m2m-array"]
899
+ end
900
+ subgraph "Actions"
901
+ AE["action-export"]
902
+ AI["action-import"]
903
+ ABE["action-bulk-edit"]
904
+ end
905
+
906
+ USERS --> ACL
907
+ AUTH --> USERS
908
+ DSM --> DSMgr
909
+ WF_REQ --> WF
910
+ WF_DELAY --> WF
911
+ WF_LOOP --> WF
912
+ WF_PARA --> WF
913
+ WF_MANUAL --> WF
914
+ WF_SQL --> WF
915
+ WF_REQ --> FM
916
+ NE --> NM
917
+ NIA --> NM
918
+ AE --> DSMgr
919
+ AI --> DSMgr
920
+ ABE --> DSMgr
921
+ ```
922
+
923
+ ---
924
+
925
+ ## 11. Common Server APIs
926
+
927
+ | API | Purpose |
928
+ |---|---|
929
+ | `this.db.collection(opts)` | Define collection |
930
+ | `this.db.getCollection(name)` | Get collection |
931
+ | `this.db.getRepository(name)` | Get repository for CRUD |
932
+ | `this.db.registerFieldTypes({})` | Register field types |
933
+ | `this.db.registerModels({})` | Register custom models |
934
+ | `this.db.registerRepositories({})` | Register custom repositories |
935
+ | `this.db.registerOperators({})` | Register query operators |
936
+ | `this.db.addMigrations({})` | Add migrations |
937
+ | `this.db.on(event, handler)` | Listen to model events |
938
+ | `this.importCollections(dir)` | Import collection defs from dir |
939
+ | `this.app.resourceManager.registerActionHandler(name, fn)` | Register REST action |
940
+ | `this.app.resourceManager.use(middleware)` | Add Koa middleware |
941
+ | `this.app.dataSourceManager.afterAddDataSource(fn)` | Hook into data sources |
942
+ | `this.app.acl.allow(resource, action, strategy)` | Set ACL |
943
+ | `this.app.acl.registerSnippet({})` | Register ACL snippet |
944
+ | `this.app.on(event, handler)` | App lifecycle event |
945
+ | `this.app.emitAsync(event, ...args)` | Emit async event |
946
+ | `this.pm.get(PluginClass)` | Get other plugin |
947
+ | `this.createLogger(opts)` | Create plugin logger |
948
+ | `this.sendSyncMessage(msg)` | Multi-instance sync |
949
+ | `this.t(key)` | i18n translation |
950
+
951
+ ## 12. Common Client APIs
952
+
953
+ | API | Purpose |
954
+ |---|---|
955
+ | `this.app.pluginSettingsManager.add(name, config)` | Add settings page |
956
+ | `this.app.router.add(name, config)` | Add route |
957
+ | `this.app.addComponents({})` | Register global components |
958
+ | `this.app.addScopes({})` | Register global scopes |
959
+ | `this.app.addUserCenterSettingsItem(item)` | User center menu item |
960
+ | `this.flowEngine.registerModels({})` | Register FlowEngine models |
961
+ | `this.app.pm.get(PluginClass)` | Get other plugin |
962
+ | `lazy(() => import('./Component'), 'Component')` | Code-split component |
963
+
964
+ ---
965
+
966
+ ## 13. Build & Package
967
+
968
+ ```bash
969
+ # Development build (from project root)
970
+ yarn build @myorg/plugin-my-feature --no-dts
971
+
972
+ # Package for distribution
973
+ cd packages/plugins/@myorg/plugin-my-feature
974
+ npm pack
975
+ ```
976
+
977
+ ---
978
+
979
+ ## 14. builtIn vs External Plugins
980
+
981
+ | Aspect | builtIn (Preset) | External |
982
+ |---|---|---|
983
+ | Defined in | `@nocobase/preset-nocobase` `builtIn` array | `applicationPlugins` DB table |
984
+ | Loaded as | `isPreset: true, enabled: true` | From DB with `enabled: true` |
985
+ | Can disable? | No (always enabled) | Yes |
986
+ | Count | 55 (v2.0.1) | Unlimited |
987
+
988
+ ---
989
+
990
+ ## 15. FlowEngine Architecture (Client)
991
+
992
+ The FlowEngine is NocoBase's model-based UI logic system. It manages reactive models that drive UI rendering and behavior.
993
+
994
+ ```mermaid
995
+ graph TB
996
+ FE["FlowEngine (1277 lines)"]
997
+ FM["FlowModel (1677 lines)"]
998
+ FD["FlowDefinition"]
999
+ FS["FlowStep"]
1000
+ CFM["CollectionFieldModel"]
1001
+ DIM["DisplayItemModel"]
1002
+ EIM["EditableItemModel"]
1003
+ FIM["FilterableItemModel"]
1004
+
1005
+ FE --> FM
1006
+ FM --> FD
1007
+ FD --> FS
1008
+ FM --> CFM
1009
+ FM --> DIM
1010
+ FM --> EIM
1011
+ FM --> FIM
1012
+ ```
1013
+
1014
+ ### FlowEngine API
1015
+
1016
+ ```typescript
1017
+ // Register model classes (used by 16+ plugins)
1018
+ this.flowEngine.registerModels({ MyBlockModel, MyFieldModel });
1019
+
1020
+ // Register actions (callable from FlowModel instances)
1021
+ this.flowEngine.registerActions({
1022
+ 'myAction': {
1023
+ title: 'My Action',
1024
+ handler: async (model, params) => { /* ... */ },
1025
+ },
1026
+ });
1027
+
1028
+ // Register events
1029
+ this.flowEngine.registerEvents({
1030
+ 'myEvent': { title: 'My Event' },
1031
+ });
1032
+
1033
+ // Create model instance
1034
+ const model = this.flowEngine.createModel({
1035
+ use: 'MyBlockModel',
1036
+ uid: 'unique-id',
1037
+ });
1038
+
1039
+ // Get/remove models
1040
+ const existing = this.flowEngine.getModel('uid');
1041
+ this.flowEngine.removeModel('uid');
1042
+
1043
+ // Get subclasses of a base model
1044
+ const fieldModels = this.flowEngine.getSubclassesOf('CollectionFieldModel');
1045
+
1046
+ // Set model repository (for persistence)
1047
+ this.flowEngine.setModelRepository(new MyRepository());
1048
+
1049
+ // Data source dirty tracking (for refresh on navigation)
1050
+ this.flowEngine.markDataSourceDirty('main', 'users');
1051
+ ```
1052
+
1053
+ ### FlowModel Base Class
1054
+
1055
+ FlowModel is a reactive model with 1677 lines and 121 members. Key properties:
1056
+
1057
+ | Property | Purpose |
1058
+ |---|---|
1059
+ | `uid` | Unique identifier |
1060
+ | `props` | Component props (reactive) |
1061
+ | `stepParams` | Flow step parameters |
1062
+ | `flowEngine` | Reference to FlowEngine |
1063
+ | `hidden` | Whether model is hidden |
1064
+ | `sortIndex` | Sort order |
1065
+
1066
+ Key methods:
1067
+ - `render()` — React rendering function
1068
+ - `onInit(options)` — Post-construction initialization
1069
+ - `context()` — Get current context (dataSource, collection, etc.)
1070
+ - `resolveUse()` — Dynamic model class resolution
1071
+ - `actionRegistry` — Get model's action registry
1072
+ - `eventRegistry` — Get model's event registry
1073
+ - `on(event, listener)` — Listen to model events
1074
+ - `scheduleModelOperation()` — Execute when target model is ready
1075
+
1076
+ ### FlowDefinition & FlowStep
1077
+
1078
+ FlowDefinition defines a flow with steps. FlowStep defines individual actions within a flow.
1079
+
1080
+ ```typescript
1081
+ // FlowDefinition has: key, title, sort, steps, on, manual, defaultParams
1082
+ // FlowStep has: key, title, uiSchema, defaultParams, use, flowKey
1083
+
1084
+ // Add/remove steps
1085
+ flowDef.addStep('step1', { title: 'Step 1', use: 'myAction' });
1086
+ flowDef.removeStep('step1');
1087
+
1088
+ // Serialize for persistence
1089
+ const data = flowDef.serialize();
1090
+ await flowDef.save();
1091
+ ```
1092
+
1093
+ ---
1094
+
1095
+ ## 16. SchemaInitializer System
1096
+
1097
+ SchemaInitializerManager manages UI element initializers (the "+" buttons that add blocks, fields, actions).
1098
+
1099
+ ### SchemaInitializerManager API
1100
+
1101
+ | Method | Purpose |
1102
+ |---|---|
1103
+ | `add(initializer)` | Register a SchemaInitializer |
1104
+ | `addItem(name, itemName, data)` | Add item to existing initializer |
1105
+ | `get(name)` | Get initializer by name |
1106
+ | `remove(name)` | Remove initializer |
1107
+ | `removeItem(name, itemName)` | Remove item from initializer |
1108
+ | `has(name)` | Check if initializer exists |
1109
+
1110
+ ### Common Initializer Names
1111
+
1112
+ Used by 30+ plugins to inject UI elements:
1113
+
1114
+ | Initializer Name | Purpose |
1115
+ |---|---|
1116
+ | `page:addBlock` | Desktop page blocks |
1117
+ | `popup:common:addBlock` | Popup blocks |
1118
+ | `popup:addNew:addBlock` | "New" popup blocks |
1119
+ | `mobile:addBlock` | Mobile blocks |
1120
+ | `mobilePage:addBlock` | Mobile page blocks |
1121
+ | `table:configureActions` | Table action bar |
1122
+ | `gantt:configureActions` | Gantt action bar |
1123
+ | `details:configureActions` | Detail view actions |
1124
+ | `workbench:configureActions` | Workbench actions |
1125
+
1126
+ ### Client Plugin: Block Plugin (Real Example: `plugin-block-iframe`)
1127
+
1128
+ ```tsx
1129
+ import { Plugin } from '@nocobase/client';
1130
+ import { IframeBlockModel } from './models/IframeBlockModel';
1131
+ import { iframeBlockSchemaSettings } from './schemaSettings';
1132
+
1133
+ export default class PluginBlockIframeClient extends Plugin {
1134
+ async load() {
1135
+ // 1. Register schema settings
1136
+ this.app.schemaSettingsManager.add(iframeBlockSchemaSettings);
1137
+
1138
+ // 2. Register React provider
1139
+ this.app.use(IframeBlockProvider);
1140
+
1141
+ // 3. Add to initializers (multiple contexts)
1142
+ const blockInitializers = this.app.schemaInitializerManager.get('page:addBlock');
1143
+ blockInitializers?.add('otherBlocks.iframe', {
1144
+ title: '{{t("Iframe")}}',
1145
+ Component: 'IframeBlockInitializer',
1146
+ });
1147
+
1148
+ // Also add to popup, mobile, etc.
1149
+ this.app.schemaInitializerManager.addItem('mobile:addBlock', 'otherBlocks.iframe', {
1150
+ title: '{{t("Iframe")}}',
1151
+ Component: 'IframeBlockInitializer',
1152
+ });
1153
+
1154
+ // 4. Register FlowEngine model
1155
+ this.flowEngine.registerModels({ IframeBlockModel });
1156
+ }
1157
+ }
1158
+ ```
1159
+
1160
+ ### Client Plugin: Action Plugin (Real Example: `plugin-action-export` Client)
1161
+
1162
+ ```tsx
1163
+ import { Plugin, useCollection, useActionAvailable } from '@nocobase/client';
1164
+ import { ExportActionModel } from './models/ExportActionModel';
1165
+ import { exportActionSchemaSettings } from './schemaSettings';
1166
+
1167
+ export default class PluginActionExportClient extends Plugin {
1168
+ async load() {
1169
+ // 1. React provider
1170
+ this.app.use(ExportPluginProvider);
1171
+
1172
+ // 2. Initializer item with visibility control
1173
+ const initializerData = {
1174
+ title: "{{t('Export')}}",
1175
+ Component: 'ExportActionInitializer',
1176
+ schema: {
1177
+ 'x-align': 'right',
1178
+ 'x-decorator': 'ACLActionProvider',
1179
+ 'x-acl-action-props': { skipScopeCheck: true },
1180
+ },
1181
+ useVisible: () => useActionAvailable('export'),
1182
+ };
1183
+
1184
+ // 3. Add to multiple initializers
1185
+ const tableActions = this.app.schemaInitializerManager.get('table:configureActions');
1186
+ tableActions?.add('enableActions.export', initializerData);
1187
+ this.app.schemaInitializerManager.addItem('gantt:configureActions', 'enableActions.export', initializerData);
1188
+
1189
+ // 4. Schema settings & FlowEngine model
1190
+ this.app.schemaSettingsManager.add(exportActionSchemaSettings);
1191
+ this.app.flowEngine.registerModels({ ExportActionModel });
1192
+ }
1193
+ }
1194
+ ```
1195
+
1196
+ ---
1197
+
1198
+ ## 17. PluginSettingsManager
1199
+
1200
+ Manages the admin settings panel (`/admin/settings/*`).
1201
+
1202
+ ### API
1203
+
1204
+ ```typescript
1205
+ // Add top-level settings group
1206
+ this.app.pluginSettingsManager.add('my-plugin', {
1207
+ title: tval('My Plugin'),
1208
+ icon: 'SettingOutlined',
1209
+ isPinned: true, // Show in sidebar
1210
+ sort: 300, // Position order
1211
+ });
1212
+
1213
+ // Add sub-settings page
1214
+ this.app.pluginSettingsManager.add('my-plugin.config', {
1215
+ title: tval('Configuration'),
1216
+ Component: MyConfigPage, // React component
1217
+ aclSnippet: 'pm.my-plugin', // ACL permission name
1218
+ });
1219
+
1220
+ // Remove
1221
+ this.app.pluginSettingsManager.remove('my-plugin');
1222
+
1223
+ // Check existence
1224
+ this.app.pluginSettingsManager.has('my-plugin');
1225
+
1226
+ // Get list (for rendering)
1227
+ const list = this.app.pluginSettingsManager.getList();
1228
+ ```
1229
+
1230
+ > [!NOTE]
1231
+ > Settings pages are automatically routed to `/admin/settings/{name}`. Dot-separated names create nested routes (e.g., `'my-plugin.config'` → `/admin/settings/my-plugin/config`).
1232
+
1233
+ ---
1234
+
1235
+ ## 18. Complete Client Plugin Pattern
1236
+
1237
+ A full-featured client plugin typically follows this pattern in `load()`:
1238
+
1239
+ ```typescript
1240
+ import { Plugin, lazy } from '@nocobase/client';
1241
+
1242
+ const { MyManager } = lazy(() => import('./MyManager'), 'MyManager');
1243
+
1244
+ export default class PluginMyFeatureClient extends Plugin {
1245
+ async load() {
1246
+ // 1. Settings pages
1247
+ this.app.pluginSettingsManager.add('my-feature', {
1248
+ title: this.t('My Feature'),
1249
+ icon: 'AppstoreOutlined',
1250
+ Component: MyManager,
1251
+ aclSnippet: 'pm.my-feature',
1252
+ });
1253
+
1254
+ // 2. Schema settings (configure blocks/fields/actions)
1255
+ this.app.schemaSettingsManager.add(mySchemaSettings);
1256
+
1257
+ // 3. Schema initializers (add blocks/fields/actions to UI)
1258
+ this.app.schemaInitializerManager.addItem('page:addBlock', 'dataBlocks.myBlock', {
1259
+ title: '{{t("My Block")}}',
1260
+ Component: 'MyBlockInitializer',
1261
+ });
1262
+
1263
+ // 4. FlowEngine models
1264
+ this.flowEngine.registerModels({ MyBlockModel, MyFieldModel });
1265
+
1266
+ // 5. React providers (wraps app for context)
1267
+ this.app.use(MyFeatureProvider);
1268
+
1269
+ // 6. Cross-plugin integration
1270
+ const acl = this.app.pm.get(ACLPlugin);
1271
+ acl.rolesManager.add('my-feature', {
1272
+ title: this.t('My Feature'),
1273
+ Component: MyRoleManager,
1274
+ });
1275
+
1276
+ // 7. User center items
1277
+ this.app.addUserCenterSettingsItem({
1278
+ name: 'myFeature',
1279
+ Component: MyUserCenterItem,
1280
+ sort: 200,
1281
+ });
1282
+
1283
+ // 8. Custom routes
1284
+ this.app.router.add('my-feature.detail', {
1285
+ path: '/my-feature/:id',
1286
+ Component: MyDetailPage,
1287
+ });
1288
+ }
1289
+ }