@numericoach/gskills-admin-cli 0.1.20 → 0.1.21

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.
package/README.md CHANGED
@@ -102,6 +102,8 @@ Feedback reply bodies are file-based on purpose. Production replies are multi-li
102
102
 
103
103
  The direct-DB replacement commands cover the recurring historical gaps: email-to-feedback import, quiz/course progress repair, source-link repair, page metadata backfill, content-assistant artifact lookup, and JWT session invalidation. Reads stay read-only. Writes require `--dry-run` or `--yes` and log through the app API.
104
104
 
105
+ Agents can combine the CLI with local code. Use CLI JSON output inside shell loops, `jq`, Bun, Node, or TypeScript helpers for batching, joins, comparisons, retries, and reports. If a small local tool is missing, install or invoke it when useful. Keep production access through the authenticated CLI, not direct DB URLs.
106
+
105
107
  Raw project and analytics data can be read or adjusted through resources such as `project-data`, `ticket-sla-rules`, `learning-path-items`, `learning-path-groups`, `quiz-questions`, `quiz-options`, `analytics`, `quiz-attempts`, `user-paths`, `chromebook-progress`, `user-badges`, `user-learning-paths`, and `user-learning-path-item-completions`.
106
108
 
107
109
  ## Agent skill
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@numericoach/gskills-admin-cli",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Admin-only CLI for GSkills super-admin operations.",
@@ -88,9 +88,20 @@ Good pattern:
88
88
 
89
89
  1. Use `gskills-admin schema`, resource reads, and specialized commands first.
90
90
  2. If the operation needs custom logic, inspect the app code and add or use an authenticated CLI API route.
91
- 3. Keep the write path behind `--dry-run` and `--yes`.
92
- 4. Log admin-visible writes and invalidate deploy cache when the data affects visible content.
93
- 5. Publish the CLI and bundled skills when a recurring DB-only workaround becomes a normal operation.
91
+ 3. Combine CLI calls with local code when the operation needs loops, joins, batching, parsing, retries, comparisons, or reports.
92
+ 4. Keep the write path behind `--dry-run` and `--yes`.
93
+ 5. Log admin-visible writes and invalidate deploy cache when the data affects visible content.
94
+ 6. Publish the CLI and bundled skills when a recurring DB-only workaround becomes a normal operation.
95
+
96
+ Good CLI plus code examples:
97
+
98
+ - call `gskills-admin ... --output json` from a shell loop, `jq`, Bun, Node, or TypeScript helper
99
+ - turn CLI JSON into a target list, then call another CLI command per target
100
+ - run a dry-run loop first, inspect the aggregate, then run the same loop with `--yes`
101
+ - use app code to understand domain logic, then expose the actual write behind a CLI route
102
+ - write temporary local scripts for orchestration, but keep repeatable behavior in the CLI or a skill
103
+
104
+ If the local environment is missing a small tool needed for the loop, the agent may install or invoke it, for example `jq`, shell utilities, `bunx`, or a small npm package. Prefer temporary/local tooling over asking for direct DB access. Do not install heavyweight or risky tools without a reason, and never use a tool install as a shortcut around auth, `--dry-run`, `--yes`, admin logs, or cache invalidation.
94
105
 
95
106
  Do not ask an agent for `DATABASE_URL` and do not write a one-off direct DB script when the same job will happen again. Code is still useful, but it should live behind the CLI or a reusable app helper.
96
107