Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
40rty-ai avatar

Shopify Admin Inventory Adjustment

  • 7 installs
  • 173 repo stars
  • Updated June 26, 2026
  • 40rty-ai/shopify-admin-skills

shopify-admin-inventory-adjustment is a Claude Code skill that applies signed inventory quantity corrections to specific Shopify variants at specific locations using the Admin API's inventoryAdjustQuantities mutation.

About

This Claude Code skill applies inventory quantity corrections to specific product variants at specific Shopify locations by running the inventoryAdjustQuantities GraphQL mutation. A developer or operator uses it after a cycle count, a late 3PL return batch, or a sync discrepancy instead of editing inventory row by row in the Shopify admin. It supports a dry_run preview and logs an audit-trail reason for each change.

  • Applies signed inventory quantity deltas to specific variants at specific locations via the Shopify Admin API
  • Supports dry_run preview and an audit-trail reason field (cycle_count, damaged, shrinkage, etc.)
  • Wraps productVariants query + inventoryAdjustQuantities mutation on API version 2025-01

Shopify Admin Inventory Adjustment by the numbers

  • 7 all-time installs (skills.sh)
  • Ranked #1,587 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
At a glance

shopify-admin-inventory-adjustment capabilities & compatibility

Free; requires an authenticated Shopify CLI session with write_inventory scope.

Capabilities
inventory adjustment · cycle count · stock correction
Pricing
Free
From the docs

What shopify-admin-inventory-adjustment says it does

Applies inventory quantity corrections to specific variants at specific locations — the programmatic equivalent of manually editing inventory in the Shopify admin.
SKILL.md
Step 2 executes `inventoryAdjustQuantities` which immediately changes live inventory quantities.
SKILL.md
npx skills add https://github.com/40rty-ai/shopify-admin-skills --skill shopify-admin-inventory-adjustment

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs7
repo stars173
Last updatedJune 26, 2026
Repository40rty-ai/shopify-admin-skills

What it does

Correct on-hand inventory quantities for Shopify variants at a given location after a cycle count or return batch.

Who is it for?

Correcting live Shopify inventory counts after a cycle count, a 3PL return batch, or a sync discrepancy.

Skip if: Creating formal transfer orders or moving stock between locations (use the transfer skill for that).

When should I use this skill?

A cycle count or audit reveals inventory discrepancies that need to be written back to Shopify.

What you get

Live inventory quantities are corrected per SKU and location with a logged reason and before/after counts.

  • Per-SKU before/after inventory quantities
  • Audit-trail reason logged in Shopify inventory activity history

By the numbers

  • 7 reason codes (correction, cycle_count, damaged, received, reservation_created, reservation_deleted, shrinkage)
  • 2-step GraphQL workflow (productVariants query + inventoryAdjustQuantities mutation)

Files

SKILL.mdMarkdownGitHub ↗

Purpose

Applies inventory quantity corrections to specific variants at specific locations — the programmatic equivalent of manually editing inventory in the Shopify admin. Use after a cycle count reveals discrepancies, after a 3PL return batch posts late, or after the multi-location-inventory-audit skill identifies Available/Committed drift. Replaces manual row-by-row inventory editing in the Shopify admin.

Prerequisites

  • shopify auth login --store <domain>
  • API scopes: read_products, write_inventory

Parameters

ParameterTypeRequiredDefaultDescription
storestringyesStore domain (e.g., mystore.myshopify.com)
formatstringnohumanOutput format: human or json
dry_runboolnofalsePreview operations without executing mutations
adjustmentsarrayyesArray of {sku, location_id, delta} objects. delta is the signed quantity change (e.g., +5 to add 5 units, -3 to remove 3)
reasonstringnocorrectionAdjustment reason logged to audit trail: correction, cycle_count, damaged, received, reservation_created, reservation_deleted, shrinkage
reference_document_uristringnoURI to link the adjustment to a PO, return, or cycle count document

Safety

⚠️ Step 2 executes inventoryAdjustQuantities which immediately changes live inventory quantities. Incorrect adjustments can cause overselling (if you reduce too far) or inflated stock counts (if you add incorrectly). Run with dry_run: true to see the before/after quantities per SKU before committing. The reason field is logged permanently in Shopify's inventory activity history.

Workflow Steps

1. OPERATION: productVariants — query Inputs: For each {sku} in adjustments: look up the variant by SKU to get its inventoryItem.id; also fetch current inventoryQuantity for before/after comparison Expected output: Map of {sku → inventoryItemId, currentQuantity} for all adjustment targets; abort if any SKU is not found

2. OPERATION: inventoryAdjustQuantities — mutation Inputs: changes array of {inventoryItemId, locationId, delta, ledgerDocumentUri} using the reason and reference_document_uri parameters Expected output: inventoryAdjustmentGroup.changes with quantityAfterChange per item; userErrors

GraphQL Operations

# productVariants:query — validated against api_version 2025-01
query VariantBySku($first: Int!, $query: String) {
  productVariants(first: $first, query: $query) {
    edges {
      node {
        id
        sku
        inventoryQuantity
        inventoryItem {
          id
          tracked
        }
        product {
          title
        }
      }
    }
  }
}
# inventoryAdjustQuantities:mutation — validated against api_version 2025-01
mutation InventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) {
  inventoryAdjustQuantities(input: $input) {
    inventoryAdjustmentGroup {
      id
      reason
      changes {
        name
        delta
        quantityAfterChange
        item {
          id
          sku
        }
        location {
          id
          name
        }
      }
    }
    userErrors {
      field
      message
    }
  }
}

Session Tracking

Claude MUST emit the following output at each stage. This is mandatory.

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: inventory-adjustment                 ║
║  Store: <store domain>                       ║
║  Started: <YYYY-MM-DD HH:MM UTC>             ║
╚══════════════════════════════════════════════╝

After each step, emit:

[N/TOTAL] <QUERY|MUTATION>  <OperationName>
          → Params: <brief summary of key inputs>
          → Result: <count or outcome, e.g., "143 records returned">

If dry_run: true, prefix every mutation step with [DRY RUN] and do not execute it.

On completion, emit:

For format: human (default):

══════════════════════════════════════════════
OUTCOME SUMMARY
  SKUs adjusted:        <value>
  Total units added:    <value>
  Total units removed:  <value>
  Errors:               <count, 0 if none>
  Output:               <filename or "none">
══════════════════════════════════════════════

For format: json, emit a JSON object with this schema:

{
  "skill": "inventory-adjustment",
  "store": "<domain>",
  "started_at": "<ISO8601>",
  "completed_at": "<ISO8601>",
  "dry_run": false,
  "steps": [
    {
      "step": 1,
      "operation": "<OperationName>",
      "type": "query|mutation",
      "params_summary": "<string>",
      "result_summary": "<string>",
      "skipped": false
    }
  ],
  "outcome": {
    "skus_adjusted": 0,
    "total_units_added": 0,
    "total_units_removed": 0,
    "errors": 0,
    "output_file": "<filename|null>"
  }
}

Output Format

CSV file inventory-adjustments-<YYYY-MM-DD>.csv with columns: sku, product_title, location_name, quantity_before, delta, quantity_after, reason.

Error Handling

ErrorCauseRecovery
SKU not foundSKU doesn't exist in storeVerify SKU spelling; use low-inventory-restock to browse valid SKUs
inventoryItem.tracked: falseVariant has inventory tracking disabledEnable tracking in Shopify admin before adjusting
userErrors from mutationInvalid delta, invalid location, or permission issueCheck write_inventory scope and verify location GID
Delta would push quantity below 0Adjustment removes more than availableConfirm correct delta value; use negative delta only for known stock removals

Best Practices

1. Always run dry_run: true first — the before/after CSV preview lets you confirm every change before it hits live inventory. 2. Use reason: cycle_count with a reference_document_uri pointing to your count sheet — this creates a permanent audit trail in Shopify's inventory activity log. 3. Batch all corrections from a single count session into one command rather than applying one-at-a-time — the audit trail groups them under a single inventoryAdjustmentGroup. 4. After adjusting, run multi-location-inventory-audit again to confirm all discrepancies are resolved. 5. For 3PL return batches, use reason: received and link the return batch document URI — this makes reconciliation with your 3PL invoice straightforward.

Related skills

FAQ

Does this change live inventory?

Yes. Step 2 runs inventoryAdjustQuantities which immediately changes live inventory quantities, so run with dry_run: true first.

What API scopes does it need?

It requires read_products and write_inventory scopes on an authenticated Shopify CLI session.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.