Logotipo de Shopify Admin Collection Reorganization

Shopify Admin Collection Reorganization

Organización
40RTY-ai
shopify-admin-collection-reorganization

Reorder products in a manual Shopify collection by inventory level, moving in-stock products to the top and out-of-stock to the bottom.

Descripción general

Editor40RTY-ai
Repositorioshopify-admin-skills
Nombre de la habilidadshopify-admin-collection-reorganization
Estrellas
200
Forks
22
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por 40RTY-ai en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Shopify Admin Collection Reorganization en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/40RTY-ai/shopify-admin-skills/tree/main/skills/merchandising/shopify-admin-collection-reorganization
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/40RTY-ai/shopify-admin-skills.git /tmp/shopify-admin-skills
mkdir -p .claude/skills
cp -r /tmp/shopify-admin-skills/skills/merchandising/shopify-admin-collection-reorganization .claude/skills/shopify-admin-collection-reorganization
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Shopify Admin Collection Reorganization en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Shopify Admin Collection Reorganization automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Shopify Admin Collection Reorganization no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Purpose

Reorders products in a manual Shopify collection by inventory level without navigating the Shopify admin UI. This skill queries all products in the collection, computes the desired sort order by totalInventory, and applies it in a single collectionReorderProducts mutation. Note: only works on manual (custom) collections — smart collections managed by Shopify rules are not supported.

Prerequisites

  • Authenticated Shopify CLI session: shopify auth login --store <domain>
  • API scopes: read_products, write_products

Parameters

ParameterTypeRequiredDefaultDescription
storestringyes—Store domain (e.g., mystore.myshopify.com)
formatstringnohumanOutput format: human or json
dry_runboolnofalsePreview operations without executing mutations
collection_idstringyes—GID of the manual collection (e.g., gid://shopify/Collection/123)
sort_bystringnoinventory_descinventory_desc (highest stock first) or inventory_asc (lowest stock first)

Safety

⚠️ Step 2 executes collectionReorderProducts which changes the product display order immediately. The sort is reversible — run again with the opposite sort_by to restore previous order — but the original custom order cannot be recovered once overwritten. The moves array passed to the mutation must be complete; partial moves produce undefined ordering. Always run with dry_run: true first to review the computed sort order before committing.

collectionReorderProducts only works on manual (custom) collections. If the collection has sortOrder other than MANUAL, the skill must abort with a clear message: "Cannot reorder: collection sort order is not MANUAL. Switch the collection to manual sorting in the Shopify admin first."

Workflow Steps

  1. OPERATION: collection — query Inputs: id: <collection_id>, first: 250, pagination cursor Expected output: Collection metadata (title, sortOrder) and all product nodes with totalInventory; verify sortOrder == "MANUAL" — abort if not; paginate until all products fetched

  2. OPERATION: collectionReorderProducts — mutation Inputs: id: <collection_id>, moves array sorted by totalInventory per sort_by parameter — each move is {id: <product_id>, newPosition: "<index>"} (0-indexed string) Expected output: job.id and job.done; userErrors

GraphQL Operations

graphql
# collection:query — validated against api_version 2025-01
query CollectionProducts($id: ID!, $first: Int!, $after: String) {
  collection(id: $id) {
    id
    title
    sortOrder
    products(first: $first, after: $after) {
      edges {
        node {
          id
          title
          totalInventory
          variants(first: 100) {
            edges {
              node {
                inventoryQuantity
              }
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        endCursor
      }
    }
  }
}
graphql
# collectionReorderProducts:mutation — validated against api_version 2025-01
mutation CollectionReorderProducts($id: ID!, $moves: [MoveInput!]!) {
  collectionReorderProducts(id: $id, moves: $moves) {
    job {
      id
      done
    }
    userErrors {
      field
      message
    }
  }
}

Session Tracking

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

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: collection-reorganization            ║
║  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>

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
  Collection:          <title>
  Products reordered:  <n>
  Sort order:          <inventory_desc|inventory_asc>
  Errors:              0
  Output:              none
══════════════════════════════════════════════

For format: json, emit:

json
{
  "skill": "collection-reorganization",
  "store": "<domain>",
  "started_at": "<ISO8601>",
  "completed_at": "<ISO8601>",
  "dry_run": false,
  "steps": [
    { "step": 1, "operation": "CollectionProducts", "type": "query", "params_summary": "collection_id: <gid>, first: 250", "result_summary": "<n> products fetched", "skipped": false },
    { "step": 2, "operation": "CollectionReorderProducts", "type": "mutation", "params_summary": "sort_by: inventory_desc, <n> moves", "result_summary": "job submitted", "skipped": false }
  ],
  "outcome": {
    "collection_title": "<title>",
    "products_reordered": 0,
    "sort_by": "inventory_desc",
    "errors": 0,
    "output_file": null
  }
}

Output Format

No CSV output. The skill reports the new sort order in the session completion summary. Use dry_run: true to preview the computed position list without committing.

Error Handling

ErrorCauseRecovery
sortOrder is not MANUALCollection is a smart/automated collectionSwitch collection to manual ordering in Shopify admin
userErrors in mutationInvalid product ID or positionCheck all product IDs belong to the collection
Collection not foundInvalid collection GIDVerify the GID in Shopify admin
Rate limit (429)Too many paginated requestsReduce first to 100 and retry

Best Practices

  1. Always run dry_run: true first — the skill will print the proposed product order so you can verify before committing.
  2. collectionReorderProducts is asynchronous — job.done may be false immediately. The sort completes within a few seconds; refresh the storefront to verify.
  3. Use sort_by: inventory_asc to push out-of-stock products to the bottom of the collection page, reducing customer frustration.
  4. For large collections (250+ products), pagination is automatic but increases execution time. Consider running during off-peak hours.
  5. This skill only reads totalInventory from the products node — it does not aggregate per-location. If you need location-specific sorting, use the low-inventory-restock skill to identify which products to prioritize.

Preguntas frecuentes

¿Qué hace la habilidad de IA Shopify Admin Collection Reorganization?

Reorder products in a manual Shopify collection by inventory level, moving in-stock products to the top and out-of-stock to the bottom.

¿Por qué usar Shopify Admin Collection Reorganization en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Shopify Admin Collection Reorganization está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Shopify Admin Collection Reorganization en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/40RTY-ai/shopify-admin-skills/tree/main/skills/merchandising/shopify-admin-collection-reorganization. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Shopify Admin Collection Reorganization?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Shopify Admin Collection Reorganization?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Shopify Admin Collection Reorganization con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Shopify Admin Collection Reorganization?

Sí. 40RTY-ai la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇