audit-scopes

audit-scopes is a command for Claude Code from khadinakbarlabs/shopify-app-builder. It costs 20 tokens per session (588 once invoked), scanned A, original, MIT.

A command for checking which permissions a Shopify app requests from a store and reducing them to what the app actually needs. API scopes are permissions such as reading products or changing orders.

In plain words
What is it for?
Use it to list scopes, find where each is used, connect permissions to app features, identify unused access, and remove scopes that are not needed.
Why use it?
It helps prevent unnecessary access and prepares a clear explanation of permissions for Shopify App Store review.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the shopify-app-builder plugin — 32 skills, 9 commands, 5 agents shipped together

Good fit Use it to list scopes, find where each is used, connect permissions to app features, identify unused access, and remove scopes that are not needed.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/khadinakbarlabs/shopify-app-builder/audit-scopes
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/khadinakbarlabs/shopify-app-builder

Made for: Claude Code.

Or install shopify-app-builder, the plugin that ships this one along with the rest of its 32 skills, 9 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-scopes

README.md
[![agentmods](https://agentmods.dev/badge/commands/khadinakbarlabs/shopify-app-builder/audit-scopes/github.svg)](https://agentmods.dev/commands/khadinakbarlabs/shopify-app-builder/audit-scopes)
Your own site
<a href="https://agentmods.dev/commands/khadinakbarlabs/shopify-app-builder/audit-scopes"><img src="https://agentmods.dev/badge/commands/khadinakbarlabs/shopify-app-builder/audit-scopes/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-scopes

Your own site · 80×15
<a href="https://agentmods.dev/commands/khadinakbarlabs/shopify-app-builder/audit-scopes"><img src="https://agentmods.dev/badge/commands/khadinakbarlabs/shopify-app-builder/audit-scopes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00588
Opus 5 $0.00010 $0.00294
Sonnet 5 $0.00004 $0.00118
Haiku 4.5 $0.00002 $0.00059

Measured 8d ago against content hash d71fb6217378, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

audit-scopes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/audit-scopes.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Audit and Minimize API Scopes

You are reviewing and optimizing Shopify API scopes to follow least-privilege principle and prepare for App Store certification.

Scope Inventory and Assessment

  1. List current scopes

    • Extract scopes from shopify.app.toml SCOPES array
    • Common scopes: read_products, write_orders, read_customers, read_inventory, manage_apps
    • Document each scope's purpose in app (e.g., read_products → product sync feature)
    • Reference skill: scope reference (02_apis.md)
  2. Analyze scope usage

    • Search codebase for GraphQL mutations using each scope
    • Identify read vs write scope requirements per feature
    • Check if any scopes unused or can be removed
    • Example: if no customer mutations, remove write_customers scope
    • Reference skill: API access patterns (02_apis.md)
  3. Map scopes to features

    • Create inventory: scope → feature functionality
    • Identify scopes only needed for admin dashboards (can be feature-gated)
    • Mark scopes needed for webhooks vs direct API calls
    • Document which scopes trigger App Store review flags
    • Reference skill: permission design (04_functions_auth_billing_mcp.md)

Optimization and Verification

  1. Remove unnecessary scopes

    • Test app functionality with minimal scope set
    • Remove read scopes if information retrieved from webhooks instead
    • Replace write scopes with read-only if mutations not needed
    • Example: use read_orders + ORDERS_PAID webhook instead of write_orders
    • Reference skill: scope minimization (02_apis.md)
  2. Verify scope permissions

    • Confirm each scope matches actual API calls in codebase
    • Check GraphQL queries/mutations require all declared scopes
    • Test app reinstall with new scope set (triggers re-authorization)
    • Verify no "access denied" errors in production logs
    • Reference skill: error handling (02_apis.md)
  3. Document scope justification

    • Create SCOPE_JUSTIFICATION.md with one-line purpose per scope
    • Example: "read_products: Display product inventory levels in app dashboard"
    • Include in App Store submission materials for Built for Shopify certification
    • Reference skill: App Store submission (05_appstore_strategy.md)

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 64 lines · 20 tokens per session scan A d71fb6217378

Subscribe to this mod's changes

audit-scopes is a command published in the GitHub repository khadinakbarlabs/shopify-app-builder (1 stars, last pushed 29d ago), licensed MIT. It adds 20 tokens to every session and 588 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.