@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,25 @@
1
+ # JokTec Framework Map
2
+
3
+ ## Package Families
4
+
5
+ - `@joktec/core`: bootstrap, config, logger, metrics, guards, base abstractions, transports, pagination, Bull.
6
+ - `@joktec/utils`: low-level helpers, validators, conversion utilities.
7
+ - `@joktec/cron`: cron decorators, schedulers, job workers.
8
+ - `@joktec/mongo`: Mongoose/Typegoose database adapter and repository.
9
+ - `@joktec/mysql`: TypeORM relational adapter and repository.
10
+ - `@joktec/kafka`, `@joktec/rabbit`, `@joktec/sqs`, `@joktec/redcast`: broker clients and decorators.
11
+ - `@joktec/cacher`, `@joktec/mailer`, `@joktec/notifier`, `@joktec/storage`: external capability adapters.
12
+ - `@joktec/elastic`, `@joktec/arango`, `@joktec/bigquery`: extended database clients.
13
+ - `@joktec/firebase`, `@joktec/gpt`: third-party integrations.
14
+ - `@joktec/http`, `@joktec/file`, `@joktec/alert`: reusable tools.
15
+
16
+ ## Dependency Direction
17
+
18
+ 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.
19
+
20
+ ## Common Consumer App Pattern
21
+
22
+ 1. Register package modules in the app module or repository module.
23
+ 2. Keep app schemas/entities and app repositories in the consumer app.
24
+ 3. Extend the package repository base class when the package provides one.
25
+ 4. Use `BaseService`, `BaseController`, or transport helpers from `@joktec/core` when the app follows standard CRUD or message patterns.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: joktec-integration-skill
3
+ 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.
4
+ ---
5
+
6
+ # JokTec Integration Skill
7
+
8
+ Use this skill for third-party integration packages.
9
+
10
+ ## Packages
11
+
12
+ - `@joktec/firebase`: Firebase Admin SDK integration.
13
+ - `@joktec/gpt`: GPT/OpenAI-style client integration.
14
+
15
+ ## Rules
16
+
17
+ - Keep credentials config-driven and never commit real credentials.
18
+ - Use package services instead of direct SDK initialization in app code.
19
+ - Preserve app-neutral service behavior; consumer apps own domain workflows.
20
+ - Verify current package README/source before relying on advanced provider features.
21
+
22
+ ## Reference
23
+
24
+ Read `references/integrations.md` for provider-specific notes.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "JokTec Integrations"
3
+ short_description: "Use JokTec integration packages"
4
+ default_prompt: "Use $joktec-integration-skill when wiring JokTec Firebase or GPT integrations."
@@ -0,0 +1,9 @@
1
+ # Integration Usage
2
+
3
+ ## Firebase
4
+
5
+ Use the integration module and service to initialize Firebase Admin clients from validated config. Keep credential files local or environment-provided.
6
+
7
+ ## GPT
8
+
9
+ 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,22 @@
1
+ ---
2
+ name: joktec-mongo-skill
3
+ 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.
4
+ ---
5
+
6
+ # JokTec Mongo Skill
7
+
8
+ Use this skill for MongoDB-backed resources that rely on JokTec's Mongoose/Typegoose wrapper.
9
+
10
+ ## Rules
11
+
12
+ - Register app schema classes through `MongoModule.forRoot(...)`.
13
+ - Keep schema classes, app repositories, and app-specific queries in the consumer app.
14
+ - Extend `MongoRepo<T, ID>` for app repositories.
15
+ - Preserve `conId` when the app has multiple Mongo connections.
16
+ - Use schema-first decorators when a schema class should be reused as a DTO source.
17
+ - Treat ObjectId casting and regex behavior as safety-sensitive.
18
+
19
+ ## References
20
+
21
+ - Read `references/repository.md` for `MongoService`, `MongoRepo`, query parsing, and cursor pagination.
22
+ - Read `references/schema-and-plugins.md` for decorators, paranoid soft delete, strict references, transform behavior, and debug output.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "JokTec Mongo"
3
+ short_description: "Use JokTec MongoDB package safely"
4
+ default_prompt: "Use $joktec-mongo-skill when implementing a Mongo-backed JokTec resource."
@@ -0,0 +1,20 @@
1
+ # Mongo Repository Usage
2
+
3
+ ## Module Setup
4
+
5
+ Register schemas with `MongoModule.forRoot({ conId, models: [...] })`. Use the same `conId` in app repositories when using non-default connections.
6
+
7
+ ## Repository Pattern
8
+
9
+ Extend `MongoRepo` and pass the schema class to the base constructor. Services can then use `BaseService` from `@joktec/core`.
10
+
11
+ ## Query Safety
12
+
13
+ - Root `id` can act as an API alias for `_id` in query conditions.
14
+ - ObjectId casting should be schema-aware and limited to `_id`, ObjectId paths, or explicitly configured paths.
15
+ - `$like`, `$begin`, and `$end` escape regex input by default.
16
+ - Do not rely on broad conversion when storing raw snapshots, maps, or nested subdocuments.
17
+
18
+ ## Pagination
19
+
20
+ `MongoRepo.paginate` supports page, offset, and cursor responses. Cursor mode defaults to `_id`; custom `cursorKey` appends `_id` as a tie-breaker.
@@ -0,0 +1,17 @@
1
+ # Mongo Schema And Plugins
2
+
3
+ ## Schema Decorators
4
+
5
+ Use `@Schema` and `@Prop` wrappers from `@joktec/mongo` for Typegoose schema metadata plus validation, transform, and Swagger metadata.
6
+
7
+ Avoid mutating shared option objects across multiple properties.
8
+
9
+ ## Plugins
10
+
11
+ - Paranoid plugin handles soft delete filtering and must respect aggregate first-stage constraints such as `$geoNear`.
12
+ - Strict reference plugin validates referenced documents and must resolve models through the active connection.
13
+ - Transform plugin centralizes common document transformation and should not break Mongo update operators.
14
+
15
+ ## Debug Output
16
+
17
+ Use `mongoDebug(collection, method, ...args)` when a Mongoose debug callback should be rendered as a Mongo shell-friendly command.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: joktec-mysql-skill
3
+ 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.
4
+ ---
5
+
6
+ # JokTec MySQL Skill
7
+
8
+ Use this skill for relational resources backed by JokTec's TypeORM wrapper.
9
+
10
+ ## Rules
11
+
12
+ - Register app entities through `MysqlModule.forRoot(...)`.
13
+ - Keep entities, app repositories, and app-specific SQL in the consumer app.
14
+ - Extend `MysqlRepo<T, ID>` for app repositories.
15
+ - Treat `mysql`, `mariadb`, and `postgres` as the first-class dialects.
16
+ - Keep `sync` explicit and normally enabled only by an owner process or development bootstrap.
17
+ - Do not add new behavior to deprecated `MysqlFinder`; use `MysqlRepo.qb()` and `MysqlHelper` paths.
18
+
19
+ ## References
20
+
21
+ - Read `references/repository.md` for connection lifecycle, repository usage, query safety, transaction, and cursor behavior.
22
+ - Read `references/entities.md` for `@Tables`, `@Column`, `@PrimaryColumn`, uuidv7, and dialect guidance.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "JokTec MySQL"
3
+ short_description: "Use the JokTec TypeORM wrapper"
4
+ default_prompt: "Use $joktec-mysql-skill when implementing a relational JokTec resource."
@@ -0,0 +1,15 @@
1
+ # MySQL Entity Decorators
2
+
3
+ ## Schema-First Entity Pattern
4
+
5
+ Use `@Tables`, `@Column`, and `@PrimaryColumn` from `@joktec/mysql` when an entity should also act as the source class for mapped DTOs.
6
+
7
+ ## Primary Keys
8
+
9
+ - Prefer numeric auto-increment keys for write-heavy MySQL tables.
10
+ - Use UUIDs when the app needs globally unique or public identifiers.
11
+ - Prefer `uuidv7` over random UUIDs when the id participates in ordered indexes or cursor-like access.
12
+
13
+ ## Dialects
14
+
15
+ 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.
@@ -0,0 +1,23 @@
1
+ # MySQL Repository Usage
2
+
3
+ ## Module Setup
4
+
5
+ Register entities with `MysqlModule.forRoot({ conId, models: [...] })`. Use `conId` for multiple DataSources.
6
+
7
+ ## Repository Pattern
8
+
9
+ Extend `MysqlRepo` and pass the entity class to the base constructor. Services can use `BaseService` when CRUD behavior follows the shared contract.
10
+
11
+ ## Query Safety
12
+
13
+ - Validate field paths against TypeORM metadata before interpolating SQL identifiers.
14
+ - Use parameter binding for values.
15
+ - Keep logical operators such as `$and` and `$or` grouped through QueryBuilder behavior.
16
+
17
+ ## Pagination
18
+
19
+ `MysqlRepo.paginate` supports page, offset, and cursor responses. Cursor mode defaults to `createdAt` plus primary key columns. Custom cursor keys must be mapped columns.
20
+
21
+ ## Transactions
22
+
23
+ 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,25 @@
1
+ ---
2
+ name: joktec-tool-skill
3
+ 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.
4
+ ---
5
+
6
+ # JokTec Tool Skill
7
+
8
+ Use this skill for reusable utility services.
9
+
10
+ ## Packages
11
+
12
+ - `@joktec/http`: Axios-backed HTTP client wrapper.
13
+ - `@joktec/file`: file classification and local file helpers.
14
+ - `@joktec/alert`: alert delivery through Slack-compatible webhooks.
15
+
16
+ ## Rules
17
+
18
+ - Keep tools app-neutral and reusable.
19
+ - Use config-driven clients instead of direct ad hoc setup in app code.
20
+ - Preserve retry, metrics, proxy, and upload behavior where the package exposes it.
21
+ - Keep alert tokens and webhook URLs in runtime config only.
22
+
23
+ ## Reference
24
+
25
+ Read `references/tools.md` for package-specific usage notes.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "JokTec Tools"
3
+ short_description: "Use JokTec utility tool packages"
4
+ default_prompt: "Use $joktec-tool-skill when using JokTec HTTP, file, or alert tools."
@@ -0,0 +1,13 @@
1
+ # Tool Usage
2
+
3
+ ## HTTP
4
+
5
+ Use `@joktec/http` for Axios-backed requests, uploads, proxy agent support, retry config, and metrics where exposed.
6
+
7
+ ## File
8
+
9
+ Use `@joktec/file` for shared file helpers and classification behavior instead of duplicating local utility code.
10
+
11
+ ## Alert
12
+
13
+ Use `@joktec/alert` for Slack-compatible webhook alerts. Keep webhook URLs and credentials out of source control.