| name | configure |
| description | Use when a user is setting up the plugin for the first time or needs to update their API keys and preferred air quality data source. |
Configure Air Quality Toolkit
Set up or update the plugin's configuration: favourite data source, API tokens, and default location. Configuration is stored as JSON and reused by all other skills.
When to use
- First-run setup (no config.json exists)
- User wants to change their preferred data source
- User is adding or updating API tokens
- User is setting a default location for quick queries
Inputs to gather
- Favourite source:
waqi (World Air Quality Index), openaq (OpenAQ), or airelibre (AireLibre) — defaults to waqi if not specified
- WAQI API token: Required if
waqi is in the fallback chain. Free signup at https://aqicn.org/data-platform/token/
- OpenAQ API key (optional): For higher rate limits or historical access. https://docs.openaq.org/
- Default location (optional): City name or
lat,lon (e.g., Jerusalem or 31.7683,35.2137)
Procedure
- Load existing config from
${CLAUDE_USER_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/claude-plugins}/air-quality-toolkit/config.json if it exists.
- If config exists, show current values with masked tokens (last 4 characters only) and ask which fields to update. If no config, collect all fields.
- Validate inputs:
- Source must be one of:
waqi, openaq, airelibre.
- Tokens should be non-empty strings (only validate presence, not format).
- Default location: accept any non-empty string; validation happens at query time.
- Write config.json as prettified JSON with two-space indents.
- Confirm successful save with a summary of the active configuration (tokens masked).
Output / side effects
Config file written to ${CLAUDE_USER_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/claude-plugins}/air-quality-toolkit/config.json. Example structure:
{
"favourite_source": "waqi",
"default_location": "Jerusalem",
"waqi_token": "demo_token_abcd1234",
"openaq_key": null
}
User receives confirmation of what was saved. Next skills (retrieve-air-quality, historical-air-quality, etc.) will read this config automatically.
Safety / constraints
- Never display full API tokens or keys — show only the last 4 characters when confirming.
- If the user does not provide a WAQI token and selects
waqi as the favourite source, warn that queries will fail and point them to the configure skill to add the token.
- Do not validate token format (they may be in transition or have different formats per source).