@joktec/skills 0.1.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 (129) hide show
  1. package/AGENTS.md +89 -0
  2. package/LICENSE +21 -0
  3. package/README.md +502 -0
  4. package/adapters/README.md +12 -0
  5. package/adapters/copilot/README.md +5 -0
  6. package/adapters/cursor/README.md +5 -0
  7. package/adapters/gemini/README.md +5 -0
  8. package/adapters/windsurf/README.md +5 -0
  9. package/bin/joktec-skills.mjs +553 -0
  10. package/dist/claude/skills/joktec-adapter-skill/SKILL.md +26 -0
  11. package/dist/claude/skills/joktec-adapter-skill/agents/openai.yaml +4 -0
  12. package/dist/claude/skills/joktec-adapter-skill/references/adapters.md +12 -0
  13. package/dist/claude/skills/joktec-broker-skill/SKILL.md +26 -0
  14. package/dist/claude/skills/joktec-broker-skill/agents/openai.yaml +4 -0
  15. package/dist/claude/skills/joktec-broker-skill/references/brokers.md +12 -0
  16. package/dist/claude/skills/joktec-common-skill/SKILL.md +28 -0
  17. package/dist/claude/skills/joktec-common-skill/agents/openai.yaml +4 -0
  18. package/dist/claude/skills/joktec-common-skill/references/core.md +19 -0
  19. package/dist/claude/skills/joktec-common-skill/references/utils-cron.md +17 -0
  20. package/dist/claude/skills/joktec-database-extended-skill/SKILL.md +25 -0
  21. package/dist/claude/skills/joktec-database-extended-skill/agents/openai.yaml +4 -0
  22. package/dist/claude/skills/joktec-database-extended-skill/references/extended-databases.md +11 -0
  23. package/dist/claude/skills/joktec-framework-skill/SKILL.md +31 -0
  24. package/dist/claude/skills/joktec-framework-skill/agents/openai.yaml +4 -0
  25. package/dist/claude/skills/joktec-framework-skill/references/framework-map.md +25 -0
  26. package/dist/claude/skills/joktec-integration-skill/SKILL.md +24 -0
  27. package/dist/claude/skills/joktec-integration-skill/agents/openai.yaml +4 -0
  28. package/dist/claude/skills/joktec-integration-skill/references/integrations.md +9 -0
  29. package/dist/claude/skills/joktec-mongo-skill/SKILL.md +22 -0
  30. package/dist/claude/skills/joktec-mongo-skill/agents/openai.yaml +4 -0
  31. package/dist/claude/skills/joktec-mongo-skill/references/repository.md +20 -0
  32. package/dist/claude/skills/joktec-mongo-skill/references/schema-and-plugins.md +17 -0
  33. package/dist/claude/skills/joktec-mysql-skill/SKILL.md +22 -0
  34. package/dist/claude/skills/joktec-mysql-skill/agents/openai.yaml +4 -0
  35. package/dist/claude/skills/joktec-mysql-skill/references/entities.md +15 -0
  36. package/dist/claude/skills/joktec-mysql-skill/references/repository.md +23 -0
  37. package/dist/claude/skills/joktec-tool-skill/SKILL.md +25 -0
  38. package/dist/claude/skills/joktec-tool-skill/agents/openai.yaml +4 -0
  39. package/dist/claude/skills/joktec-tool-skill/references/tools.md +13 -0
  40. package/dist/codex/skills/joktec-adapter-skill/SKILL.md +26 -0
  41. package/dist/codex/skills/joktec-adapter-skill/agents/openai.yaml +4 -0
  42. package/dist/codex/skills/joktec-adapter-skill/references/adapters.md +12 -0
  43. package/dist/codex/skills/joktec-broker-skill/SKILL.md +26 -0
  44. package/dist/codex/skills/joktec-broker-skill/agents/openai.yaml +4 -0
  45. package/dist/codex/skills/joktec-broker-skill/references/brokers.md +12 -0
  46. package/dist/codex/skills/joktec-common-skill/SKILL.md +28 -0
  47. package/dist/codex/skills/joktec-common-skill/agents/openai.yaml +4 -0
  48. package/dist/codex/skills/joktec-common-skill/references/core.md +19 -0
  49. package/dist/codex/skills/joktec-common-skill/references/utils-cron.md +17 -0
  50. package/dist/codex/skills/joktec-database-extended-skill/SKILL.md +25 -0
  51. package/dist/codex/skills/joktec-database-extended-skill/agents/openai.yaml +4 -0
  52. package/dist/codex/skills/joktec-database-extended-skill/references/extended-databases.md +11 -0
  53. package/dist/codex/skills/joktec-framework-skill/SKILL.md +31 -0
  54. package/dist/codex/skills/joktec-framework-skill/agents/openai.yaml +4 -0
  55. package/dist/codex/skills/joktec-framework-skill/references/framework-map.md +25 -0
  56. package/dist/codex/skills/joktec-integration-skill/SKILL.md +24 -0
  57. package/dist/codex/skills/joktec-integration-skill/agents/openai.yaml +4 -0
  58. package/dist/codex/skills/joktec-integration-skill/references/integrations.md +9 -0
  59. package/dist/codex/skills/joktec-mongo-skill/SKILL.md +22 -0
  60. package/dist/codex/skills/joktec-mongo-skill/agents/openai.yaml +4 -0
  61. package/dist/codex/skills/joktec-mongo-skill/references/repository.md +20 -0
  62. package/dist/codex/skills/joktec-mongo-skill/references/schema-and-plugins.md +17 -0
  63. package/dist/codex/skills/joktec-mysql-skill/SKILL.md +22 -0
  64. package/dist/codex/skills/joktec-mysql-skill/agents/openai.yaml +4 -0
  65. package/dist/codex/skills/joktec-mysql-skill/references/entities.md +15 -0
  66. package/dist/codex/skills/joktec-mysql-skill/references/repository.md +23 -0
  67. package/dist/codex/skills/joktec-tool-skill/SKILL.md +25 -0
  68. package/dist/codex/skills/joktec-tool-skill/agents/openai.yaml +4 -0
  69. package/dist/codex/skills/joktec-tool-skill/references/tools.md +13 -0
  70. package/dist/copilot/.github/copilot-instructions.md +459 -0
  71. package/dist/cursor/.cursor/rules/joktec-adapter-skill.mdc +44 -0
  72. package/dist/cursor/.cursor/rules/joktec-broker-skill.mdc +44 -0
  73. package/dist/cursor/.cursor/rules/joktec-common-skill.mdc +73 -0
  74. package/dist/cursor/.cursor/rules/joktec-database-extended-skill.mdc +42 -0
  75. package/dist/cursor/.cursor/rules/joktec-framework-skill.mdc +62 -0
  76. package/dist/cursor/.cursor/rules/joktec-integration-skill.mdc +39 -0
  77. package/dist/cursor/.cursor/rules/joktec-mongo-skill.mdc +68 -0
  78. package/dist/cursor/.cursor/rules/joktec-mysql-skill.mdc +69 -0
  79. package/dist/cursor/.cursor/rules/joktec-tool-skill.mdc +44 -0
  80. package/dist/gemini/GEMINI.md +477 -0
  81. package/dist/windsurf/.windsurf/rules/joktec-adapter-skill.md +40 -0
  82. package/dist/windsurf/.windsurf/rules/joktec-broker-skill.md +40 -0
  83. package/dist/windsurf/.windsurf/rules/joktec-common-skill.md +69 -0
  84. package/dist/windsurf/.windsurf/rules/joktec-database-extended-skill.md +38 -0
  85. package/dist/windsurf/.windsurf/rules/joktec-framework-skill.md +58 -0
  86. package/dist/windsurf/.windsurf/rules/joktec-integration-skill.md +35 -0
  87. package/dist/windsurf/.windsurf/rules/joktec-mongo-skill.md +64 -0
  88. package/dist/windsurf/.windsurf/rules/joktec-mysql-skill.md +65 -0
  89. package/dist/windsurf/.windsurf/rules/joktec-tool-skill.md +40 -0
  90. package/package.json +69 -0
  91. package/scripts/build-copilot-instructions.mjs +22 -0
  92. package/scripts/build-cursor-rules.mjs +23 -0
  93. package/scripts/build-gemini-md.mjs +22 -0
  94. package/scripts/build-skill-folders.mjs +16 -0
  95. package/scripts/build-windsurf-rules.mjs +18 -0
  96. package/scripts/lib.mjs +110 -0
  97. package/scripts/sync-from-joktec-framework.mjs +53 -0
  98. package/scripts/validate-skills.mjs +78 -0
  99. package/skill-pack.json +146 -0
  100. package/skills/joktec-adapter-skill/SKILL.md +26 -0
  101. package/skills/joktec-adapter-skill/agents/openai.yaml +4 -0
  102. package/skills/joktec-adapter-skill/references/adapters.md +12 -0
  103. package/skills/joktec-broker-skill/SKILL.md +26 -0
  104. package/skills/joktec-broker-skill/agents/openai.yaml +4 -0
  105. package/skills/joktec-broker-skill/references/brokers.md +12 -0
  106. package/skills/joktec-common-skill/SKILL.md +28 -0
  107. package/skills/joktec-common-skill/agents/openai.yaml +4 -0
  108. package/skills/joktec-common-skill/references/core.md +19 -0
  109. package/skills/joktec-common-skill/references/utils-cron.md +17 -0
  110. package/skills/joktec-database-extended-skill/SKILL.md +25 -0
  111. package/skills/joktec-database-extended-skill/agents/openai.yaml +4 -0
  112. package/skills/joktec-database-extended-skill/references/extended-databases.md +11 -0
  113. package/skills/joktec-framework-skill/SKILL.md +31 -0
  114. package/skills/joktec-framework-skill/agents/openai.yaml +4 -0
  115. package/skills/joktec-framework-skill/references/framework-map.md +25 -0
  116. package/skills/joktec-integration-skill/SKILL.md +24 -0
  117. package/skills/joktec-integration-skill/agents/openai.yaml +4 -0
  118. package/skills/joktec-integration-skill/references/integrations.md +9 -0
  119. package/skills/joktec-mongo-skill/SKILL.md +22 -0
  120. package/skills/joktec-mongo-skill/agents/openai.yaml +4 -0
  121. package/skills/joktec-mongo-skill/references/repository.md +20 -0
  122. package/skills/joktec-mongo-skill/references/schema-and-plugins.md +17 -0
  123. package/skills/joktec-mysql-skill/SKILL.md +22 -0
  124. package/skills/joktec-mysql-skill/agents/openai.yaml +4 -0
  125. package/skills/joktec-mysql-skill/references/entities.md +15 -0
  126. package/skills/joktec-mysql-skill/references/repository.md +23 -0
  127. package/skills/joktec-tool-skill/SKILL.md +25 -0
  128. package/skills/joktec-tool-skill/agents/openai.yaml +4 -0
  129. package/skills/joktec-tool-skill/references/tools.md +13 -0
@@ -0,0 +1,62 @@
1
+ ---
2
+ description: Use when working in a consumer project that uses @joktec/* packages and the agent needs to choose the right JokTec package skill, understand package boundaries, wire modules, or avoid mixing app logic into reusable JokTec infrastructure.
3
+ globs: **/*
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # JokTec Framework Skill
8
+
9
+ Start here when a task mentions JokTec generally, multiple `@joktec/*` packages, or a consumer app that needs framework wiring.
10
+
11
+ ## Select The Focused Skill
12
+
13
+ - For `@joktec/core`, `@joktec/utils`, or `@joktec/cron`, use `joktec-common-skill`.
14
+ - For `@joktec/mongo`, use `joktec-mongo-skill`.
15
+ - For `@joktec/mysql`, use `joktec-mysql-skill`.
16
+ - For Kafka, RabbitMQ, SQS, or Redcast, use `joktec-broker-skill`.
17
+ - For cache, mail, notification, or storage adapters, use `joktec-adapter-skill`.
18
+ - For Elastic, Arango, or BigQuery, use `joktec-database-extended-skill`.
19
+ - For Firebase or GPT integrations, use `joktec-integration-skill`.
20
+ - For HTTP, file, or alert utilities, use `joktec-tool-skill`.
21
+
22
+ ## Core Rules
23
+
24
+ - Treat `joktec-framework` code, package README files, and agent docs as source-of-truth.
25
+ - Keep consumer app business logic in the app; do not move it into `@joktec/*` packages.
26
+ - Prefer config-driven module setup and `conId` when a package supports multiple clients.
27
+ - Preserve NestJS module boundaries, dependency injection, lifecycle hooks, and exported package APIs.
28
+ - Do not invent behavior for unfinished or missing packages.
29
+
30
+ ## Reference
31
+
32
+ Read `references/framework-map.md` when the task needs package selection, dependency flow, or a quick map from requirement to package.
33
+
34
+ ## Bundled References
35
+
36
+ ### references/framework-map.md
37
+
38
+ # JokTec Framework Map
39
+
40
+ ## Package Families
41
+
42
+ - `@joktec/core`: bootstrap, config, logger, metrics, guards, base abstractions, transports, pagination, Bull.
43
+ - `@joktec/utils`: low-level helpers, validators, conversion utilities.
44
+ - `@joktec/cron`: cron decorators, schedulers, job workers.
45
+ - `@joktec/mongo`: Mongoose/Typegoose database adapter and repository.
46
+ - `@joktec/mysql`: TypeORM relational adapter and repository.
47
+ - `@joktec/kafka`, `@joktec/rabbit`, `@joktec/sqs`, `@joktec/redcast`: broker clients and decorators.
48
+ - `@joktec/cacher`, `@joktec/mailer`, `@joktec/notifier`, `@joktec/storage`: external capability adapters.
49
+ - `@joktec/elastic`, `@joktec/arango`, `@joktec/bigquery`: extended database clients.
50
+ - `@joktec/firebase`, `@joktec/gpt`: third-party integrations.
51
+ - `@joktec/http`, `@joktec/file`, `@joktec/alert`: reusable tools.
52
+
53
+ ## Dependency Direction
54
+
55
+ Consumer apps depend on concrete `@joktec/*` packages. Concrete packages usually depend on `@joktec/core` and `@joktec/utils`. Keep app-specific schemas, handlers, and business semantics outside reusable packages.
56
+
57
+ ## Common Consumer App Pattern
58
+
59
+ 1. Register package modules in the app module or repository module.
60
+ 2. Keep app schemas/entities and app repositories in the consumer app.
61
+ 3. Extend the package repository base class when the package provides one.
62
+ 4. Use `BaseService`, `BaseController`, or transport helpers from `@joktec/core` when the app follows standard CRUD or message patterns.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Use when wiring or using JokTec integration packages @joktec/firebase or @joktec/gpt, including validated config, SDK client lifecycle, app-neutral integration services, credentials handling, and consumer app composition.
3
+ globs: packages/integrations/**
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # JokTec Integration Skill
8
+
9
+ Use this skill for third-party integration packages.
10
+
11
+ ## Packages
12
+
13
+ - `@joktec/firebase`: Firebase Admin SDK integration.
14
+ - `@joktec/gpt`: GPT/OpenAI-style client integration.
15
+
16
+ ## Rules
17
+
18
+ - Keep credentials config-driven and never commit real credentials.
19
+ - Use package services instead of direct SDK initialization in app code.
20
+ - Preserve app-neutral service behavior; consumer apps own domain workflows.
21
+ - Verify current package README/source before relying on advanced provider features.
22
+
23
+ ## Reference
24
+
25
+ Read `references/integrations.md` for provider-specific notes.
26
+
27
+ ## Bundled References
28
+
29
+ ### references/integrations.md
30
+
31
+ # Integration Usage
32
+
33
+ ## Firebase
34
+
35
+ Use the integration module and service to initialize Firebase Admin clients from validated config. Keep credential files local or environment-provided.
36
+
37
+ ## GPT
38
+
39
+ Use the integration package for reusable GPT client setup. Keep prompt/business policy in the consumer app, not in the generic package.
@@ -0,0 +1,68 @@
1
+ ---
2
+ description: Use when working with @joktec/mongo in a consumer app, including MongoModule setup, Typegoose schema decorators, MongoRepo, MongoService, MongoHelper, plugins, ObjectId/query safety, soft delete, strict references, and cursor pagination.
3
+ globs: packages/databases/mongo/**
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # JokTec Mongo Skill
8
+
9
+ Use this skill for MongoDB-backed resources that rely on JokTec's Mongoose/Typegoose wrapper.
10
+
11
+ ## Rules
12
+
13
+ - Register app schema classes through `MongoModule.forRoot(...)`.
14
+ - Keep schema classes, app repositories, and app-specific queries in the consumer app.
15
+ - Extend `MongoRepo<T, ID>` for app repositories.
16
+ - Preserve `conId` when the app has multiple Mongo connections.
17
+ - Use schema-first decorators when a schema class should be reused as a DTO source.
18
+ - Treat ObjectId casting and regex behavior as safety-sensitive.
19
+
20
+ ## References
21
+
22
+ - Read `references/repository.md` for `MongoService`, `MongoRepo`, query parsing, and cursor pagination.
23
+ - Read `references/schema-and-plugins.md` for decorators, paranoid soft delete, strict references, transform behavior, and debug output.
24
+
25
+ ## Bundled References
26
+
27
+ ### references/repository.md
28
+
29
+ # Mongo Repository Usage
30
+
31
+ ## Module Setup
32
+
33
+ Register schemas with `MongoModule.forRoot({ conId, models: [...] })`. Use the same `conId` in app repositories when using non-default connections.
34
+
35
+ ## Repository Pattern
36
+
37
+ Extend `MongoRepo` and pass the schema class to the base constructor. Services can then use `BaseService` from `@joktec/core`.
38
+
39
+ ## Query Safety
40
+
41
+ - Root `id` can act as an API alias for `_id` in query conditions.
42
+ - ObjectId casting should be schema-aware and limited to `_id`, ObjectId paths, or explicitly configured paths.
43
+ - `$like`, `$begin`, and `$end` escape regex input by default.
44
+ - Do not rely on broad conversion when storing raw snapshots, maps, or nested subdocuments.
45
+
46
+ ## Pagination
47
+
48
+ `MongoRepo.paginate` supports page, offset, and cursor responses. Cursor mode defaults to `_id`; custom `cursorKey` appends `_id` as a tie-breaker.
49
+
50
+ ### references/schema-and-plugins.md
51
+
52
+ # Mongo Schema And Plugins
53
+
54
+ ## Schema Decorators
55
+
56
+ Use `@Schema` and `@Prop` wrappers from `@joktec/mongo` for Typegoose schema metadata plus validation, transform, and Swagger metadata.
57
+
58
+ Avoid mutating shared option objects across multiple properties.
59
+
60
+ ## Plugins
61
+
62
+ - Paranoid plugin handles soft delete filtering and must respect aggregate first-stage constraints such as `$geoNear`.
63
+ - Strict reference plugin validates referenced documents and must resolve models through the active connection.
64
+ - Transform plugin centralizes common document transformation and should not break Mongo update operators.
65
+
66
+ ## Debug Output
67
+
68
+ Use `mongoDebug(collection, method, ...args)` when a Mongoose debug callback should be rendered as a Mongo shell-friendly command.
@@ -0,0 +1,69 @@
1
+ ---
2
+ description: Use when working with @joktec/mysql in a consumer app, including MysqlModule setup, TypeORM entities, schema-first @Column/@PrimaryColumn decorators, MysqlRepo, MysqlService, transactions, dialect support, uuidv7 ids, query safety, and cursor pagination.
3
+ globs: packages/databases/mysql/**
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # JokTec MySQL Skill
8
+
9
+ Use this skill for relational resources backed by JokTec's TypeORM wrapper.
10
+
11
+ ## Rules
12
+
13
+ - Register app entities through `MysqlModule.forRoot(...)`.
14
+ - Keep entities, app repositories, and app-specific SQL in the consumer app.
15
+ - Extend `MysqlRepo<T, ID>` for app repositories.
16
+ - Treat `mysql`, `mariadb`, and `postgres` as the first-class dialects.
17
+ - Keep `sync` explicit and normally enabled only by an owner process or development bootstrap.
18
+ - Do not add new behavior to deprecated `MysqlFinder`; use `MysqlRepo.qb()` and `MysqlHelper` paths.
19
+
20
+ ## References
21
+
22
+ - Read `references/repository.md` for connection lifecycle, repository usage, query safety, transaction, and cursor behavior.
23
+ - Read `references/entities.md` for `@Tables`, `@Column`, `@PrimaryColumn`, uuidv7, and dialect guidance.
24
+
25
+ ## Bundled References
26
+
27
+ ### references/entities.md
28
+
29
+ # MySQL Entity Decorators
30
+
31
+ ## Schema-First Entity Pattern
32
+
33
+ Use `@Tables`, `@Column`, and `@PrimaryColumn` from `@joktec/mysql` when an entity should also act as the source class for mapped DTOs.
34
+
35
+ ## Primary Keys
36
+
37
+ - Prefer numeric auto-increment keys for write-heavy MySQL tables.
38
+ - Use UUIDs when the app needs globally unique or public identifiers.
39
+ - Prefer `uuidv7` over random UUIDs when the id participates in ordered indexes or cursor-like access.
40
+
41
+ ## Dialects
42
+
43
+ The stable dialects are MySQL, MariaDB, and Postgres. Dialect capabilities own differences such as `LIKE` vs `ILIKE`, array support, fulltext support, and generated map reliability.
44
+
45
+ ### references/repository.md
46
+
47
+ # MySQL Repository Usage
48
+
49
+ ## Module Setup
50
+
51
+ Register entities with `MysqlModule.forRoot({ conId, models: [...] })`. Use `conId` for multiple DataSources.
52
+
53
+ ## Repository Pattern
54
+
55
+ Extend `MysqlRepo` and pass the entity class to the base constructor. Services can use `BaseService` when CRUD behavior follows the shared contract.
56
+
57
+ ## Query Safety
58
+
59
+ - Validate field paths against TypeORM metadata before interpolating SQL identifiers.
60
+ - Use parameter binding for values.
61
+ - Keep logical operators such as `$and` and `$or` grouped through QueryBuilder behavior.
62
+
63
+ ## Pagination
64
+
65
+ `MysqlRepo.paginate` supports page, offset, and cursor responses. Cursor mode defaults to `createdAt` plus primary key columns. Custom cursor keys must be mapped columns.
66
+
67
+ ## Transactions
68
+
69
+ When using transaction-scoped operations, pass the manager or query runner through repository options so pre-read and write operations use the same context.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Use when wiring or using JokTec tool packages @joktec/http, @joktec/file, or @joktec/alert, including Axios-backed HTTP clients, file classification helpers, Slack-compatible alert webhooks, config-driven lifecycle, and app-neutral utility services.
3
+ globs: packages/tools/**
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # JokTec Tool Skill
8
+
9
+ Use this skill for reusable utility services.
10
+
11
+ ## Packages
12
+
13
+ - `@joktec/http`: Axios-backed HTTP client wrapper.
14
+ - `@joktec/file`: file classification and local file helpers.
15
+ - `@joktec/alert`: alert delivery through Slack-compatible webhooks.
16
+
17
+ ## Rules
18
+
19
+ - Keep tools app-neutral and reusable.
20
+ - Use config-driven clients instead of direct ad hoc setup in app code.
21
+ - Preserve retry, metrics, proxy, and upload behavior where the package exposes it.
22
+ - Keep alert tokens and webhook URLs in runtime config only.
23
+
24
+ ## Reference
25
+
26
+ Read `references/tools.md` for package-specific usage notes.
27
+
28
+ ## Bundled References
29
+
30
+ ### references/tools.md
31
+
32
+ # Tool Usage
33
+
34
+ ## HTTP
35
+
36
+ Use `@joktec/http` for Axios-backed requests, uploads, proxy agent support, retry config, and metrics where exposed.
37
+
38
+ ## File
39
+
40
+ Use `@joktec/file` for shared file helpers and classification behavior instead of duplicating local utility code.
41
+
42
+ ## Alert
43
+
44
+ Use `@joktec/alert` for Slack-compatible webhook alerts. Keep webhook URLs and credentials out of source control.