Skip to content

flitzrrr/agent-skills / skills/product-description-seo

product-description-seo

Verified

End-to-end skill for SEO-optimized product descriptions: inventory analysis, generation, quality assurance, catalog update, and deployment. Use whenever the user wants to analyze, write, check, update, or deploy product descriptions — whether for a single product, a category, or an entire catalog. Triggers on: 'product description', 'Produktbeschreibung', 'SEO text', 'catalog text', 'update descriptions', 'which descriptions are missing', 'thin content', 'QA check', 'description quality', or when the user names a product category and wants texts for it. Also triggers on 'deploy' or 'commit' in the context of product descriptions.

FileKindSize
CROSS-SELL.mdmarkdown1.9 KB
KEYWORDS.mdmarkdown1.3 KB
SKILL.mdskill md12.5 KB
scripts/analyze_catalog.pyscript4.8 KB
scripts/check_quality.pyscript7.5 KB
scripts/extract_category.pyscript2.9 KB
scripts/track_progress.pyscript5.0 KB
scripts/update_catalog.pyscript2.3 KB
scripts/validate_json.pyscript2.5 KB

scripts/update_catalog.py

View on GitHub
#!/usr/bin/env python3
"""Write updated product descriptions back to a catalog JSON file.

Usage:
    python update_catalog.py <catalog.json> <updates.json>

updates.json format:
[
  {"sku": "401", "beschreibung": "New description text..."},
  {"sku": "402", "beschreibung": "Another description..."}
]

Creates an automatic backup before writing.
"""

import json
import sys
import argparse
import shutil
from datetime import datetime

DESC_FIELD = "beschreibung"
SKU_FIELD = "sku"
NAME_FIELD = "name"


def main():
    parser = argparse.ArgumentParser(description="Write updated descriptions back to catalog JSON")
    parser.add_argument("catalog_path", help="Path to catalog JSON file")
    parser.add_argument("updates_path", help="Path to updates JSON file")
    args = parser.parse_args()

    catalog_path = args.catalog_path
    updates_path = args.updates_path

    with open(catalog_path, "r", encoding="utf-8") as f:
        catalog = json.load(f)

    with open(updates_path, "r", encoding="utf-8") as f:
        updates = json.load(f)

    # Support both "beschreibung" and "description" field names in updates
    update_map = {}
    for u in updates:
        desc = u.get(DESC_FIELD, u.get("description", ""))
        update_map[u[SKU_FIELD]] = desc

    # Create backup
    timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
    backup_path = f"{catalog_path}.backup_{timestamp}"
    shutil.copy2(catalog_path, backup_path)
    print(f"Backup created: {backup_path}")

    updated = 0
    not_found = []

    for product in catalog.get("products", []):
        sku = product.get(SKU_FIELD, "")
        if sku in update_map:
            old_wc = len(product.get(DESC_FIELD, "").split())
            product[DESC_FIELD] = update_map[sku]
            new_wc = len(update_map[sku].split())
            print(f"  [+] SKU {sku}: {product.get(NAME_FIELD, '?')} ({old_wc} -> {new_wc} words)")
            updated += 1
            del update_map[sku]

    for sku in update_map:
        not_found.append(sku)
        print(f"  [-] SKU {sku}: Not found in catalog")

    with open(catalog_path, "w", encoding="utf-8") as f:
        json.dump(catalog, f, ensure_ascii=False, indent="\t")

    print(f"\n{updated} descriptions updated.")
    if not_found:
        print(f"{len(not_found)} SKUs not found: {', '.join(not_found)}")


if __name__ == "__main__":
    main()
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall