@carllee1983/dbcli 7.0.0 → 8.0.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.
- package/.agents/skills/story-development/SKILL.md +70 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor/rules/dbcli.mdc +65 -2
- package/.cursor/skills/dbcli/reference.md +197 -5
- package/.cursor-plugin/plugin.json +1 -1
- package/.github/skills/dbcli/SKILL.md +65 -2
- package/.github/skills/dbcli/reference.md +197 -5
- package/CHANGELOG.md +299 -0
- package/assets/SKILL.md +65 -2
- package/assets/SKILL.zh-TW.md +60 -2
- package/assets/integration-kit/README.md +43 -0
- package/assets/integration-kit/external-consumers.ts +9 -0
- package/assets/integration-kit/skill-author-consumer.ts +77 -0
- package/assets/integration-kit/task-pack.md +18 -0
- package/assets/reference.md +197 -5
- package/assets/tasks/README.md +6 -0
- package/assets/tasks/analyze-table-perf.md +3 -3
- package/assets/tasks/audit-permissions.md +2 -2
- package/assets/tasks/connection-health.md +2 -2
- package/assets/tasks/design-review.md +3 -3
- package/assets/tasks/diagnose-slow-query.md +3 -3
- package/assets/tasks/migration-review.md +3 -3
- package/assets/tasks/mongo-safe-backfill.md +2 -2
- package/assets/tasks/mongo-schema-drift-review.md +2 -2
- package/assets/tasks/orm-drift-review.md +3 -3
- package/assets/tasks/pr-database-review.md +3 -3
- package/assets/tasks/safe-backfill-verify.md +3 -3
- package/assets/tasks/safe-backfill.md +3 -3
- package/assets/tasks/schema-drift-review.md +3 -3
- package/assets/tasks/slow-endpoint-investigation.md +19 -6
- package/assets/ui-template.html +18 -18
- package/dist/cli-runtime.mjs +25533 -22188
- package/dist/cli.mjs +7 -4
- package/dist/core.d.ts +297 -2
- package/dist/core.mjs +2075 -3
- package/dist/ui-style.css +1 -1
- package/gemini-extension.json +1 -1
- package/package.json +6 -3
- package/plugins/dbcli-agent/.codex-plugin/plugin.json +1 -1
- package/plugins/dbcli-agent/skills/dbcli/SKILL.md +65 -2
- package/plugins/dbcli-agent/skills/dbcli/reference.md +197 -5
- package/skills/dbcli/SKILL.md +65 -2
- package/skills/dbcli/reference.md +197 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: audit-permissions
|
|
3
3
|
description: Audit the active permission tier and blacklist coverage before granting an agent write access.
|
|
4
4
|
tags: [security, permissions, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
table:
|
|
8
8
|
type: string
|
|
@@ -11,7 +11,7 @@ params:
|
|
|
11
11
|
safety:
|
|
12
12
|
mode: plan-only
|
|
13
13
|
requires:
|
|
14
|
-
- blacklist
|
|
14
|
+
- blacklist.manage
|
|
15
15
|
steps:
|
|
16
16
|
- type: command
|
|
17
17
|
command: status
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: connection-health
|
|
3
3
|
description: Quick read-only health check of the active connection (reachability, config, capacity signals).
|
|
4
4
|
tags: [diagnostics, health, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
section:
|
|
8
8
|
type: string
|
|
@@ -13,7 +13,7 @@ params:
|
|
|
13
13
|
safety:
|
|
14
14
|
mode: plan-only
|
|
15
15
|
requires:
|
|
16
|
-
- blacklist
|
|
16
|
+
- blacklist.manage
|
|
17
17
|
steps:
|
|
18
18
|
- type: command
|
|
19
19
|
command: status
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: design-review
|
|
3
3
|
description: Validate and render a version-controlled SQL database design before comparing it with the local schema cache and preparing review-only proposals.
|
|
4
4
|
tags: [design, schema, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
safety:
|
|
7
7
|
mode: plan-only
|
|
8
8
|
requires:
|
|
9
|
-
- blacklist
|
|
10
|
-
- schema
|
|
9
|
+
- blacklist.manage
|
|
10
|
+
- schema.read
|
|
11
11
|
steps:
|
|
12
12
|
- type: command
|
|
13
13
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: diagnose-slow-query
|
|
3
3
|
description: Diagnose slow query causes using safe read-only dbcli steps.
|
|
4
4
|
tags: [diagnostics, performance, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
query:
|
|
8
8
|
type: string
|
|
@@ -11,8 +11,8 @@ params:
|
|
|
11
11
|
safety:
|
|
12
12
|
mode: plan-only
|
|
13
13
|
requires:
|
|
14
|
-
- blacklist
|
|
15
|
-
- schema
|
|
14
|
+
- blacklist.manage
|
|
15
|
+
- schema.read
|
|
16
16
|
steps:
|
|
17
17
|
- type: command
|
|
18
18
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: migration-review
|
|
3
3
|
description: Capture pre-change schema evidence and preview a migration's DDL before it is applied.
|
|
4
4
|
tags: [migration, schema, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
table:
|
|
8
8
|
type: string
|
|
@@ -15,8 +15,8 @@ params:
|
|
|
15
15
|
safety:
|
|
16
16
|
mode: plan-only
|
|
17
17
|
requires:
|
|
18
|
-
- blacklist
|
|
19
|
-
- schema
|
|
18
|
+
- blacklist.manage
|
|
19
|
+
- schema.read
|
|
20
20
|
steps:
|
|
21
21
|
- type: command
|
|
22
22
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: orm-drift-review
|
|
3
3
|
description: Compare an ORM schema definition (Prisma / DDL / normalized JSON) against the live schema cache and review drift before any corrective migration.
|
|
4
4
|
tags: [diagnostics, schema, orm, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
orm_path:
|
|
8
8
|
type: string
|
|
@@ -11,8 +11,8 @@ params:
|
|
|
11
11
|
safety:
|
|
12
12
|
mode: plan-only
|
|
13
13
|
requires:
|
|
14
|
-
- blacklist
|
|
15
|
-
- schema
|
|
14
|
+
- blacklist.manage
|
|
15
|
+
- schema.read
|
|
16
16
|
steps:
|
|
17
17
|
- type: command
|
|
18
18
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: pr-database-review
|
|
3
3
|
description: Review a PR's changed persistence paths, queries and migrations for database risk before merge.
|
|
4
4
|
tags: [review, safety, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
query:
|
|
8
8
|
type: string
|
|
@@ -11,8 +11,8 @@ params:
|
|
|
11
11
|
safety:
|
|
12
12
|
mode: plan-only
|
|
13
13
|
requires:
|
|
14
|
-
- blacklist
|
|
15
|
-
- schema
|
|
14
|
+
- blacklist.manage
|
|
15
|
+
- schema.read
|
|
16
16
|
steps:
|
|
17
17
|
- type: command
|
|
18
18
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: safe-backfill-verify
|
|
3
3
|
description: Plan a safe backfill/UPDATE and a read-back assertion that verifies the write achieved its goal.
|
|
4
4
|
tags: [data, write, safety, verification]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
table:
|
|
8
8
|
type: string
|
|
@@ -23,8 +23,8 @@ params:
|
|
|
23
23
|
safety:
|
|
24
24
|
mode: plan-only
|
|
25
25
|
requires:
|
|
26
|
-
- blacklist
|
|
27
|
-
- schema
|
|
26
|
+
- blacklist.manage
|
|
27
|
+
- schema.read
|
|
28
28
|
steps:
|
|
29
29
|
- type: command
|
|
30
30
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: safe-backfill
|
|
3
3
|
description: Plan a safe data backfill/UPDATE with blacklist, schema and risk checks before any write.
|
|
4
4
|
tags: [data, write, safety]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
table:
|
|
8
8
|
type: string
|
|
@@ -15,8 +15,8 @@ params:
|
|
|
15
15
|
safety:
|
|
16
16
|
mode: plan-only
|
|
17
17
|
requires:
|
|
18
|
-
- blacklist
|
|
19
|
-
- schema
|
|
18
|
+
- blacklist.manage
|
|
19
|
+
- schema.read
|
|
20
20
|
steps:
|
|
21
21
|
- type: command
|
|
22
22
|
command: blacklist list
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: schema-drift-review
|
|
3
3
|
description: Detect drift between the cached/committed schema and the live database for one table.
|
|
4
4
|
tags: [diagnostics, schema, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
table:
|
|
8
8
|
type: string
|
|
@@ -11,8 +11,8 @@ params:
|
|
|
11
11
|
safety:
|
|
12
12
|
mode: plan-only
|
|
13
13
|
requires:
|
|
14
|
-
- blacklist
|
|
15
|
-
- schema
|
|
14
|
+
- blacklist.manage
|
|
15
|
+
- schema.read
|
|
16
16
|
steps:
|
|
17
17
|
- type: command
|
|
18
18
|
command: blacklist list
|
|
@@ -2,16 +2,20 @@
|
|
|
2
2
|
name: slow-endpoint-investigation
|
|
3
3
|
description: Connect proxy, explain and missing-index evidence to investigate a slow endpoint's query.
|
|
4
4
|
tags: [diagnostics, performance, readonly]
|
|
5
|
-
engines: [
|
|
5
|
+
engines: [postgresql, mysql]
|
|
6
6
|
params:
|
|
7
7
|
query:
|
|
8
8
|
type: string
|
|
9
9
|
required: true
|
|
10
10
|
description: The suspected slow SQL statement behind the endpoint (not executed by this task).
|
|
11
|
+
table:
|
|
12
|
+
type: string
|
|
13
|
+
required: true
|
|
14
|
+
description: The exact table the local observation points at (confirm via `dbcli list`).
|
|
11
15
|
safety:
|
|
12
16
|
mode: plan-only
|
|
13
17
|
requires:
|
|
14
|
-
- blacklist
|
|
18
|
+
- blacklist.manage
|
|
15
19
|
steps:
|
|
16
20
|
- type: command
|
|
17
21
|
command: blacklist list
|
|
@@ -21,6 +25,10 @@ steps:
|
|
|
21
25
|
command: proxy analyze --format json
|
|
22
26
|
reason: Aggregate observed slow queries and N+1 patterns from the local proxy event log.
|
|
23
27
|
risk: readonly
|
|
28
|
+
- type: command
|
|
29
|
+
command: schema {{table}} --format json
|
|
30
|
+
reason: Confirm the selected table's live columns and indexes before reading a plan or index advice.
|
|
31
|
+
risk: readonly
|
|
24
32
|
- type: command
|
|
25
33
|
command: explain "{{query}}"
|
|
26
34
|
reason: Inspect the query plan for the suspected statement without running it for effect.
|
|
@@ -34,7 +42,12 @@ steps:
|
|
|
34
42
|
|
|
35
43
|
Use this task when an endpoint is slow and you want evidence, not guesses. Start from
|
|
36
44
|
`proxy analyze` (requires that the local observability proxy has captured traffic) to
|
|
37
|
-
find the hottest query/table,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
find the hottest query/table, confirm that table's live shape with `schema` before
|
|
46
|
+
reading anything into a plan, then `explain` the statement and review
|
|
47
|
+
`guide missing-index-for` candidates.
|
|
48
|
+
|
|
49
|
+
Everything here is a lead, not a cause. A proxy finding is what was observed locally,
|
|
50
|
+
not proof of what makes the endpoint slow, and an index candidate is not a fix that has
|
|
51
|
+
been shown to work. Index advice is ADVISORY: do not create indexes directly — route any
|
|
52
|
+
proposed index through the `migration-review` pack first, then verify before/after with
|
|
53
|
+
`snapshot`/`assert` or `report --section perf` deltas.
|