Agent skill

Kroger CLI Reference

Complete reference guide for using the Kroger CLI to search products, manage your cart, and automate grocery shopping at King Sooppers. Use this when you need to understand Kroger CLI commands, syntax, best practices for product selection, or troubleshoot Kroger operations.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/cschneid/kroger-cli/tree/main/claude-skill/kroger-api

SKILL.md

Instructions

This skill provides comprehensive documentation for the Kroger CLI tool, which enables command-line automation of grocery shopping at King Sooppers (a Kroger store).

Use this skill when you need to:

  • Understand how to use Kroger CLI commands
  • Reference product search and cart management syntax
  • Learn best practices for product selection
  • Troubleshoot authentication or store issues
  • Get examples of common operations

Overview

The Kroger CLI is a command-line tool for interacting with King Sooppers for automated shopping. It provides authentication, product search, and cart management capabilities.

Getting Started

Prerequisites

  • The kroger command is available in $PATH and executable directly
  • Kroger account with API authentication configured

Authentication & Sessions

bash
kroger auth          # Check current API authentication status
kroger login         # Login to your Kroger account (use if auth fails)
kroger logout        # Logout from your account

Important Notes:

  • Assume kroger auth is already valid before starting operations
  • If authentication fails, run kroger login and wait for the response
  • Authentication persists across sessions

Store Management

Available Commands

bash
kroger store show     # Show currently selected store
kroger store set [ID] # Set your default store
kroger stores [ZIP]   # Search for stores by ZIP code

Assumptions:

  • The store is already set; no need to reconfigure unless switching locations
  • All operations default to the currently set store

Product Operations

Search & Discovery

bash
kroger products "search term"     # Search for products by name/type
kroger product [ID/UPC]           # Get detailed info on a specific product

Examples:

bash
kroger products "organic milk"
kroger products "chicken breast"
kroger product 0001111041700      # Get details for a specific UPC

Product Selection Guidelines

When searching for products, consider:

  1. Brand Preferences

    • Follow explicit preferences when available
  2. Default Selection Strategy

    • Prefer midrange brands on sale when no specific preference exists
    • Look for good value relative to quality
  3. Quantity & Size Matching

    • Carefully match product quantity and size to the meal plan
    • Consider expected usage patterns for the week
    • Account for storage capacity and product shelf life

Cart Operations

Add to Cart

bash
kroger cart add [UPC]              # Add item to cart (single unit)
kroger cart add [UPC] -q 2         # Add item with specific quantity

Examples:

bash
kroger cart add 0001111041700
kroger cart add 0001111041700 -q 2

Requirements:

  • Cart operations require valid login (kroger auth must pass)
  • Assume cart starts empty (API doesn't allow checking existing items)

Tips & Best Practices

  1. Search Thoroughly - Try multiple search terms if needed to find alternatives
  2. Check Details - Use kroger product [UPC] to verify prices, sizes, and ratings before adding
  3. Batch Operations - Add multiple items in sequence for efficiency
  4. Quantity Planning - Use -q flag to add multiple units of the same product in one command
  5. Sales & Deals - Look for sale prices when no brand preference is specified

Troubleshooting

  • Auth Failed: Run kroger login and complete the login flow
  • Product Not Found: Try alternative search terms or check spelling
  • Store Issues: Verify store is set with kroger store show

More Help

bash
kroger [command] --help    # Get detailed help for any command

Expand your agent's capabilities with these related and highly-rated skills.

mattpocock/skills

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

111,310 9,758
Explore
mattpocock/skills

scaffold-exercises

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

111,310 9,758
Explore
mattpocock/skills

migrate-to-shoehorn

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

111,310 9,758
Explore
mattpocock/skills

edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

111,310 9,758
Explore
mattpocock/skills

obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

111,310 9,758
Explore
mattpocock/skills

git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

111,310 9,758
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results