Claude Cursor GitHub Copilot Skill

preset-superset

Discover and validate direct Superset workspace API capabilities: version, OpenAPI, current user, permissions, menu, and API safety. Use only for direct API workflows; Do not use for MCP-only work.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download preset-io-agent-skills-plugins_preset-api-skills_skills_preset-superset-73d2674.zip · 4 KB
Part of preset-io/agent-skills — 28 skills

Install

skills CLI npx skills add https://github.com/preset-io/agent-skills/tree/master/plugins/preset-api-skills/skills/preset-superset
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install preset-io-agent-skills@llmmart
Git git clone https://github.com/preset-io/agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole preset-io/agent-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

preset-superset

Use before domain-specific workspace API calls when endpoint drift, permissions, or feature availability matter.

Always

  • Auth and conventions come from preset-api (JWT exchange, base URLs, Rison); resolve the workspace hostname through the Management API when it is not already known.
  • Send bearer tokens only to workspace hostnames resolved from the Preset Management API.
  • Prefer the workspace /api/v1/_openapi and /version over generic Superset docs.
  • Keep this skill read-only discovery.

Decision Rules

  • Use discovered workspace host and API facts.
  • Classify version, OpenAPI, current-user, permissions, and menu calls as read-only discovery.
  • Identify follow-up calls that need confirmation.
  • Avoid assuming endpoints before discovery.

Workflow Order

  1. Resolve workspace hostname.
  2. Read version, OpenAPI, current-user, permissions, and menu capabilities.
  3. Classify follow-up risk.
  4. Redact credentials and tokens.

Retrieve

Do Not

  • Do not run SQL, fetch chart data, export/import assets, mutate workspace objects, issue guest tokens, or change access controls from this skill.
Files (agent-skills)
  • examples
    • version_and_openapi.py 447 B
      def get_workspace_version(client, hostname):
          return client.workspace_root("GET", hostname, "/version")
      
      
      def get_workspace_openapi(client, hostname):
          return client.workspace("GET", hostname, "/_openapi")
      
      
      def list_openapi_paths(openapi, prefix="/api/v1/dashboard"):
          paths = openapi.get("paths", {})
          return {
              path: sorted(methods)
              for path, methods in sorted(paths.items())
              if path.startswith(prefix)
          }
      
  • references
    • current-user-and-permissions.md 796 B
      # Current User And Permissions
      
      Use this reference to inspect the authenticated workspace user and troubleshoot `401` or `403` responses.
      
      ```bash
      curl -s -H "Authorization: Bearer $TOKEN" \
        "https://{workspace_hostname}/api/v1/me/" | jq '.result'
      
      curl -s -H "Authorization: Bearer $TOKEN" \
        "https://{workspace_hostname}/api/v1/me/roles/" | jq '.result'
      ```
      
      ```python
      me = client.workspace("GET", hostname, "/me/")["result"]
      roles = client.workspace("GET", hostname, "/me/roles/")["result"]
      print(me.get("username") or me.get("email"), roles)
      ```
      
      Use these calls to troubleshoot `401` and `403` responses. Do not infer access from role names alone; verify the endpoint response.
      
      For role, workspace membership, permission, or access-control changes, route to `preset-roles-permissions`.
      
    • menu-and-feature-discovery.md 763 B
      # Menu And Feature Discovery
      
      Use this reference to inspect workspace UI capabilities visible to the authenticated user.
      
      ```bash
      curl -s -H "Authorization: Bearer $TOKEN" \
        "https://{workspace_hostname}/api/v1/menu/" | jq '.result'
      ```
      
      ```python
      menu = client.workspace("GET", hostname, "/menu/")["result"]
      ```
      
      The menu response is useful for checking whether workspace UI features such as SQL Lab, charts, dashboards, reports, and admin views are visible to the authenticated user.
      
      Menu visibility is not authorization for mutations. For endpoint-specific access, verify with the target endpoint or inspect current-user permissions. For security-sensitive operations, route to the focused skill named in [workspace-api-safety.md](workspace-api-safety.md).
      
    • version-and-openapi.md 1.1 KB
      # Workspace Version And OpenAPI Discovery
      
      Superset workspace API examples should be pinned to the workspace runtime where possible. The public Superset API docs may describe unreleased or broader API surfaces.
      
      Reusable Python snippets live in `examples/version_and_openapi.py`; load that file only when implementation detail is needed.
      
      ## Capture Workspace Version
      
      `workspace_root()` is for Superset endpoints that sit at the server root, such as `/version` or `/healthcheck`. Use `workspace()` for all `/api/v1/...` paths.
      
      Useful fields, when present:
      
      | Field | Description |
      |---|---|
      | `version_string` | Superset runtime version string |
      | `version_sha` | Short build or Git SHA |
      | `build_number` | Deployment build identifier, when configured |
      
      ## Fetch Workspace OpenAPI
      
      Fetch `GET /api/v1/_openapi` to verify that documented endpoints exist in the target workspace before writing or executing examples. If OpenAPI discovery returns `404` or is disabled in a local/dev shell, fall back to the pinned Superset source/routes for that workspace build and verify candidate endpoints with read-only metadata calls before using them.
      
    • workspace-api-safety.md 2.6 KB
      # Workspace API Safety Classification
      
      Default to metadata reads. HTTP method alone is not enough to decide whether an endpoint is safe.
      
      ## Metadata Reads
      
      These are generally safe for normal discovery when the user has requested the workspace target:
      
      | Surface | Examples |
      |---|---|
      | Version and OpenAPI | `/version`, `/api/v1/_openapi` |
      | Current user | `/api/v1/me/`, `/api/v1/me/roles/` |
      | Object metadata | dashboard, chart, dataset, database list/detail endpoints |
      | Related metadata | `related`, `favorite_status`, owner summaries, menu |
      
      ## Data-Returning Reads
      
      These can expose customer data, sample rows, SQL results, SQL text, or database structure. Before calling them, summarize the workspace, endpoint, object ID, row limit or page size, and expected returned data, then get explicit user confirmation:
      
      | Surface | Examples |
      |---|---|
      | Chart data | `/api/v1/chart/{pk}/data/`, `/api/v1/chart/data` |
      | Database samples | `/api/v1/database/{pk}/select_star/...` |
      | Connection configuration | `/api/v1/database/{pk}/connection` |
      | Distinct values | `/api/v1/dataset/distinct/{column_name}`, datasource column values |
      | SQL Lab results | `/api/v1/sqllab/results/`, `/api/v1/sqllab/export/{client_id}/` |
      | SQL text-bearing records | `/api/v1/query/`, `/api/v1/query/{pk}`, `/api/v1/saved_query/`, `/api/v1/saved_query/{pk}` |
      | Exports | `/api/v1/assets/export/`, dashboard/chart/dataset/database/saved query exports |
      
      Prefer page sizes and query limits that answer the user request with the least data exposure.
      
      ## Confirmation-Gated Operations
      
      Before any `POST`, `PUT`, `PATCH`, `DELETE`, import, export, audit download, SQL execution, role/RLS change, database connection change, dataset mutation, dashboard mutation, workspace lifecycle action, invite action, member removal, guest-token creation, cache invalidation, query stop, or task cancellation:
      
      1. Identify the exact team, workspace, dashboard, dataset, database, query, user, role, or token target.
      2. Summarize the endpoint, HTTP method, request body, and expected effect.
      3. Explain whether the action changes access, data, credentials, metadata, cache, or execution state.
      4. Get explicit user confirmation before making the call.
      
      For security-sensitive workflows, route to the focused Phase 5 skill: `preset-guest-tokens`, `preset-embedded-rls`, `preset-sql-execution`, `preset-database-connections`, `preset-roles-permissions`, or `preset-destructive-imports`.
      
      Never expose credentials, bearer tokens, database passwords, SQLAlchemy URIs, access tokens, refresh tokens, signed guest tokens, or exported secret values in logs, examples, PR comments, or handoff notes.
      
  • SKILL.md 1.8 KB
    ---
    name: preset-superset
    description: "Discover and validate direct Superset workspace API capabilities: version, OpenAPI, current user, permissions, menu, and API safety. Use only for direct API workflows; Do not use for MCP-only work."
    ---
    
    # preset-superset
    
    Use before domain-specific workspace API calls when endpoint drift, permissions, or feature availability matter.
    
    ## Always
    
    - Auth and conventions come from `preset-api` (JWT exchange, base URLs, Rison); resolve the workspace hostname through the Management API when it is not already known.
    - Send bearer tokens only to workspace hostnames resolved from the Preset Management API.
    - Prefer the workspace `/api/v1/_openapi` and `/version` over generic Superset docs.
    - Keep this skill read-only discovery.
    
    ## Decision Rules
    
    - Use discovered workspace host and API facts.
    - Classify version, OpenAPI, current-user, permissions, and menu calls as read-only discovery.
    - Identify follow-up calls that need confirmation.
    - Avoid assuming endpoints before discovery.
    
    ## Workflow Order
    
    1. Resolve workspace hostname.
    2. Read version, OpenAPI, current-user, permissions, and menu capabilities.
    3. Classify follow-up risk.
    4. Redact credentials and tokens.
    
    ## Retrieve
    
    - Version and OpenAPI: [references/version-and-openapi.md](references/version-and-openapi.md)
    - Current user and roles: [references/current-user-and-permissions.md](references/current-user-and-permissions.md)
    - Menu and feature discovery: [references/menu-and-feature-discovery.md](references/menu-and-feature-discovery.md)
    - Safety classification for data, export, credential, or execution endpoints: [references/workspace-api-safety.md](references/workspace-api-safety.md)
    
    ## Do Not
    
    - Do not run SQL, fetch chart data, export/import assets, mutate workspace objects, issue guest tokens, or change access controls from this skill.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related