shopify-admin-draft-order-cleanup

shopify-admin-draft-order-cleanup is a skill for Claude Code from 40RTY-ai/shopify-admin-skills. It costs 27 tokens per session (1,269 once invoked), scanned A, original, MIT.

A Shopify cleanup tool that finds open draft orders older than a chosen age and can delete them. Draft orders are incomplete orders, such as quotes or manually prepared orders, that have not been finalized.

In plain words
What is it for?
Use it to review stale draft orders and optionally remove old drafts after confirming they are not active customer quotes or other work in progress.
Why use it?
Abandoned quotes and incomplete orders clutter the admin and can distort pending-revenue figures. Deletion is permanent, so it provides a dry-run preview before making changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code; mentions Codex; mentions Gemini CLI.

Part of the shopify-admin-skills plugin — 117 skills shipped together

Good fit Use it to review stale draft orders and optionally remove old drafts after confirming they are not active customer quotes or other work in progress.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup
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.

Any agent
npx skills add 40RTY-ai/shopify-admin-skills --skill shopify-admin-draft-order-cleanup
Clone the repo
git clone --depth 1 https://github.com/40RTY-ai/shopify-admin-skills

Made for: Claude Code.

Or install shopify-admin-skills, the plugin that ships this one along with the rest of its 117 skills.

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 shopify-admin-draft-order-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup/github.svg)](https://agentmods.dev/skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup)
Your own site
<a href="https://agentmods.dev/skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup"><img src="https://agentmods.dev/badge/skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup/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 shopify-admin-draft-order-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup"><img src="https://agentmods.dev/badge/skills/40rty-ai/shopify-admin-skills/shopify-admin-draft-order-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,269 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.00027 $0.01269
Opus 5.5 $0.00011 $0.00508
Sonnet 5.5 $0.00005 $0.00254
Haiku 4.5 $0.00003 $0.00127

Measured 12d ago against content hash a0a886b24ce8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

shopify-admin-draft-order-cleanup 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 12d 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.

skills/store-management/shopify-admin-draft-order-cleanup/SKILL.md · 166 lines

How it starts

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

Purpose

Queries open draft orders older than a configurable age and optionally deletes them. Draft orders accumulate from abandoned B2B quotes, incomplete manual orders, or old integrations and clutter the admin. Stale drafts also inflate pending revenue metrics.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_orders,write_orders
  • API scopes: read_orders, write_orders

Parameters

Parameter Type Required Default Description
store string yes — Store domain (e.g., mystore.myshopify.com)
older_than_days integer no 30 Delete drafts older than this many days
dry_run bool no true Preview drafts to delete without executing mutation
format string no human Output format: human or json

Safety

⚠️ draftOrderDelete permanently deletes draft orders. Deleted drafts cannot be recovered. Run with dry_run: true to review the list before committing. Check that no stale drafts represent active B2B quotes awaiting customer approval before deleting.

Workflow Steps

  1. OPERATION: draftOrders — query Inputs: query: "status:open created_at:<='<NOW - older_than_days days>'", first: 250, pagination cursor Expected output: Stale open draft orders; paginate until hasNextPage: false

  2. OPERATION: draftOrderDelete — mutation Inputs: id: <draft_order_id> Expected output: deletedId, userErrors

GraphQL Operations

# draftOrders:query — validated against api_version 2025-01
query StaleDraftOrders($query: String!, $after: String) {
  draftOrders(first: 250, after: $after, query: $query) {
    edges {
      node {
        id
        name
        status
        createdAt
        updatedAt
        totalPriceSet {
          shopMoney {
            amount
            currencyCode
          }
        }
        customer {
          id
          displayName
          defaultEmailAddress {
            emailAddress
          }
        }
        tags
        note
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Read the full file on GitHub · 166 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. 12d ago First seen · 166 lines · 27 tokens per session scan A a0a886b24ce8

Subscribe to this mod's changes

shopify-admin-draft-order-cleanup is a skill published in the GitHub repository 40RTY-ai/shopify-admin-skills (200 stars, last pushed 7d ago), licensed MIT. It adds 27 tokens to every session and 1,269 once invoked, about $0.0001 per session on Opus 5.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-10-13.

Related

Other skills, from other repositories

prismer-product-price-monitor

Watch product, flight, or listing prices; alert on target.

Prismer-AI/PrismerCloud · 19 tokens

parcel-tracking

Track parcels and check delivery status for Australian and international couriers. Searches Gmail for dispatch/shipping emails and provides tracking links for all major Australian couriers including AusPost, StarTrack, Aramex, CouriersPlease, Sendle, Toll, Team Global Express, DHL, FedEx, TNT, Hunter Express, Border…

jezweb/claude-skills · 112 tokens

snack-batching

Weekly snack-request batching for {{officechannel}}. Collects Slack shortcut submissions since the last order, consolidates duplicates and standing staples, builds a cart against {{preferredvendor}} within {{weeklybudget}}, and posts it for the office manager to approve before anything is placed.

kortix-ai/suna · 59 tokens

run-campaign

Builds a 7-day SMB campaign kit: one offer with value, deadline, and an honest reason-why; channels picked from what the owner already has (email list, socials, storefront, partners); a day-by-day calendar; every asset drafted (three emails, three social posts, flyer copy); a simple spend/leads/sales tracking sheet…

alebgl77/claude-inc · 0 tokens

post-merge-cleanup

Clean up an already-merged local branch after proving containment. Confirm each discard and preserve unique work.

arbiterForge/codeArbiter · 26 tokens

workflow-assistant

A workflow skill for handling multi-step tasks that connect different business areas and may require combined analysis. Its documented workflows include reviewing orders, creating orders, shipping, confirming receipt, and exporting data.

infometa/workbuddyskills · 277 tokens