/dsm-soil:digital-soil-mapping-workflowfrom dsm-soil
Guides a digital soil mapping (DSM) project end-to-end: framing target properties, assembling scorpan covariates, sampling design, model selection, handling spatial autocorrelation, training, and mapping with calibrated uncertainty.
Ships in dsm-soil. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Forged from the DSM knowledge wiki (21 sources). The wiki is the source of truth. Key pages: scorpan, scale-dependence, sampling-design, random-forest, spatial-autocorrelation, geographically-weighted-regression, regression-kriging, feature-selection, spatiotemporal-dsm, model-interpretability, sample-representativeness, spatiotemporal-sampling, soil-informed-ml. Hand off validation to soil-map-validation and space-time-with-mechanism to hybrid-process-ml-soc.
Posture (SoilML): direct the workflow with pedological knowledge — expert covariate choice, honest uncertainty, mechanism-aware interpretation — don't just feed a model rasters. Every step below is a place to inject soil knowledge.
DSM predicts a soil property as an empirical function of environmental covariates that stand in for the soil-forming factors — soil, climate, organisms, relief, parent material, age, spatial position (McBratney 2003). Every step below serves this: gather covariates for each factor, sample to relate them to measured soil, fit a model, map.
This is the decision the corpus is emphatic about: there is no universal best model.
| Situation | Prefer |
|---|---|
| General workhorse, decent n, non-linear | Random Forest / QRF |
| Need per-pixel uncertainty | QRF |
| Small samples + heterogeneous / non-stationary terrain | GWR / GWRK (can beat ML, which may score negative R²) |
| Strong residual spatial structure | regression-kriging (trend + krige residuals) |
| Spatial context / multi-property / large scale | CNN/ANN (but a tuned RF often matches it) |
| Change over time | spatiotemporal RF/QRF; with mechanism → POML hybrid |
Don't assume RF wins — test at least one spatially-explicit alternative when n is small or terrain is complex. And weigh generalisation, not just accuracy: RF can post a high training fit yet overfit (Ngubo: train R²≈0.93 → test ≈0.53), while RK under-fits training but generalises — RK even edged RF at the national scale. Judge every candidate on an independent holdout / CV, never on training fit.
Three different levers — don't conflate them:
Use soil-map-validation: pick the CV strategy for your estimand, report RMSE + ME + CCC (+ MEC for temporal), validate uncertainty with PICP, and report temporal skill separately from spatial.
Distilled from Zhang 2017 (DSM review/foundations), Jafari, Shi, Hengl, Tian, Wadoux,
Carbajal, Sarkar, Parvizi, Mousavi, Iticha, Ngubo, Bouasria 2023 (learning-curve sample
sizing, cLHS variance edge, landscape-heterogeneity pre-check), and Zhang 2024 (space-time).
Full citations in the wiki sources/.
Portable build from the DSM knowledge wiki (the source of truth). Obsidian cross-references were flattened for standalone use; regenerate with build.ps1.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ccarbajal16/soil-dsm-skills --plugin dsm-soil12 skills in this plugin
/ensemble-ml-for-soilDecide whether to combine machine-learning models at all, and if so how — by measuring the gain available before building any combiner. Covers the ambiguity/diversity ceiling, the weighting spectrum (simple average, R²-weighted, Bates–Granger, AIC/BIC, NNLS/SuperLearner, Granger–Ramanathan, learned meta-models, attention, per-pixel selection), out-of-fold stacking under spatial CV, cross-fitting the combiner, voting for classification, and significance testing of the margin. Use when someone proposes an ensemble, reports an ensemble gain, or asks whether their averaging scheme is "too simple". Triggers: "ensemble machine learning", "model stacking", "stacked generalisation", "SuperLearner", "meta-learner", "meta-model", "weighted average ensemble", "R2-weighted ensemble", "simple average ensemble", "Bates-Granger", "Granger-Ramanathan", "NNLS weights", "non-negative least squares", "caretStack", "mlr3pipelines stacking", "voting ensemble", "hard voting", "soft voting", "blending", "bagging vs boosting vs stacking", "ensemble gain", "does stacking help", "combine RF and XGBoost", "which model to combine", "base learner diversity", "error correlation", "out-of-fold predictions", "level-one dataset", "landmap", "MACHISPLIN", "spatial ensemble", "per-pixel model selection", "combine my model with SoilGrids"./hybrid-process-ml-socDesign and build hybrid soil-organic-carbon models that fuse a process-oriented model (RothC / CENTURY / Millennial) with machine learning (Random Forest / QRF) to predict SOC stock in space AND time — getting ML's spatial accuracy together with the process model's physically-plausible temporal dynamics. Use when a task needs SOC *change* over time (not just a static map), when pure ML gives implausible temporal trends, or when integrating mechanistic knowledge into data-driven soil mapping. Triggers: "hybrid soil carbon model", "process + machine learning", "POML", "space-time SOC", "RothC + random forest", "physically plausible SOC prediction", "knowledge-guided ML for soil"./ml-for-soil-predictionChoose, tune, and reason about machine-learning models for predicting soil properties (SOC, texture, pH, …) — Random Forest, Quantile Regression Forests, gradient boosting, and deep learning — including per-pixel uncertainty and interpretability. Use when the task is the ML modelling craft itself: which algorithm, how to tune it, how to get honest uncertainty, whether deep learning is worth it, why an ML model underperforms. Triggers: "random forest for soil", "QRF", "which ML model", "deep learning soil", "CNN / ANN soil carbon", "hyperparameters", "feature importance / SHAP", "prediction interval", "ML model gives bad R²"./rothc-temporal-modellingSet up, initialize, calibrate, validate, and interpret the RothC (Rothamsted Carbon) model — and CENTURY-family process models — for simulating soil organic carbon stock and its change over time. Use when modelling SOC dynamics under management or climate scenarios, initializing RothC pools (spin-up), calibrating decay constants, choosing carbon inputs, adapting RothC to a region/practice, or judging whether a RothC result is trustworthy. Triggers: "RothC", "CENTURY / CenW", "soil carbon model", "carbon pools DPM/RPM/BIO/HUM/IOM", "spin-up / initialize SOC pools", "calibrate RothC", "SOC under climate change", "carbon input estimation", "first-order decay"./soc-stock-mrvQuantify, report, and verify soil-organic-carbon stock and its change over time for carbon markets / MRV (Monitoring, Reporting, Verification) — computing SOC stock, estimating change and its uncertainty at the field/project support, and applying the uncertainty deduction that determines creditable tons. Use when a task involves soil carbon crediting, an MRV framework (VM0042, VT0014), SOC stock-change detectability, or reporting SOC with defensible uncertainty. Triggers: "SOC MRV", "soil carbon credits", "carbon farming verification", "SOC stock change", "uncertainty deduction", "how much SOC can we credit", "monitoring reporting verification soil carbon"./soil-fertility-mappingProduce national/regional maps of multiple soil fertility properties and nutrients from harmonized legacy data with machine learning, and integrate them into a composite Soil Fertility Index (SFI) with honest, propagated uncertainty. Use when the goal is a multi-property fertility product (texture, pH, CEC, OC, N, P, K, Ca, BD) at broad scale — a GSNmap-style national soil-nutrient assessment, a fertility/soil-quality index, or region-specific management diagnosis. Triggers: "soil fertility map", "soil fertility index", "SFI", "nutrient mapping", "GSNmap", "map N P K", "soil quality index", "national soil property maps", "map CEC / pH / texture".Other plugins' skills for the same job