一键导入
knack-explorer
Explore Knack.app database structure using knack-sleuth CLI. Use when analyzing Knack apps, objects, fields, or relationships.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Explore Knack.app database structure using knack-sleuth CLI. Use when analyzing Knack apps, objects, fields, or relationships.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | knack-explorer |
| description | Explore Knack.app database structure using knack-sleuth CLI. Use when analyzing Knack apps, objects, fields, or relationships. |
| allowed-tools | ["Bash(uvx knack-sleuth *)"] |
| agent | knack-dev |
| context | fork |
You have access to knack-sleuth, a CLI for exploring Knack.app databases.
Important: The Knack metadata API is public — no API key is required. You only need the
application ID (--app-id), or have KNACK_APP_ID set as an environment variable.
Each command is invoked via uvx knack-sleuth <command> .... Run any command with --help for full options.
list-objects — List all objects with field counts, row counts, connection counts (Ca/Ce), and instability (I).
--sort-by-rowssearch-object — Find all usages of an object (connections, views, forms, formulas).
--no-fields to suppress field-level detailsearch-field — Find all usages of a single field (by key or name) without cascading through the whole object.show-coupling — Show afferent (inbound) and efferent (outbound) coupling for an object.find-orphans — List orphaned fields and objects (defined but not used anywhere).export-db-schema — Export your app's database schema (objects, fields, relationships). This is the command you usually want for schema/ER work.
--format json|dbml|yaml|mermaid--detail structural|minimal|compact|standardexport-schema-subgraph — Export a subset of the schema starting from a specific object.
--object NAME_OR_KEY, --depth 0|1|2, plus the same --format and --detail as aboveexport-schema — Export Knack's internal metadata schema (rarely needed; use export-db-schema for your app's structure).diff — Compare two metadata snapshots (or a snapshot vs the live app) and report structural changes.
--format rich|json|markdown, --exit-code to exit 1 when changes are found (CI-friendly)impact-analysis — Analyze how changing an object or field would ripple through the app.
--format json|yaml|markdownapp-summary — Generate a comprehensive architectural summary (domain model, coupling, tech debt).
--format json|yaml|markdownrole-access-review — CSV report of which user profiles (roles) can access which scenes/pages.
--summary-only for top-level pages onlyrole-access-summary — Show all pages and views accessible by a specific role.
--role "Role Name" or --profile-key profile_1download-metadata — Download and save Knack app metadata to a local JSON file (the output path is a positional argument).Most commands work in two modes:
--app-id YOUR_APP_ID (or set KNACK_APP_ID) to fetch metadata directly from Knack.download-metadata.Object and field arguments accept either a key (object_12, field_116) or a name. On a failed
lookup the CLI prints "did you mean" suggestions. Field names repeat across objects — if a field
name is ambiguous, the CLI lists all candidate keys; re-run with the exact key.
When using --app-id directly, metadata is auto-cached locally and reused for 24 hours.
Use --refresh to force a fresh download.
When running multiple commands against the same app, download once and reuse the file:
uvx knack-sleuth download-metadata app.json --app-id YOUR_APP_ID
uvx knack-sleuth list-objects app.json
uvx knack-sleuth search-object "Object Name" app.json
uvx knack-sleuth export-db-schema app.json -f dbml -o schema.dbml
When you need to process command output programmatically, prefer --format json with --output file.json:
uvx knack-sleuth impact-analysis object_12 --format json --output impact.jsonuvx knack-sleuth app-summary --format json --output summary.jsonUse --format markdown when the output is for human consumption.
uvx knack-sleuth search-field field_116 --app-id YOUR_APP_IDuvx knack-sleuth find-orphans --app-id YOUR_APP_IDuvx knack-sleuth diff old.json new.jsonuvx knack-sleuth diff old.json --app-id YOUR_APP_IDuvx knack-sleuth role-access-review --app-id YOUR_APP_ID --output role-access.csvuvx knack-sleuth role-access-summary --app-id YOUR_APP_ID --profile-key profile_key --output role-summary.csvlist-objects to see all objects, row counts, and coupling metrics.search-object, search-field, and show-coupling to trace how specific objects and fields are used.export-db-schema or export-schema-subgraph (DBML or Mermaid for diagrams, YAML for readability).impact-analysis on objects/fields being considered for change, or app-summary for a full architectural overview.find-orphans to list unused resources — but flag identifier/system fields, which can be orphans by design.diff to compare snapshots or snapshot-vs-live for "what changed?" questions.role-access-review and role-access-summary for permission and security questions.