— No reviews yet
0 installs
15 views
0.0% view→install
Install
$ agentstack add skill-danielrosehill-claude-data-wrangler-plugin-add-iso3166 ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of Add Iso3166? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
Add ISO 3166 Country Codes
Add ISO 3166-1 codes to a dataset whose country column contains plain names.
When to invoke
- Dataset has a country column (named
country,nation,country_name, or similar) but no ISO code column. - User asks to "add country codes", "add ISO codes", "enrich with ISO 3166".
Procedure
- Locate the dataset — confirm file path and format (CSV, JSON, JSONL, Parquet, XLSX).
- Identify the country column — if multiple candidates exist or the column is ambiguous, ask the user which column holds the country name.
- Check for pre-existing codes — if an ISO column already exists, report and ask whether to overwrite or skip.
- Load data with pandas (
pd.read_csv,pd.read_json,pd.read_parquet,pd.read_excel). - Resolve country names to ISO codes using
pycountry:
- Try exact match first via
pycountry.countries.get(name=...)and.lookup(...). - For fuzzy/partial matches, use
pycountry.countries.search_fuzzy(...)with a confidence threshold. - Common aliases to hard-code before fuzzy matching:
USA/U.S./U.S.A.→United States,UK→United Kingdom,Russia→Russian Federation,South Korea→Korea, Republic of,North Korea→Korea, Democratic People's Republic of,Ivory Coast→Côte d'Ivoire,Czech Republic→Czechia,Burma→Myanmar.
- Add columns:
iso3166_alpha2,iso3166_alpha3,iso3166_numeric. Ask the user if they want all three or a subset — default to all three. - Report unresolved rows — list every country value that could not be mapped, with row counts. Do not silently drop or leave blank without reporting.
- Write output — save alongside the input with
_iso3166suffix by default (e.g.countries.csv→countries_iso3166.csv), preserving the input format. Confirm path with user if ambiguous. - Update the data dictionary — if a data dictionary exists in the same folder (see
add-data-dictionary/update-data-dictionaryskills), add the new columns. If none exists, offer to create one.
Dependencies
pip install pandas pycountry openpyxl pyarrow
Edge cases
- Subnational regions (e.g. "Scotland", "Catalonia") — flag and ask user whether to map to parent country or leave blank.
- Historical entities ("USSR", "Yugoslavia", "Czechoslovakia") — ISO 3166-3 covers these; offer that as an option.
- Multi-country rows (e.g. "Germany / France") — flag and ask user how to handle (split, skip, keep first).
- Empty / null country values — leave ISO columns null; report count.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: danielrosehill
- Source: danielrosehill/Claude-Data-Wrangler-plugin
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.