Install
openclaw skills install afol-brickeconomyUse the BrickEconomy API through the included CLI for LEGO set/minifig valuation, collection performance, and sales-ledger analysis from verified Brick Directory references.
openclaw skills install afol-brickeconomyUse this skill when the user asks about LEGO set values, minifig values, BrickEconomy collection valuation, collection growth, investment performance, forecasts, ROI, or sales-ledger profit/loss.
Primary interface: scripts/brickeconomy.
The skill is self-contained for archive distribution and wraps the BrickEconomy API directly using checked-in references inside this skill directory:
references/openapi/brickeconomy.yamlreferences/prompts/brickeconomy-tools.txtscripts/brickeconomy_cli.pyDo not scrape vendor docs or invent parameters when the checked-in OpenAPI reference covers the endpoint. If the reference is insufficient, say what is missing.
Required environment variable:
export BRICKECONOMY_API_KEY=...
Optional override:
export BRICKECONOMY_BASE_URL=https://www.brickeconomy.com/api/v1
Never print, commit, log, or paste the real API key. Commands should reference $BRICKECONOMY_API_KEY only indirectly through the CLI.
BrickEconomy auth placement matters: every API call sends the key as the x-apikey HTTP header, not as a query parameter or form field. The CLI handles that, which is the main reason to use it instead of ad-hoc curl.
Run commands from this skill directory:
scripts/brickeconomy --help
scripts/brickeconomy set --set-number 10236-1 --currency EUR
scripts/brickeconomy minifig --minifig-number sw0509 --currency USD
scripts/brickeconomy collection-sets --currency EUR
scripts/brickeconomy collection-minifigs --currency EUR
scripts/brickeconomy sales-ledger
All commands are read-only. Use --dry-run to inspect request shape without requiring an API key or calling BrickEconomy:
scripts/brickeconomy set --dry-run --set-number 10236-1 --currency EUR
scripts/brickeconomy sales-ledger --dry-run
The checked-in BrickEconomy spec for this skill contains only read-only GET endpoints:
setminifigcollection-setscollection-minifigssales-ledgerThere are no collection mutation, marketplace listing, order update, wishlist, delete, or bulk-update endpoints in this skill archive.
Still be careful:
--yes; keep --dry-run available.| Workflow | CLI command | Method/path | Operation | Notes |
|---|---|---|---|---|
| Set value | set --set-number 10236-1 --currency EUR | GET /set/{setNumber} | getSet | Accepts set numbers with or without variant suffix, for example 10236 or 10236-1. Supports optional currency. |
| Minifig value | minifig --minifig-number sw0509 --currency USD | GET /minifig/{minifigNumber} | getMinifig | Accepts BrickEconomy minifig numbers such as sw0509. Supports optional currency. |
| Collection sets | collection-sets --currency EUR | GET /collection/sets | getCollectionSets | Returns all authenticated set collection entries with paid price, current value, growth, acquisition, condition, and collection fields. |
| Collection minifigs | collection-minifigs --currency EUR | GET /collection/minifigs | getCollectionMinifigs | Returns all authenticated minifig collection entries with paid price, current value, growth, acquisition, and collection fields. |
| Sales ledger | sales-ledger | GET /salesledger | getSalesLedger | Returns set and minifig sale records with sale price, fees/shipping, quantity, buy price, dates, condition, and notes. No currency parameter is defined for this endpoint in the spec. |
Supported currency codes from the spec: USD, GBP, CAD, AUD, CNY, KRW, EUR, JPY, CHF, INR, BRL, RUB, ZAR, MXN, SGD, HKD, SEK, NZD, NOK, TRY, DKK, PLN. API default is USD.
Known BrickEconomy limits from references/prompts/brickeconomy-tools.txt: 100 requests/day and 4 requests/minute. Be stingy: one collection call is better than N individual set calls when analyzing a user's portfolio.
All analysis must be grounded in API response fields. Do not fill missing values from memory, web search, BrickLink, or another provider unless the user explicitly asks for multi-provider fallback and you name the source.
For set value responses, use fields such as:
current_value_new, current_value_used, current_value_used_low, current_value_used_highforecast_value_new_2_years, forecast_value_new_5_yearsrolling_growth_lastyear, rolling_growth_12monthsprice_events_new, price_events_usedretired, released_date, retired_date, retail_price_*, currencyFor minifig value responses, use fields such as:
set_count, sets, theme, subtheme, year, currencyFor collection analysis:
collection-sets or collection-minifigs over repeated individual lookups.For sales-ledger analysis:
Local, no-network checks:
python3 -m py_compile scripts/brickeconomy_cli.py
scripts/brickeconomy set --dry-run --set-number 10236-1 --currency EUR
scripts/brickeconomy sales-ledger --dry-run
Live smoke checks, only when BRICKECONOMY_API_KEY is configured:
scripts/brickeconomy set --set-number 10236-1 --currency USD
scripts/brickeconomy minifig --minifig-number sw0509 --currency USD
Summarize only response shape, for example top-level keys and whether data is an object/list. Do not paste full collection or sales-ledger data into reports.
BrickEconomy is appropriate for:
BrickEconomy is not appropriate for:
If the user asks for part prices, seller availability, or buy/sell marketplace actions, route to the relevant BrickLink or BrickOwl skill instead of forcing BrickEconomy.
Before committing changes to this skill:
python3 -m unittest discover -s tests -p 'test_*.py'
scripts/validate-skills.sh
git diff --check