# Send Cart Management to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cart-management",
    "name": "Cart Management",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/konscious0beast/cart-management",
    "canonicalUrl": "https://clawhub.ai/konscious0beast/cart-management",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/cart-management",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cart-management",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "cart-management",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T06:19:38.247Z",
      "expiresAt": "2026-05-07T06:19:38.247Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cart-management",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cart-management",
        "contentDisposition": "attachment; filename=\"cart-management-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "cart-management"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cart-management"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cart-management",
    "downloadUrl": "https://openagent3.xyz/downloads/cart-management",
    "agentUrl": "https://openagent3.xyz/skills/cart-management/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cart-management/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cart-management/agent.md"
  }
}
```
## Documentation

### Cart Management Skill

Patterns for React cart state: duplicate prevention, persistence, context design.

### Duplicate Prevention

Track product IDs in CartContext (separate state or derived from cartItems)
Check productIdsInCart.includes(item.id) before add
Centralize logic in context, not in ProductCard or child components

### Persistence (localStorage)

Initialize cart state from localStorage.getItem('cart') on mount
Persist on every add/remove: localStorage.setItem('cart', JSON.stringify(cartItems))
Sync productIdsInCart if used: localStorage.setItem('cart_ids', JSON.stringify(ids))
Prevents duplicates across sessions (refresh, new tab)

### CartContext Pattern

const addToCart = (item: CartItem) => {
  if (!productIdsInCart.includes(item.id)) {
    setCartItems(prev => [...prev, item]);
    setProductIdsInCart(prev => [...prev, item.id]);
    localStorage.setItem('cart', JSON.stringify([...cartItems, item]));
  }
};

### Anti-Patterns

Don't add to cart in useEffect on ProductCard mount (causes duplicates)
Don't duplicate logic in multiple components – use context
Add backend validation as fallback for data integrity

### Quantity Updates

For same-product quantity: use cartItems.map() to update item.quantity, don't create duplicate entries.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: konscious0beast
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T06:19:38.247Z
- Expires at: 2026-05-07T06:19:38.247Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/cart-management)
- [Send to Agent page](https://openagent3.xyz/skills/cart-management/agent)
- [JSON manifest](https://openagent3.xyz/skills/cart-management/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/cart-management/agent.md)
- [Download page](https://openagent3.xyz/downloads/cart-management)