shopify-hello-world

Create a minimal working Shopify app that queries products via GraphQL Admin API. Use when starting a new Shopify integration, testing your setup, or learning basic Shopify API patterns. Trigger with phrases like "shopify hello world", "shopify example", "shopify quick start", "simple shopify app", "first shopify API call".

1,868 stars

Best use case

shopify-hello-world is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create a minimal working Shopify app that queries products via GraphQL Admin API. Use when starting a new Shopify integration, testing your setup, or learning basic Shopify API patterns. Trigger with phrases like "shopify hello world", "shopify example", "shopify quick start", "simple shopify app", "first shopify API call".

Teams using shopify-hello-world should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/shopify-hello-world/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/saas-packs/shopify-pack/skills/shopify-hello-world/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/shopify-hello-world/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How shopify-hello-world Compares

Feature / Agentshopify-hello-worldStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create a minimal working Shopify app that queries products via GraphQL Admin API. Use when starting a new Shopify integration, testing your setup, or learning basic Shopify API patterns. Trigger with phrases like "shopify hello world", "shopify example", "shopify quick start", "simple shopify app", "first shopify API call".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Shopify Hello World

## Overview

Minimal working example: query your store's products using the Shopify GraphQL Admin API. Uses `@shopify/shopify-api` with a custom app access token for zero-friction setup.

## Prerequisites

- Completed `shopify-install-auth` setup
- A Shopify development store
- An Admin API access token (`shpat_xxx`) from Settings > Apps > Develop apps

## Instructions

### Step 1: Create Project

```bash
mkdir shopify-hello-world && cd shopify-hello-world
npm init -y
npm install @shopify/shopify-api dotenv
```

### Step 2: Configure Environment

```bash
# .env
SHOPIFY_STORE=your-store.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SHOPIFY_API_KEY=your_api_key
SHOPIFY_API_SECRET=your_api_secret
```

### Step 3: Write the Hello World Script

```typescript
// hello-shopify.ts
import "@shopify/shopify-api/adapters/node";
import { shopifyApi } from "@shopify/shopify-api";
import "dotenv/config";

const shopify = shopifyApi({
  apiKey: process.env.SHOPIFY_API_KEY!,
  apiSecretKey: process.env.SHOPIFY_API_SECRET!,
  hostName: "localhost",
  apiVersion: "2024-10",
  isCustomStoreApp: true,
  adminApiAccessToken: process.env.SHOPIFY_ACCESS_TOKEN!,
});

async function main() {
  const session = shopify.session.customAppSession(
    process.env.SHOPIFY_STORE!
  );

  const client = new shopify.clients.Graphql({ session });

  // Query shop info
  const shopInfo = await client.request(`{
    shop {
      name
      currencyCode
      primaryDomain { url }
    }
  }`);
  console.log("Store:", shopInfo.data.shop.name);
  console.log("Currency:", shopInfo.data.shop.currencyCode);

  // Query first 5 products
  const products = await client.request(`{
    products(first: 5) {
      edges {
        node {
          id
          title
          status
          totalInventory
          variants(first: 3) {
            edges {
              node {
                title
                price
                sku
                inventoryQuantity
              }
            }
          }
        }
      }
    }
  }`);

  console.log("\nProducts:");
  for (const edge of products.data.products.edges) {
    const p = edge.node;
    console.log(`  - ${p.title} (${p.status}, ${p.totalInventory} in stock)`);
    for (const v of p.variants.edges) {
      console.log(`      Variant: ${v.node.title} — $${v.node.price} (SKU: ${v.node.sku})`);
    }
  }

  console.log("\nSuccess! Your Shopify connection is working.");
}

main().catch((err) => {
  console.error("Failed:", err.message);
  if (err.response) {
    console.error("Response:", JSON.stringify(err.response.body, null, 2));
  }
  process.exit(1);
});
```

### Step 4: Run It

```bash
npx tsx hello-shopify.ts
# Or compile first:
npx tsc hello-shopify.ts && node hello-shopify.js
```

## Output

Expected console output:

```
Store: My Dev Store
Currency: USD

Products:
  - Classic T-Shirt (ACTIVE, 150 in stock)
      Variant: Small — $29.99 (SKU: TSH-SM)
      Variant: Medium — $29.99 (SKU: TSH-MD)
      Variant: Large — $29.99 (SKU: TSH-LG)
  - Coffee Mug (ACTIVE, 42 in stock)
      Variant: Default Title — $14.99 (SKU: MUG-01)

Success! Your Shopify connection is working.
```

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `HttpResponseError: 401 Unauthorized` | Invalid or revoked access token | Regenerate token in Shopify admin > Settings > Apps |
| `HttpResponseError: 403 Forbidden` | Token lacks required scopes | Enable `read_products` scope in app config |
| `HttpResponseError: 404 Not Found` | Wrong store domain or API version | Verify store URL is `*.myshopify.com` |
| `ENOTFOUND your-store.myshopify.com` | Store domain typo or DNS issue | Double-check `SHOPIFY_STORE` value |
| `GraphqlQueryError` with `userErrors` | Invalid query syntax | Check field names against API version docs |
| `MODULE_NOT_FOUND @shopify/shopify-api` | Package not installed | Run `npm install @shopify/shopify-api` |

## Examples

### Create a Product via GraphQL Mutation

```typescript
const response = await client.request(`
  mutation productCreate($input: ProductCreateInput!) {
    productCreate(product: $input) {
      product {
        id
        title
        handle
      }
      userErrors {
        field
        message
      }
    }
  }
`, {
  variables: {
    input: {
      title: "Hello World Product",
      descriptionHtml: "<p>Created via Shopify API</p>",
      vendor: "My App",
      productType: "Test",
      tags: ["api-created", "hello-world"],
    },
  },
});

if (response.data.productCreate.userErrors.length > 0) {
  console.error("Errors:", response.data.productCreate.userErrors);
} else {
  console.log("Created:", response.data.productCreate.product.title);
}
```

### REST Admin API (Legacy but Still Supported)

```typescript
const restClient = new shopify.clients.Rest({ session });

// GET /admin/api/2024-10/products.json
const { body } = await restClient.get({
  path: "products",
  query: { limit: 5, status: "active" },
});

console.log("Products:", body.products.map((p: any) => p.title));
```

## Resources

- [Shopify GraphQL Admin API Reference](https://shopify.dev/docs/api/admin-graphql/latest)
- [Getting Started with GraphQL](https://shopify.dev/docs/apps/build/graphql/basics/queries)
- [REST Admin API Reference](https://shopify.dev/docs/api/admin-rest)
- [Shopify API Versioning](https://shopify.dev/docs/api/usage/versioning)

## Next Steps

Proceed to `shopify-local-dev-loop` for development workflow setup.

Related Skills

workhuman-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman hello world for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman hello world".

wispr-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow hello world for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr hello world".

windsurf-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Create your first Windsurf Cascade interaction and Supercomplete experience. Use when starting with Windsurf, testing your setup, or learning basic Cascade and Supercomplete workflows. Trigger with phrases like "windsurf hello world", "windsurf example", "windsurf quick start", "first windsurf project", "try windsurf".

webflow-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Create a minimal working Webflow Data API v2 example. Use when starting a new Webflow integration, testing your setup, or learning basic Webflow API patterns — list sites, read CMS collections, create items. Trigger with phrases like "webflow hello world", "webflow example", "webflow quick start", "simple webflow code", "first webflow API call".

vercel-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Create a minimal working Vercel deployment with a serverless API route. Use when starting a new Vercel project, testing your setup, or learning basic Vercel deployment and API route patterns. Trigger with phrases like "vercel hello world", "vercel example", "vercel quick start", "simple vercel project", "first vercel deploy".

veeva-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault hello world with REST API and VQL. Use when integrating with Veeva Vault for life sciences document management. Trigger: "veeva hello world".

vastai-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Rent your first GPU instance on Vast.ai and run a workload. Use when starting a new Vast.ai integration, testing your setup, or learning basic Vast.ai GPU rental patterns. Trigger with phrases like "vastai hello world", "vastai example", "vastai quick start", "rent first gpu", "vastai first instance".

twinmind-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Create your first TwinMind meeting transcription and AI summary. Use when starting with TwinMind, testing your setup, or learning basic transcription and summary patterns. Trigger with phrases like "twinmind hello world", "first twinmind meeting", "twinmind quick start", "test twinmind transcription".

together-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Run inference with Together AI -- chat completions, streaming, and model selection. Use when testing open-source models, comparing model performance, or learning the Together AI API. Trigger: "together hello world, together AI example, run llama".

techsmith-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Capture a screenshot with Snagit COM API and produce a Camtasia video. Use when automating screen captures, batch-processing recordings, or building documentation pipelines with TechSmith tools. Trigger: "techsmith hello world, snagit capture, camtasia render".

supabase-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Run your first Supabase query — insert a row and read it back. Use when starting a new Supabase project, verifying your connection works, or learning the basic insert-then-select pattern with @supabase/supabase-js. Trigger with phrases like "supabase hello world", "first supabase query", "supabase quick start", "test supabase connection", "supabase insert and select".

stackblitz-hello-world

1868
from jeremylongshore/claude-code-plugins-plus-skills

Boot a WebContainer, mount files, install npm packages, and run a dev server in the browser. Use when learning WebContainers, building browser-based IDEs, or running Node.js without a backend server. Trigger: "stackblitz hello world", "webcontainer example", "run node in browser".