From faostat-skills
Use when the user asks for a food security profile, country agricultural overview, country hunger or nutrition assessment, or food system summary for a specific country. Keywords — country profile, food security, undernourishment, production, trade, nutrition, calorie supply, dietary energy. Do NOT use for import dependence and supply chain risk → `faostat-trade`. Do NOT use for a global commodity briefing → `faostat-commodity`. Do NOT use for side-by-side country comparison → `faostat-compare`.
How this skill is triggered — by the user, by Claude, or both
Slash command
/faostat-skills:country-profileThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a comprehensive food security and agricultural profile for a given country using FAOSTAT data.
Generate a comprehensive food security and agricultural profile for a given country using FAOSTAT data.
Verify that the following FAOSTAT MCP tools are available before proceeding:
faostat_search_codesfaostat_get_datafaostat_get_rankingsfaostat_list_domainsIf any tool is missing, inform the user: "This skill requires the FAOSTAT MCP server to be connected. Please ensure it is running and try again."
| Domain | Code | Used for |
|---|---|---|
| Crops & Livestock Products | QCL | Production quantities |
| Food Security | FS | Undernourishment and food-insecurity indicators |
| Food Balance Sheets (2010-) | FBS | Dietary energy, protein, fat supply |
| Crops & Livestock Trade (aggregate) | TCL | Country-level import/export totals |
| Detailed Trade Matrix | TM | Bilateral partner breakdown (use only when partner data is needed) |
Element codes below are verified hints. Resolve at runtime via
faostat_search_codesbefore use.
2510, display 55102610; Export quantity (TCL): filter 29102612; Export value (TCL, USD 1000): filter 2912664674684645210041; FS Number undernourished: filter 210011For faostat_get_data use FILTER codes. For faostat_get_rankings use DISPLAY codes.
Identify the country name from the user's message or ask for it if not provided.
Call faostat_search_codes(domain_code='QCL', dimension_id='area', query='<country_name>').
CRITICAL: If the response contains requires_confirmation: true, present ALL matching options to the user and ask them to select the correct one. Do NOT proceed until the user confirms. This commonly happens with names like "China" (mainland vs. aggregate), "Sudan" (former vs. current), or "Korea".
China-specific rule (user preference, Apr 2026). If the user says "China" with no further qualifier, default to composite China (area code 351) — the roll-up of China, mainland (41) + Hong Kong SAR + Macao SAR + Taiwan. Do NOT substitute 41 unless the user specifies China, mainland explicitly. Mention this in the output so the reader knows which definition was used, and note that FAOSTAT's own publications default to 41, so the numbers here are marginally larger than the FAO data-portal default.
Store the confirmed area code for all subsequent queries.
Call faostat_get_data with:
domain_code='QCL'area='<resolved_area_code>'element='<resolved_production_code>' — resolve at runtime: faostat_search_codes(domain_code='QCL', dimension_id='element', query='production quantity') → e.g. 2510 (Production — this is the FILTER code)year='<most_recent_year>' (try the current year minus 2; if no data, try minus 3)response_format='compact'limit=20show_unit=TrueSort the results by value descending and identify the top 5 crops by production volume.
Call faostat_get_data with specific element filters so the payload stays small:
domain_code='FS'area='<resolved_area_code>'element='<resolved_fs_codes>' — resolve at runtime: faostat_search_codes(domain_code='FS', dimension_id='element', query='undernourishment') → e.g. 210041,210011 (prevalence of undernourishment, number undernourished). Add other FS element codes if needed — resolve via faostat_search_codes(domain_code='FS', dimension_id='element', query='...').year='2014,2015,2016,2017,2018,2019,2020,2021,2022,2023' (use explicit comma list — colon ranges like '2014:2023' have returned empty in practice)response_format='compact'Look for these key indicators:
If data is sparse, note which indicators are unavailable.
Call faostat_get_data with:
domain_code='FBS'area='<resolved_area_code>'element='<resolved_fbs_codes>' — resolve at runtime: faostat_search_codes(domain_code='FBS', dimension_id='element', query='food supply kcal') and similar queries for protein/fat → e.g. 664,674,684,645 (kcal/cap/day, protein g/cap/day, fat g/cap/day, food kg/cap/yr)year='<latest 2-3 years available — FBS typically lags QCL by 1 year>'item='2901' (Grand Total for headline metrics); for item-specific breakdown (e.g., wheat contribution) resolve via faostat_search_codesresponse_format='compact'Without an element filter this call returns 100+ indicators per year and blows the context. Always specify elements.
Extract:
Use TCL (country-level aggregate trade) for total imports and exports:
# Resolve elements at runtime:
# faostat_search_codes(domain_code='TCL', dimension_id='element', query='import quantity') → e.g. 2610
# faostat_search_codes(domain_code='TCL', dimension_id='element', query='export quantity') → e.g. 2910
# faostat_search_codes(domain_code='TCL', dimension_id='element', query='import value') → e.g. 2612
# faostat_search_codes(domain_code='TCL', dimension_id='element', query='export value') → e.g. 2912
faostat_get_data(
domain_code='TCL',
area='<resolved_area_code>',
element='<resolved_import_qty>,<resolved_export_qty>,<resolved_import_val>,<resolved_export_val>',
year='<latest 3 years>',
response_format='compact',
limit=500
)
Do NOT pull this from TM — TM is bilateral (partner × reporter), so summing TM rows to get national totals is fragile (mirror-data gaps, re-exports). Only drop into TM if the user specifically asks about trading partners for a given commodity.
Determine:
Compose a narrative report with the following sections:
Title: Food Security Profile: [Country Name]
Production Capacity — Top 5 crops, total agricultural output volume, any notable specializations.
Food Access & Security — Undernourishment prevalence, food insecurity rates, trends over available years (improving/worsening/stable).
Nutritional Supply — Calorie and protein supply per capita, how these compare to global benchmarks (2,100 kcal/day minimum; 2,500 kcal/day adequate).
Trade Position — Net importer or exporter, main trade partners if available, key agricultural imports and exports.
Key Risks & Trends — Synthesize insights: dependency on imports, narrow crop base, declining yields, improving food security, etc.
Include trend indicators where multi-year data is available:
End the report with:
Source: FAOSTAT (FAO), accessed [current date]. Data may reflect reporting lags of 1-3 years.
Element and item code resolution. Never use a hardcoded numeric element or item code as the primary value in a faostat_get_data call. Always resolve at runtime: faostat_search_codes(domain_code='<dom>', dimension_id='element', query='<metric name>') for elements; faostat_search_codes(domain_code='<dom>', dimension_id='item', query='<item name>') for items. Numeric codes shown in reference tables and code examples are verified hints — use them to validate the search result, not as the authoritative source. Domain letter-codes (QCL, TCL, GT, EM, FBS, FS…) are stable and may be used directly.
faostat_get_rankings returns HTTP 500. Fall back to faostat_get_data with a country list and sort client-side. Note the fallback in the methodology line.year='2014:2023' returns empty, retry with explicit comma-list year='2014,2015,2016,2017,2018,2019,2020,2021,2022,2023'.Deliver the report as a well-structured narrative with clear section headings. Use bullet points for data summaries and tables where comparisons aid readability. Keep the tone analytical and factual.
| If you need… | Use |
|---|---|
| Import risk + supply chain analysis | /faostat-trade |
| Emissions + land use context | /faostat-climate |
| Recent changes + anomalies | /faostat-trends |
| Side-by-side country comparison | /faostat-compare |
npx claudepluginhub berba-q/faostat-skillsProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.