PranavNagrecha/AwesomeSalesforceSkills / skills/admin/consumer-goods-cloud-setup
consumer-goods-cloud-setup
VerifiedConsumer Goods Cloud setup: visit execution, retail execution, route planning, in-store task management, compliance checks, off-shelf detection, image recognition. NOT for territory planning and route optimization for sales reps - use integration/salesforce-maps-setup. NOT for B2B Commerce storefronts - use admin/b2b-commerce-store-setup.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.7 KB |
| references/examples.md | markdown | 7.0 KB |
| references/gotchas.md | markdown | 6.5 KB |
| references/llm-anti-patterns.md | markdown | 3.2 KB |
| references/well-architected.md | markdown | 5.7 KB |
| scripts/check_consumer_goods_cloud_setup.pyexecutable | script | 3.3 KB |
| templates/consumer-goods-cloud-setup-template.md | markdown | 639 B |
scripts/check_consumer_goods_cloud_setup.py
View on GitHub#!/usr/bin/env python3
"""Checker script for Consumer Goods Cloud Setup skill.
Scans a Salesforce metadata manifest for CG Cloud anti-patterns:
- Flows named like manual visit generators (should use RoutePlan)
- External vision-API callouts instead of Salesforce Image Recognition
- Account metadata with flat retail hierarchy fields but no ParentId usage
Usage:
python3 check_consumer_goods_cloud_setup.py [--manifest-dir path/to/metadata]
"""
from __future__ import annotations
import argparse
import re
import sys
from pathlib import Path
VISIT_GEN_NAME_PAT = re.compile(r"(?i)(generate|create|weekly)_?visit")
EXTERNAL_VISION_PAT = re.compile(
r"(?i)(rekognition\.amazonaws\.com|vision\.googleapis\.com|api\.cognitive\.microsoft\.com/vision)"
)
RETAILER_FIELD_PAT = re.compile(r"(?i)<fullName>(retailer_?name|banner_?name)__c</fullName>")
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Check CG Cloud configuration for common issues.")
parser.add_argument("--manifest-dir", default=".", help="Root directory of Salesforce metadata.")
return parser.parse_args()
def check_manual_visit_generators(root: Path) -> list[str]:
issues: list[str] = []
for sub in ("flows", "classes"):
base = root / sub
if not base.exists():
continue
for path in base.rglob("*"):
if path.is_file() and VISIT_GEN_NAME_PAT.search(path.stem):
issues.append(
f"{path.relative_to(root)}: looks like a manual Visit generator; prefer RoutePlan regeneration"
)
return issues
def check_external_vision(root: Path) -> list[str]:
issues: list[str] = []
for path in root.rglob("*.xml"):
if not path.is_file():
continue
try:
text = path.read_text(encoding="utf-8", errors="ignore")
except OSError:
continue
if EXTERNAL_VISION_PAT.search(text):
issues.append(
f"{path.relative_to(root)}: external vision API referenced; prefer Salesforce Image Recognition"
)
return issues
def check_flat_retailer_fields(root: Path) -> list[str]:
issues: list[str] = []
account_dir = root / "objects" / "Account"
if not account_dir.exists():
return issues
for field in account_dir.rglob("*.field-meta.xml"):
try:
text = field.read_text(encoding="utf-8")
except OSError:
continue
if RETAILER_FIELD_PAT.search(text):
issues.append(
f"{field.relative_to(root)}: flat retailer/banner field on Account; prefer Account hierarchy via ParentId"
)
return issues
def main() -> int:
args = parse_args()
manifest_dir = Path(args.manifest_dir)
if not manifest_dir.exists():
print(f"ERROR: manifest directory not found: {manifest_dir}", file=sys.stderr)
return 1
issues: list[str] = []
issues.extend(check_manual_visit_generators(manifest_dir))
issues.extend(check_external_vision(manifest_dir))
issues.extend(check_flat_retailer_fields(manifest_dir))
if not issues:
print("No CG Cloud anti-patterns detected.")
return 0
for issue in issues:
print(f"ISSUE: {issue}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |