Skip to main content
skill CX Codex

mcda-suitability-analysis — Claude Code skill: what it does

Guides spatial multi-criteria suitability analysis, AHP factor weighting, and model sensitivity testing across GIS rasters.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add muend/geoai-skills --skill mcda-suitability-analysis -a claude-code
Open on GitHub

What mcda-suitability-analysis does

This skill enforces a formal protocol for multi-criteria decision analysis (MCDA) and spatial site selection. The workflow separates continuous factor grids from binary constraint masks, standardizes cell values to 0–1 or 0–255 scales via linear or fuzzy membership, and aggregates surfaces using Weighted Linear Combination (WLC) or Ordered Weighted Averaging (OWA).

Weights follow Saaty's Analytic Hierarchy Process (AHP), evaluated via scripts/ahp_weights.py. The script calculates eigenvector weights and checks the consistency ratio (CR). If CR reaches 0.10 or higher, the matrix is returned to identify conflicting triads instead of massaging inputs.

Sensitivity testing is mandatory: the skill runs one-at-a-time ±20% weight shifts, stakeholder scenarios, or Dirichlet Monte Carlo runs. Binary constraints are applied strictly at the end via multiplication; folding legal exclusions directly into factor weights breaks model logic by granting banned areas acceptable scores.

What it helps with

  • calculate AHP criteria weights and check the consistency ratio CR
  • standardize spatial criteria rasters with linear min-max or fuzzy curves
  • aggregate factor grids with WLC or OWA and apply hard binary masks
  • stress-test suitability maps against weight perturbations of ±20%

Example prompts for the agent

  • Run scripts/ahp_weights.py on my pairwise comparison matrix and report CR
  • Standardize slope and distance rasters to a 0-1 scale and build a WLC aggregation
  • Perform a one-at-a-time sensitivity perturbation at ±20% to generate a stability map

How to install mcda-suitability-analysis

1Skills CLI (Vercel)

npx skills add muend/geoai-skills --skill mcda-suitability-analysis -a claude-code

2Manually: put the files in place

~/.claude/skills/mcda-suitability-analysis/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mcda-suitability-analysis/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about mcda-suitability-analysis

How to install mcda-suitability-analysis in Claude Code?

Run npx skills add muend/geoai-skills --skill mcda-suitability-analysis -a claude-code in your terminal.

What does mcda-suitability-analysis do?

It structures spatial suitability modeling, covering raster standardization, AHP pairwise weighting, constraint masking, and sensitivity analysis.

How does the skill handle AHP consistency ratios above 0.10?

It halts the calculation, pinpoints the most inconsistent pairwise judgment triad, and requests revised judgments rather than adjusting weights manually.

Source text

SKILL.md · MIT
---
name: mcda-suitability-analysis
description: >-
  Always invoke for spatial suitability, site selection, AHP, criteria
  weights, or weighted-overlay work, including audits of inconsistent
  pairwise judgments and requests for only a final map. Covers consistency,
  standardization, constraints, ranked surfaces, shortlists, and sensitivity.
  Route travel-time placement and location-allocation to
  network-accessibility-analysis.
license: MIT
metadata:
  author: Muhammed Enes Duran
---

# MCDA & Suitability Analysis

Purpose: produce suitability maps whose weights, scales, and assumptions are
explicit, consistent, and stress-tested. A suitability map without a
sensitivity analysis is an opinion with a legend.

## Workflow

1. **Structure**: goal → criteria (factors) → constraints. Constraints are
   binary masks (legal exclusions, water bodies, slope > threshold) applied
   at the END by multiplication; factors are continuous and weighted.
   Keep them apart — encoding a constraint as a heavily-weighted factor is
   a classic error that lets forbidden areas score "acceptable".
2. **Criteria layers**: each factor as a raster on a COMMON grid (same CRS,
   extent, cell size, snap). Resample categorical layers with nearest,
   continuous with bilinear; document each.
3. **Standardization** to a common suitability scale (0-1 or 0-255):
   - Linear min-max for monotonic "more is better/worse".
   - Fuzzy membership (sigmoid/linear with control points) when suitability
     saturates — justify control points from domain knowledge.
   - Categorical layers: explicit reclass table, shown to the user.
   Direction check: confirm for EVERY layer whether high raw value means
   high or low suitability (slope: low=good; distance-to-road: usually
   low=good). Direction bugs survive to the final map invisibly.
4. **Weights** (AHP below, or direct/ranked methods with rationale).
5. **Aggregation**: weighted linear combination (WLC) default; OWA when
   the decision-maker's risk attitude (AND-like vs OR-like) matters.
6. **Constraint mask** multiply; classify the result (equal interval or
   quantiles — say which and why); **sensitivity analysis**; validate
   against known good/bad sites if any exist.

## AHP with consistency enforcement

Pairwise comparisons on Saaty's 1-9 scale; weights from the principal
eigenvector; consistency ratio (CR) must be < 0.10 or the matrix goes back
for revision. Run `scripts/ahp_weights.py` to compute weights + CR from a
reciprocal comparison matrix (it validates reciprocity and reports λ_max).

Practices: elicit comparisons pair by pair with verbal anchors ("moderately
more important" = 3); with multiple experts, aggregate judgments by
geometric mean BEFORE computing weights; report the full matrix, weights,
λ_max and CR in the deliverable. If CR ≥ 0.10, identify the most
inconsistent triad and ask the expert to revisit it — do not silently
massage numbers.

## Aggregation

```python
suit = np.zeros_like(factors[0], dtype="float32")
for w_i, f in zip(weights, factors):   # factors already standardized 0-1
    suit += w_i * f
suit *= constraint_mask                 # binary 0/1, applied last
```

OWA variant: sort factor values per cell and apply order weights — full
AND (min) to full OR (max) continuum; use when stakeholders disagree on
risk tolerance and show 2-3 scenarios.

## Sensitivity analysis — mandatory

A result that flips with a small weight change is not a result:

- **One-at-a-time**: perturb each weight ±20% (renormalize), recompute,
  report % of area changing suitability class and a stability map (cells
  that never change class across perturbations).
- **Scenario**: 2-3 alternative weight sets from different stakeholder
  priorities; present side-by-side.
- If a Monte Carlo budget exists: sample weights from Dirichlet around the
  AHP vector; per-cell probability of "highly suitable" is a far stronger
  product than a single map.

## Deliverable standard

Suitability map (classified + continuous), constraint mask map, weights
table with CR, standardization functions per criterion (with direction),
sensitivity/stability summary, and limitations paragraph (data currency,
resolution, criteria omitted). Route cartography to `cartography-geoviz`;
network-access criteria come from `network-accessibility-analysis`.

## Pitfalls checklist

- Direction inversion on a criterion (the silent killer — double-check
  distance-based factors).
- Mixing resolutions without declaring the resampling rule.
- CR ignored or unreported.
- Constraints blended as weights → forbidden zones scored medium.
- Classifying with quantiles then reading them as absolute suitability.
- No sensitivity analysis; single map presented as truth.

## Execution contract

- **Workflow:** define decision and stakeholders; separate constraints from factors; standardize criteria; elicit and validate weights; aggregate; test sensitivity; communicate uncertainty.
- **Decision rules:** use MCDA for transparent criteria-ranked surfaces, network analysis for route-constrained access, and optimization when discrete placement or capacity decisions dominate.
- **Verification protocol:** check criterion direction and alignment, AHP consistency, constraint enforcement, weight and threshold perturbations, and stable-versus-fragile areas.
- **Failure modes:** reject the model when criteria double-count the same construct, weights lack provenance, constraints leak into compensation, or rankings collapse under plausible perturbations.
- **Deliverables:** continuous and classified suitability maps, constraints, criteria transformations, weights and consistency ratio, sensitivity results, and limitations.
- **Source freshness:** consult [the authoritative source registry](references/authoritative-sources.md) before applying methods or implementation APIs and record the checked date.

© Muhammed Enes Duran · MIT · muend/geoai-skills

Similar skills

All skills for Data and databases →

From the same set18

point-cloud-lidar A skill for LAS, LAZ and COPC data: ground classification, DTM/DSM/CHM surfaces, canopy and building metrics, vertical datums. Useful when the input is a raw cloud. CX Codex +1 ★ 35repo stars network-accessibility-analysis Replaces straight-line buffers with true network travel costs across walking, transit, and driving modes. Builds isochrones and origin-destination matrices. CX Codex +1 ★ 35repo stars movement-trajectory This skill guides GPS/GNSS track cleaning, stop and trip detection, road matching, and flow aggregation. Use it when you need to turn timestamped locations into movement analysis. CX Codex +1 ★ 35repo stars ml-experiment-standards Makes the agent audit leakage, pick splits and justify metrics before a model gets trained. Useful when a result has to replicate, not just look good. CX Codex +1 ★ 35repo stars google-earth-engine This skill guides Google Earth Engine workflows for satellite imagery, from filtering collections to computing zonal statistics and exporting results. CX Codex +1 ★ 35repo stars geostatistics-interpolation A skill that turns sparse point measurements into a continuous surface and ships an uncertainty map alongside it. Handy when values between stations, wells or soundings have to be estimated. CX Codex +1 ★ 35repo stars geoai-orchestrator Routes complex multi-stage geospatial workflows across dedicated specialist skills while enforcing strict coordinate reference system and geometry rules. CX Codex +1 ★ 35repo stars geo-deep-learning Guides neural methods for geospatial imagery, from choosing a model to checking mapped predictions. Useful for segmentation, object detection, and spatial validation. CX Codex +1 ★ 35repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor