From opskit
Run read-only queries against a Power Platform environment using SQL or OData. Use when the user needs to query, inspect, or analyze data in a customer's Dataverse environment.
How this skill is triggered — by the user, by Claude, or both
Slash command
/opskit:query-environment-dataThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run read-only data queries against a specific Power Platform / Dataverse environment using the official Microsoft PowerPlatform Dataverse Client.
Run read-only data queries against a specific Power Platform / Dataverse environment using the official Microsoft PowerPlatform Dataverse Client.
First-time use — run the bootstrap script to create a virtual environment and install dependencies:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/bootstrap.py setup
Configure a Dataverse connection:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/bootstrap.py add-connection dataverse main
Set the customer environment URL in ops/opskit.json:
{"environment_url": "https://orgname.crm4.dynamics.com"}
Verify readiness:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/bootstrap.py check dataverse
bootstrap.py setupaz loginbootstrap.py add-connection dataverse <name>ops/opskit.json or passed as --environment-urlhttps://orgname.crm4.dynamics.com).--interactive) if working in a devbox environment, or ask the user for service principal credentials (--tenant-id, --client-id, --client-secret).list_tables.py to find what tables exist.get_table_info.py --table <name> to get metadata and column names.query_dataverse.py with SQL or OData using the discovered column names.--format table for human-readable output or --format json for structured data.Note:
--environment-urlis auto-populated fromops/opskit.jsonif configured. Pass it explicitly only to override.--interactivedefaults to true when Azure CLI is logged in.
list_tables.py — List All TablesDiscover what tables exist in the environment:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/query-environment-data/scripts/list_tables.py \
--environment-url "https://org.crm4.dynamics.com" --interactive
# Table format for quick scanning
python3 ${CLAUDE_PLUGIN_ROOT}/skills/query-environment-data/scripts/list_tables.py \
--environment-url "https://org.crm4.dynamics.com" --interactive --format table
Returns: LogicalName, SchemaName, EntitySetName, IsCustomEntity for each table.
Arguments: Auth args + --format only.
get_table_info.py — Inspect Table SchemaGet table metadata and all queryable column names:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/query-environment-data/scripts/get_table_info.py \
--environment-url "https://org.crm4.dynamics.com" --interactive \
--table account
Returns: table schema name, logical name, entity set name, metadata ID, and a full list of column logical names.
Arguments:
--table (required): Logical name of the table to inspect--formatImportant: Always inspect the table schema before constructing queries. Column names in Dataverse are lowercase logical names (e.g., name, statecode, createdon). SELECT * is NOT supported in SQL queries — you must specify column names explicitly.
query_dataverse.py — SQL and OData QueriesRun read-only queries using SQL or OData syntax:
# SQL query (simplest for read-only retrieval)
python3 ${CLAUDE_PLUGIN_ROOT}/skills/query-environment-data/scripts/query_dataverse.py \
--environment-url "https://org.crm4.dynamics.com" --interactive \
--sql "SELECT TOP 10 name, createdon FROM account WHERE statecode = 0"
# OData query with filtering and ordering
python3 ${CLAUDE_PLUGIN_ROOT}/skills/query-environment-data/scripts/query_dataverse.py \
--environment-url "https://org.crm4.dynamics.com" --interactive \
--table account \
--select name createdon \
--filter "statecode eq 0" \
--orderby "createdon desc" \
--top 10
# Table output format
python3 ${CLAUDE_PLUGIN_ROOT}/skills/query-environment-data/scripts/query_dataverse.py \
--environment-url "https://org.crm4.dynamics.com" --interactive \
--table contact --select fullname emailaddress1 --top 5 --format table
Arguments:
--sql or --table (required, mutually exclusive): SQL query string or table logical name for OData--select: Column names to return (OData mode, space-separated)--filter: OData $filter expression (OData mode)--orderby: OData $orderby expression(s) (OData mode)--top: Maximum number of records to return--format: json (default) or table--include-annotations: Include OData annotations (formatted values, lookup names)SQL notes:
SELECT col1, col2 FROM table — no SELECT *WHERE, TOP, ORDER BY, AND/OR supportedGROUP BY and aggregations are NOT supportedUse the --interactive flag. This tries Azure CLI first (silent, no prompt if az login was done), then falls back to a browser prompt. Every invocation prints the authenticated user and target environment (e.g., [email protected] → https://org.crm4.dynamics.com).
To switch tenants or users, run az login --tenant <tenant-id> before invoking the script.
Use --tenant-id, --client-id, and --client-secret for service principal authentication.
az login is active — no browser prompts needed.SELECT * is NOT supported — always specify column names explicitly in SQL queries.GROUP BY is NOT supported in SQL — for aggregations, fetch all records and process in Python.--orderby accepts multiple expressions — e.g., --orderby "createdon desc" "name asc".--top defaults to no limit — omit it to fetch all records, or set it to limit results.--include-annotations to retain OData system annotations (etag, etc.). Note: @OData.Community.Display.V1.FormattedValue labels for option sets (e.g. statuscode) are not currently returned — to resolve a numeric code to its label, use get_table_info.py --table <table> which includes column metadata, or look up the option set in the Maker Portal.list_tables.py --search <text> filters results client-side by logical name substring.https://orgname.crm4.dynamics.com (no trailing slash)See Dataverse SDK reference for API details.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub talxis/tools-opskit-cli --plugin opskit