# Shopify Admin Publication Channel Audit

> Read-only: shows which products are published to which sales channels and flags unpublished active products.

- **Type:** Skill
- **Install:** `agentstack add skill-40rty-ai-shopify-admin-skills-shopify-admin-publication-channel-audit`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [40RTY-ai](https://agentstack.voostack.com/s/40rty-ai)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [40RTY-ai](https://github.com/40RTY-ai)
- **Source:** https://github.com/40RTY-ai/shopify-admin-skills/tree/main/skills/store-management/shopify-admin-publication-channel-audit
- **Website:** http://skills.40rty.ai

## Install

```sh
agentstack add skill-40rty-ai-shopify-admin-skills-shopify-admin-publication-channel-audit
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Purpose
Queries all active products and the publications (sales channels) they are visible on. Flags products that are active but missing from key channels (e.g., Online Store, Google Shopping, Meta). Prevents silent revenue loss from products that exist in the catalog but are invisible on sales channels. Read-only — no mutations.

## Prerequisites
- Authenticated Shopify CLI session: `shopify store auth --store  --scopes read_products,read_publications`
- API scopes: `read_products`, `read_publications`

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| required_channels | array | no | ["Online Store"] | Channel names that all active products should be on |
| format | string | no | human | Output format: `human` or `json` |

## Safety

> ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.

## Workflow Steps

1. **OPERATION:** `publications` — query
   **Inputs:** `first: 50`
   **Expected output:** All available publications (sales channels) with `id`, `name`

2. **OPERATION:** `products` — query
   **Inputs:** `query: "status:active"`, `first: 250`, select `publishedOnCurrentPublication`, `resourcePublications { publication { name } }`, pagination cursor
   **Expected output:** Active products with their channel publication status

3. For each product: check if it appears in each `required_channels` — flag if missing from any

## GraphQL Operations

```graphql
# publications:query — validated against api_version 2025-01
query SalesChannels {
  publications(first: 50) {
    edges {
      node {
        id
        name
        supportsFuturePublishing
        app {
          title
        }
      }
    }
  }
}
```

```graphql
# products:query — validated against api_version 2025-01
query ProductPublications($after: String) {
  products(first: 250, after: $after, query: "status:active") {
    edges {
      node {
        id
        title
        handle
        status
        resourcePublications(first: 20) {
          edges {
            node {
              publication {
                id
                name
              }
              publishDate
              isPublished
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

## Session Tracking

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

**On start**, emit:
```
╔══════════════════════════════════════════════╗
║  SKILL: Publication Channel Audit            ║
║  Store:                        ║
║  Started:              ║
╚══════════════════════════════════════════════╝
```

**After each step**, emit:
```
[N/TOTAL]   
          → Params: 
          → Result: 
```

**On completion**, emit:

For `format: human` (default):
```
══════════════════════════════════════════════
PUBLICATION CHANNEL AUDIT
  Active products:          
  Sales channels found:     
  Products missing channels: 

  Missing from "Online Store":
    ""  ()
  Output: publication_audit_.csv
══════════════════════════════════════════════
```

For `format: json`, emit:
```json
{
  "skill": "publication-channel-audit",
  "store": "",
  "active_products": 0,
  "channels_found": 0,
  "missing_channel_count": 0,
  "output_file": "publication_audit_.csv"
}
```

## Output Format
CSV file `publication_audit_.csv` with columns:
`product_id`, `title`, `handle`, `channel_name`, `is_published`, `publish_date`, `issue`

## Error Handling
| Error | Cause | Recovery |
|-------|-------|----------|
| `THROTTLED` | API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
| Channel not found | Required channel not installed or renamed | Report channel as missing in summary |
| No active products | Empty catalog | Exit with 0 results |

## Best Practices
- Run after any bulk product import — products are not always published to all channels by default.
- For multi-channel stores, add all critical channels to `required_channels` to catch products missing from any of them.
- Products unpublished from a channel may be intentional (e.g., wholesale-only items) — review the flagged list before publishing.
- Pair with `product-data-completeness-score` — products with low data completeness scores should be fixed before being published to additional channels.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [40RTY-ai](https://github.com/40RTY-ai)
- **Source:** [40RTY-ai/shopify-admin-skills](https://github.com/40RTY-ai/shopify-admin-skills)
- **License:** MIT
- **Homepage:** http://skills.40rty.ai

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-40rty-ai-shopify-admin-skills-shopify-admin-publication-channel-audit
- Seller: https://agentstack.voostack.com/s/40rty-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
