← Back to Skills Marketplace
musketyr

AFOL BrickEconomy

by Vladimir Orany · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
11
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install afol-brickeconomy
Description
Use the BrickEconomy API through the included CLI for LEGO set/minifig valuation, collection performance, and sales-ledger analysis from verified Brick Direc...
README (SKILL.md)

BrickEconomy AFOL skill

Use 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:

  • OpenAPI reference: references/openapi/brickeconomy.yaml
  • Domain guidance: references/prompts/brickeconomy-tools.txt
  • CLI source: scripts/brickeconomy_cli.py

Do 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.

Authentication

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.

CLI quick reference

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

Safety rules

The checked-in BrickEconomy spec for this skill contains only read-only GET endpoints:

  • set
  • minifig
  • collection-sets
  • collection-minifigs
  • sales-ledger

There are no collection mutation, marketplace listing, order update, wishlist, delete, or bulk-update endpoints in this skill archive.

Still be careful:

  • Treat returned collection and sales-ledger data as private financial/account data.
  • Do not call personal collection or sales-ledger endpoints unless the user asked for personal collection, ROI, or sales analysis.
  • Do not fan out across many set/minifig lookups unless the user asked for bulk analysis and the 100 requests/day, 4 requests/minute limit budget is acceptable.
  • If a future BrickEconomy reference adds mutating endpoints, require explicit user confirmation in the current conversation and a mechanical guard such as --yes; keep --dry-run available.

Endpoint coverage

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.

Analysis rules

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_high
  • forecast_value_new_2_years, forecast_value_new_5_years
  • rolling_growth_lastyear, rolling_growth_12months
  • price_events_new, price_events_used
  • retired, released_date, retired_date, retail_price_*, currency

For minifig value responses, use fields such as:

  • current value fields
  • forecast and growth fields when present
  • set_count, sets, theme, subtheme, year, currency

For collection analysis:

  • Prefer collection-sets or collection-minifigs over repeated individual lookups.
  • Calculate ROI only from returned paid/acquisition value and current value fields.
  • Sort best performers by explicit growth percentage or absolute gain from the response; say which metric you used.
  • Do not hide low-confidence or missing paid-price rows inside totals; call out missing data.

For sales-ledger analysis:

  • Compute profit/loss only from returned sale price, fees, shipping, buy price, quantity, and dates.
  • Mention whether totals include fees/shipping based on fields present in the ledger response.
  • Keep buyer/order/note details private unless the user specifically needs them.

Read-only smoke checks

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 limitations and routing

BrickEconomy is appropriate for:

  • set and minifig valuation
  • forecasts and growth-rate analysis
  • authenticated collection valuation and performance
  • authenticated sales-ledger profit/loss analysis

BrickEconomy is not appropriate for:

  • individual part pricing
  • current marketplace offers/listings from sellers
  • collection mutation or marketplace inventory writes
  • BrickOwl/BrickLink catalog identifier lookup

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.

Verification

Before committing changes to this skill:

python3 -m unittest discover -s tests -p 'test_*.py'
scripts/validate-skills.sh
git diff --check
Usage Guidance
This skill is reasonable to install if you want BrickEconomy valuation and portfolio analysis and are comfortable providing a BrickEconomy API key. Be aware that collection and sales-ledger commands may return private financial/account details; ask for scoped summaries when appropriate, keep the API key out of transcripts, and do not point the base URL at an untrusted server.
Capability Analysis
Type: OpenClaw Skill Name: afol-brickeconomy Version: 1.0.0 The skill is a well-documented tool for LEGO set valuation and collection analysis using the BrickEconomy API. The Python CLI (scripts/brickeconomy_cli.py) uses standard libraries, implements proper URL encoding for path segments, and correctly handles authentication via environment variables. The instructions in SKILL.md and the prompt guidance in references/prompts/brickeconomy-tools.txt are aligned with the stated purpose and include explicit safety warnings regarding data privacy and API key handling.
Capability Tags
cryptocan-make-purchasesrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose, included CLI, and OpenAPI reference align around LEGO valuation, collection performance, and sales-ledger analysis. The sensitive part is expected for the purpose: authenticated collection and sales-ledger reads can expose private financial/account data.
Instruction Scope
SKILL.md gives reasonable limits, including read-only use and not calling personal endpoints unless requested. One reference prompt contains broader guidance about external pricing fallback and returning complete collections, so the main SKILL.md safety rules should take precedence.
Install Mechanism
There is no install spec and the Python CLI is self-contained. However, SKILL.md refers to scripts/brickeconomy while the manifest only includes scripts/brickeconomy_cli.py, and registry metadata does not declare the API-key environment variable that SKILL.md requires.
Credentials
The skill needs network access to BrickEconomy and a BRICKECONOMY_API_KEY. This is proportionate to the integration, but users should avoid setting BRICKECONOMY_BASE_URL or --base-url to untrusted hosts because the key is sent as an HTTP header.
Persistence & Privilege
No persistence, background agent behavior, local credential-store access, destructive file operations, or mutating account endpoints are shown in the provided code.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install afol-brickeconomy
  3. After installation, invoke the skill by name or use /afol-brickeconomy
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Release main
Metadata
Slug afol-brickeconomy
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is AFOL BrickEconomy?

Use the BrickEconomy API through the included CLI for LEGO set/minifig valuation, collection performance, and sales-ledger analysis from verified Brick Direc... It is an AI Agent Skill for Claude Code / OpenClaw, with 11 downloads so far.

How do I install AFOL BrickEconomy?

Run "/install afol-brickeconomy" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is AFOL BrickEconomy free?

Yes, AFOL BrickEconomy is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does AFOL BrickEconomy support?

AFOL BrickEconomy is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created AFOL BrickEconomy?

It is built and maintained by Vladimir Orany (@musketyr); the current version is v1.0.0.

💬 Comments