← 返回 Skills 市场
arnif

Krónan

作者 arnif · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ⚠ suspicious
176
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install kronan
功能描述
Comprehensive CLI for Krónan.is grocery store using the official Public API. Search products, browse categories, manage shopping cart and lists, view orders,...
使用说明 (SKILL.md)

kronan-cli

CLI tool for shopping at Krónan.is, Iceland's grocery store chain. Uses the official Krónan Public API. Designed for both humans and AI agents.

Prerequisites

Install

gh repo clone arnif/kronan-cli /tmp/kronan-cli && bash /tmp/kronan-cli/install.sh

What this does: clones the repo to /tmp/kronan-cli, then install.sh downloads a pre-built binary from the latest GitHub release and places it at ~/.local/bin/kronan (override with INSTALL_DIR).

To build from source instead:

gh repo clone arnif/kronan-cli && cd kronan-cli
bun install && bun build --compile src/index.ts --outfile kronan
mv kronan ~/.local/bin/

Security and privacy

  • Install script: install.sh executes on your machine and downloads a binary. Audit the repository and the script before running.
  • Token storage: Access tokens are stored at ~/.kronan/token. These are credentials for the Krónan Public API. Ensure the file is only readable by your user (chmod 600 ~/.kronan/token).
  • PII: kronan me outputs your identity information (name and type - user or customer group). Be careful when sharing this output.
  • API Access: Tokens are created in your Krónan account settings and can be revoked at any time at https://kronan.is/adgangur/adgangslyklar

Authentication

First, create an access token:

  1. Go to https://kronan.is/adgangur/adgangslyklar
  2. Log in with Auðkenni (Icelandic e-ID)
  3. Create a new access token

Then save it with the CLI:

kronan token \x3Cyour-access-token>

The token will be validated and saved locally.

kronan logout    # Clear stored token
kronan status    # Check authentication status

Commands

Search products

kronan search "mjolk"
kronan search "epli" --limit 5
kronan search "braud" --json

Product details

kronan product \x3Csku>
kronan product 02500188 --json

Browse by category

kronan categories                    # List all categories
kronan category 01-01-02-epli        # Browse products in category

Cart management

kronan cart                         # View cart
kronan cart add \x3Csku> [quantity]    # Add item to cart
kronan cart clear                   # Clear all items from cart

Order history and modifications

kronan orders                # Recent orders
kronan orders --json         # JSON output for parsing
kronan order \x3Ctoken>         # Specific order details (use order token, not ID)

# Modify orders (before fulfillment)
kronan order delete-lines \x3Ctoken> \x3ClineId1> [lineId2...]
kronan order lower-quantity \x3Ctoken> \x3ClineIds...> --quantity N
kronan order toggle-substitution \x3Ctoken> \x3ClineIds...>

Product lists (full CRUD)

kronan lists                                    # List all product lists
kronan lists create \x3Cname> [--description "..."] # Create new list
kronan lists view \x3Ctoken>                       # View list details
kronan lists delete \x3Ctoken> [--force]           # Delete a list
kronan lists add \x3Clist-token> \x3Csku> [qty]       # Add item to list
kronan lists remove \x3Clist-token> \x3Csku>          # Remove item from list
kronan lists clear \x3Ctoken> [--force]            # Clear all items

Shopping notes (Skundalisti)

kronan notes                                    # View shopping note
kronan notes add [--text "..."] [--sku SKU] [--quantity N]
kronan notes update \x3Cline-token> [--text "..."] [--quantity N]
kronan notes remove \x3Cline-token>                # Remove item
kronan notes toggle \x3Cline-token>               # Mark complete/incomplete
kronan notes clear [--force]                   # Clear all items
kronan notes archived                          # View completed items

Purchase statistics

kronan stats [--limit N] [--offset N]          # View purchase history
kronan stats --include-ignored                 # Include hidden products
kronan stats ignore \x3Cid>                       # Hide product from stats
kronan stats unignore \x3Cid>                     # Unhide product

User identity

kronan me              # Show current identity (user or customer group)
kronan me --json

AI Agent Usage

All commands support --json for structured output. This makes kronan-cli suitable as a tool for AI agents managing grocery shopping.

Important: Commands that change state can modify the user's real data. Agents must ask for explicit user confirmation before running any state-changing command.

State-changing commands:

  • cart add, cart clear
  • order delete-lines, order lower-quantity, order toggle-substitution
  • lists create, lists delete, lists add, lists remove, lists clear
  • notes add, notes update, notes remove, notes toggle, notes clear
  • stats ignore, stats unignore

Read-only commands are safe to run without confirmation:

  • search, product, categories, category
  • orders, order (view)
  • cart (view)
  • lists (view)
  • notes (view), notes archived
  • stats (view)
  • me, status

Example agent workflows

Build a weekly cart from frequently purchased items:

# 1. Get purchase statistics to find frequently bought items
kronan stats --limit 50 --json

# 2. Add top items to cart at their typical quantities
kronan cart add 100224198 6    # Nýmjólk x6
kronan cart add 02200946 1     # Heimilisbrauð

# 3. Review the cart
kronan cart --json

Create a shopping list for a recipe:

# 1. Create a new list
kronan lists create "Pizza Night" --description "Ingredients for homemade pizza"

# 2. Search for products and add to list
kronan search "mozzarella" --json
kronan lists add \x3Clist-token> 100246180 2

kronan search "pizzasósa" --json
kronan lists add \x3Clist-token> 100221958 1

# 3. View the completed list
kronan lists view \x3Clist-token>

Manage shopping with notes (Skundalisti):

# 1. Add items to shopping note
kronan notes add --text "Mjólk"
kronan notes add --sku 100224198 --quantity 2

# 2. Mark items as you shop
kronan notes toggle \x3Cline-token>

# 3. View remaining items
kronan notes

# 4. View completed items
kronan notes archived

Analyze and optimize purchases:

# View purchase frequency for all products
kronan stats --json

# Hide irrelevant products from stats
kronan stats ignore \x3Cid>

Flags

Flag Description
--json Structured JSON output (for AI agents)
--page \x3Cn> Page number (search, category)
--limit \x3Cn> Results per page
--offset \x3Cn> Offset for pagination
--include-ignored Include ignored products in stats
--force Skip confirmation for destructive operations
--text "..." Text for shopping note item
--sku SKU Product SKU
--quantity N Quantity (default: 1)
--description "..." Description for product list

API Reference

The CLI uses the official Krónan Public API at https://api.kronan.is/api/v1/.

API Documentation:

Key endpoints:

Endpoint Method Auth Description
/products/search/ POST Yes Product search
/products/{sku}/ GET Yes Product detail
/categories/ GET Yes Category tree
/categories/{slug}/products/ GET Yes Category products
/checkout/ GET Yes View checkout/cart
/checkout/lines/ POST Yes Add/replace checkout lines
/orders/ GET Yes Order history
/orders/{token}/ GET Yes Order details
/orders/{token}/delete-lines/ POST Yes Delete order lines
/orders/{token}/lower-quantity-lines/ POST Yes Lower line quantity
/orders/{token}/lines-toggle-substitution/ POST Yes Toggle substitution
/me/ GET Yes Current identity
/product-lists/ GET/POST Yes List/create product lists
/product-lists/{token}/ GET/PATCH/DELETE Yes Product list CRUD
/product-lists/{token}/update-item/ POST Yes Add/update list item
/shopping-notes/ GET Yes View shopping note
/shopping-notes/add-line/ POST Yes Add note line
/shopping-notes/change-line/ PATCH Yes Update note line
/shopping-notes/delete-line/ DELETE Yes Delete note line
/shopping-notes/toggle-complete-on-line/ PATCH Yes Toggle completion
/product-purchase-stats/ GET Yes Purchase statistics
/product-purchase-stats/{id}/set-ignored/ PATCH Yes Ignore/unignore product

Auth header format: Authorization: AccessToken {token}

Migration from v0.1.x

If you were using the previous version with Cognito authentication:

  1. Remove old tokens: rm ~/.kronan/tokens.json
  2. Get a new access token from https://kronan.is/adgangur/adgangslyklar
  3. Run kronan token \x3Cnew-token>
  4. Update any scripts using kronan login to use kronan token instead

Note: Order IDs in the new API are tokens (UUIDs), not numeric IDs.

Version History

  • v0.3.0 - Added comprehensive commands: categories, order modifications, product lists CRUD, shopping notes, purchase statistics
  • v0.2.0 - Migrated to Krónan Public API with AccessToken authentication
  • v0.1.0 - Initial release with Cognito authentication
安全使用建议
This skill appears to be what it says (a CLI for Krónan) but there are two things to check before installing: (1) metadata mismatch — the registry claims no required binaries/config paths while SKILL.md does; verify the registry entry and be cautious if the platform auto-installs or auto-permissions the skill. (2) the install process clones a GitHub repo and runs install.sh that downloads a prebuilt binary — do not run that script blindly. Actions to take: inspect the repository and install.sh yourself (or in a sandbox), check release asset checksums/signatures if provided, verify the binary's contents or build from source if you prefer (bun build option), and keep your Krónan access token secure (store it with chmod 600 and revoke it if you suspect compromise). If you plan to let an AI agent use this tool, require explicit user confirmation for any state-changing commands and consider restricting autonomous invocation until you trust the installed binary. If you want higher assurance, ask the publisher to update the registry metadata to reflect the declared binaries and config path.
功能分析
Type: OpenClaw Skill Name: kronan Version: 1.0.3 The skill bundle provides a comprehensive CLI tool for the Krónan.is grocery store, utilizing its official public API. The documentation in SKILL.md is well-structured, including clear security warnings about API token storage (~/.kronan/token) and explicit instructions for AI agents to require user confirmation for state-changing operations. While the installation method involves executing a shell script from a GitHub repository, the process is transparently documented and includes a 'build from source' alternative, showing no signs of malicious intent or deceptive behavior.
能力标签
cryptocan-make-purchasesrequires-oauth-token
能力评估
Purpose & Capability
The SKILL.md describes a Krónan CLI that legitimately needs an API access token and (optionally) build/install tooling. However the registry metadata included with the skill claims no required binaries or config paths, while the SKILL.md explicitly lists required binaries (gh, bun) and a config path (~/.kronan/token). That metadata mismatch is incoherent and could hide permission/requirement info from install-time checks.
Instruction Scope
The instructions are scoped to the CLI's purpose (search, cart, lists, orders) and explicitly call out which commands are state-changing and require confirmation. They also instruct storing an API token at ~/.kronan/token. The one scope risk is that the instructions advise cloning a GitHub repo and running its install.sh which will execute on the user's machine — this is outside pure read-only usage and should be audited.
Install Mechanism
There is no formal install spec in the registry; install steps are described in SKILL.md: gh repo clone arnif/kronan-cli && bash /tmp/kronan-cli/install.sh. The install.sh downloads a pre-built binary from the repository's latest release and installs it to ~/.local/bin. Downloading and running a script/binary from a repo is a moderate risk but the source is a GitHub repo (a common release mechanism). The SKILL.md does warn to audit the repo/install script before running.
Credentials
The only credential material the skill needs is an access token for Krónan's Public API stored at ~/.kronan/token — that is proportionate to the CLI's purpose. However, the skill's registry metadata claims no required config paths or binaries while SKILL.md requires them; that discrepancy is a concern because it can misrepresent the permissions/paths the skill will touch. No unrelated secrets or cross-service credentials are requested.
Persistence & Privilege
The skill does not request always:true, does not declare persistent elevated privileges, and is user-invocable only. It does instruct the user to store a token under the user's home directory, which is normal for a CLI. Autonomous invocation is permitted (platform default) but SKILL.md advises agents to ask for confirmation before state changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kronan
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kronan 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
**Summary:** Major upgrade with expanded features and migration to the official Krónan Public API. - Now uses Krónan's official Public API (token setup via user account, not SIM/eID). - Adds full CRUD for product lists and shopping notes (Skundalisti). - New commands: categories, category browsing, stats (purchase statistics), shopping notes, robust list management. - Cart and order management updated with new features, including cart clear and advanced order modifications. - Help, security, and agent usage documentation expanded and revised. - **Breaking changes:** different token storage location (`~/.kronan/token`), updated authentication/login flow, and new/changed commands.
v1.0.2
- Added explicit information on required binaries (GitHub CLI and Bun) and token storage paths. - Documented the safety distinction between read-only and state-changing commands. - Stated that agents must seek explicit user confirmation before running state-changing commands (e.g., cart modification, login). - Improved prerequisites and AI agent usage guidance for enhanced safety and clarity.
v1.0.1
- Added detailed installation instructions and prerequisites, including build-from-source steps. - Clarified authentication process and requirements for Icelandic phone number and Rafraen skilriki. - Expanded Security and Privacy section explaining token storage, PII exposure, and credential security. - Improved descriptions for command usage, especially for commands that output sensitive information. - Updated the description frontmatter to better explain install process, requirements, and token storage location.
v1.0.0
Initial release of kronan-cli, a command-line tool for shopping at Kronan.is. - Search and view product details from Kronan's inventory. - Manage your shopping cart: add, update, and remove items. - View order history and specific order details. - Authenticate securely using Icelandic electronic ID (Rafraen skilriki). - Designed for both human users and AI agents, with full JSON output support.
元数据
Slug kronan
版本 1.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Krónan 是什么?

Comprehensive CLI for Krónan.is grocery store using the official Public API. Search products, browse categories, manage shopping cart and lists, view orders,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 176 次。

如何安装 Krónan?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kronan」即可一键安装,无需额外配置。

Krónan 是免费的吗?

是的,Krónan 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Krónan 支持哪些平台?

Krónan 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Krónan?

由 arnif(@arnif)开发并维护,当前版本 v1.0.3。

💬 留言讨论