earth2studio-create-diagnostic
Create Earth2Studio diagnostic model wrappers for single-step data transformations, including simple derived diagnostics, packaged AutoModel diagnostics, and generative or diffusion diagnostics. Do NOT use for prognostic time-stepping models, data sources, or installation.
Install / Use
npx skills add NVIDIA/skills --skill earth2studio-create-diagnosticInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of earth2studio-create-diagnostic
earth2studio-create-diagnostic scores 95/100 on our quality scale, 358th of 3,356 Development & Engineering skills we index (top 11%).
Its SKILL.md is 14 KB long, well organised into 28 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
With 3,421 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 5 days ago, so earth2studio-create-diagnostic is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
earth2studio-create-diagnostic compared with similar skills
All 4 of these similar skills score higher than earth2studio-create-diagnostic; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| earth2studio-create-diagnostic (this skill)by NVIDIA | 95 | 3.4k | 5d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 86.0k | 13d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.0k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.4k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 2d ago | CLAUDE.md |
Frequently asked questions
- How do I install earth2studio-create-diagnostic?
- Run
npx skills add NVIDIA/skills --skill earth2studio-create-diagnostic. The install tabs above show the steps for each supported agent. - Which AI agents does earth2studio-create-diagnostic work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is earth2studio-create-diagnostic safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is earth2studio-create-diagnostic still maintained?
- The repository was last updated 5 days ago, so earth2studio-create-diagnostic is actively maintained.
Skill content
View source on GitHubname: earth2studio-create-diagnostic version: 0.16.0 license: Apache-2.0 metadata: author: NVIDIA Earth-2 Team agent-skills@nvidia.com tags: [earth2studio, diagnostic-model, python] description: > Create Earth2Studio diagnostic model wrappers for single-step data transformations, including simple derived diagnostics, packaged AutoModel diagnostics, and generative or diffusion diagnostics. Do NOT use for prognostic time-stepping models, data sources, or installation. argument-hint: URL or local path to reference inference script (optional)
Quick Start Checklist
Do these steps in order. Do not skip ahead. Before editing, read this SKILL.md and load the relevant reference files for the model type. After implementation, run the focused pytest command before saying tests pass. If tests cannot run, report the exact command and failure instead of claiming success.
- [ ] Read this SKILL.md completely first
- [ ] Get the reference script, repo, paper, or model documentation (Step 0)
- [ ] Classify the diagnostic as simple, AutoModel, or generative (Step 1)
- [ ] Propose dependency extras before editing dependency files (Step 1)
- [ ] Create
earth2studio/models/dx/<name>.pywith diagnostic-only APIs - [ ] Create
test/models/dx/test_<name>.pywith mock tests - [ ] Run:
uv run pytest test/models/dx/test_<name>.py -m "not package" -v - [ ] Add/update model extra, install docs, API docs, and changelog when required
- [ ] Run:
make format && make lint && make license
Critical command rule: always use uv run for Python commands:
- Use
uv run pytest ...anduv run python ... - Do not use bare
pytestorpythonin repo workflows
If the generated model is wrong, do not keep retrying the same fix. Follow Self-Improvement, patch this skill or its references, then continue with the corrected workflow.
Purpose
Implement a diagnostic model wrapper connecting third-party or derived ML transforms to Earth2Studio. Diagnostic models transform data at a single time point: input fields in, output fields out, no forecast integration.
Prerequisites
- Earth2Studio installed via
uvwith dev dependencies (uv sync --all-extras) - Python 3.10+ environment
- Reference inference script, repo, paper, or model documentation
- Checkpoint source and license information for packaged models
Limitations
- Handles single-step transformations only
- Does not support time-stepping forecast models; use
earth2studio-create-prognostic - Real package tests can require network access to NGC, HuggingFace, S3, or other registries
- Generative validation can require GPU and fixed seeds for meaningful comparison
Diagnostic Model Types
| Type | Inheritance | Dependency extra | Example |
|------|-------------|------------------|---------|
| Simple derived diagnostic | torch.nn.Module only | Usually none | Identity, wind speed |
| Packaged AutoModel diagnostic | torch.nn.Module, AutoModelMixin | Required, even if empty | PrecipitationAFNO |
| Generative diagnostic | torch.nn.Module, AutoModelMixin | Required, even if empty | CorrDiff |
Workspace
| Context | Location |
|---------|----------|
| Harbor eval | Write to /workspace/output/earth2studio/models/dx/... |
| Harbor + --copy-repo | Full checkout at /workspace/repo |
| Local clone | Directory with pyproject.toml |
Never read evals/targets/; those files are grader references only.
Reference Files
Load these files on demand during the matching workflow:
| File | Content | Load at |
|------|---------|---------|
| references/skeleton-template.py | Full diagnostic skeletons for simple, AutoModel, and generative wrappers | Steps 3-6 |
| references/method-templates.py | Focused coordinate, loading, forward, and device method snippets | Steps 4-6 |
| references/testing-guide.py | Mock, package, exception, sample, and seed test patterns | Step 7 |
| references/validation-guide.md | Reference comparison, plots, PR hygiene, and review follow-up | Steps 10-11 |
| references/pr-body-template.md | PR body template | Step 11 |
| references/pr-comment-template.md | Validation comment template | Step 11 |
Instructions
Step 0 - Get Reference Material
If $ARGUMENTS provides a URL or local path, use it. Otherwise ask:
Please provide a reference inference script, repository, paper, or model documentation.
Capture the reference model's input variables, output variables, tensor shapes, normalization, grid, checkpoint source, dependency requirements, and license.
Step 1 - Analyze Type and Propose Dependencies
Classify the requested diagnostic before editing files:
| If the model... | Then use... |
|-----------------|-------------|
| Computes a derived quantity with no checkpoint | Simple diagnostic |
| Loads weights from Package or an external checkpoint | AutoModel diagnostic |
| Produces multiple samples, diffusion outputs, VAE samples, or stochastic super-resolution | Generative diagnostic |
Dependency policy:
- Simple derived diagnostics usually do not need a
pyproject.tomlextra. - AutoModel and generative diagnostics must have a named optional dependency extra, even if the list is empty.
- Add the extra alphabetically under
[project.optional-dependencies]and include it in theallaggregate. - Use the model-extra name in
OptionalDependencyFailure("model-extra")and@check_optional_dependencies().
Present the proposed dependency extra and ask the user to approve before editing
pyproject.toml:
model-name = ["package1>=version", "package2"]
# or, when the packaged diagnostic needs no extra runtime packages:
model-name = []
Step 2 - Add Dependencies
After approval, edit pyproject.toml:
- Add the extra alphabetically.
- Update the
allaggregate. - Prefer minimum supported versions from the reference package documentation.
- Do not add broad unpinned Git dependencies unless the reference model requires them and the user approves.
Step 3 - Create Model File
File: earth2studio/models/dx/<lowercase>.py
Use the repo-standard SPDX/license header shown in existing model files.
Simple diagnostic imports commonly include:
from collections import OrderedDict
import numpy as np
import torch
from earth2studio.models.batch import batch_coords, batch_func
from earth2studio.utils import handshake_coords, handshake_dim
from earth2studio.utils.type import CoordSystem
Packaged and generative diagnostics commonly also include:
from earth2studio.models.auto import AutoModelMixin, Package
from earth2studio.models.dx.base import DiagnosticModel
from earth2studio.utils.imports import OptionalDependencyFailure, check_optional_dependencies
from loguru import logger
Canonical method order:
__init__input_coordsoutput_coordsdecorated with@batch_coords()__str__if usefulload_default_packagefor AutoModel/generative diagnosticsload_modelfor AutoModel/generative diagnosticstoonly when non-PyTorch state must move devices- Private/support methods
__call__decorated with@torch.inference_mode()and@batch_func()
Avoid shared base classes or broad abstractions unless the wrapper naturally has multiple closely related variants where a small base class reduces duplication.
Step 4 - Implement Coordinates
Diagnostic input coordinates usually use this public Earth2Studio order:
batch:np.empty(0)and first in theOrderedDictvariable: input variable names using Earth2Studio vocabulary nameslat: public latitude convention north-to-south, usually90to-90lon: public longitude convention0to360, endpoint normally false
No diagnostic wrapper should expose lead_time. If a diagnostic needs validity
time metadata, document it as per-sample metadata in coords["time"]; do not make
it a tensor dimension unless an existing dx pattern requires it.
output_coords must validate inputs with handshake_dim and handshake_coords.
Then update output variables and, when needed, output lat/lon resolution.
Generative diagnostics must add a sample dimension after batch.
Step 5 - Implement Forward Pass
Use a single-step __call__; never create an iterator. Validate coordinates
before model execution, then return (output_tensor, output_coords).
@torch.inference_mode()
@batch_func()
def __call__(self, x: torch.Tensor, coords: CoordSystem) -> tuple[torch.Tensor, CoordSystem]:
output_coords = self.output_coords(coords)
x = (x - self.center) / self.scale
out = self.core_model(x)
return out, output_coords
For generative diagnostics, loop over the batch dimension and generate
number_of_samples per input item. Use explicit seeds for reproducibility when
the reference implementation supports seeded sampling.
Step 6 - Implement Model Loading
For packaged diagnostics:
load_default_packageshould lock HuggingFace URLs to a commit (hf://org/repo@commit) or NGC/S3 versions to an immutable release.load_modelshould callpackage.resolve(...), load checkpoints on CPU first, set modules toeval(), and disable gradients where appropriate.- Use
weights_only=Falseonly when loading a pickled full PyTorch object is required. - Decorate optional model classes and
load_modelwith@check_optional_dependencies(). - Use
loguru.loggerfor useful loading messages; do not useprint()insideearth2studio/.
Step 7 - Write Tests
File: test/models/dx/test_<name>.py
Required tests:
| Function | Purpose |
|----------|---------|
| test_<model>_call | Forward pass with mock or simple model |
| test_<model>_exceptions | Invalid coordinate order, values, or variables raise errors |
| test_<model>_package | Real weights with @pytest.mark.package for AutoModel/generative diagnostics |
Generative diagnostics also require sample-count and deterministic-seed tests.
Use references/testing-guide.py. Create a Phoo<ModelName> dummy that matches
the real core model's interface and produces deterministic output.
Run focused tests:
uv run pytest test/models/dx/test_<name>.py -m "not package" -v
uv run pytest test/models/dx/test_<name>.py::test_<model>_package --package -v
Do not omit package tests for packaged models. If arbitrary random inputs are not physically valid for the real checkpoint, build a stable model-appropriate input while still loading real weights and running a forward pass.
Step 8 - Register Model
For public models, update earth2studio/models/dx/__init__.py alphabetically.
Skip registration only when the user explicitly wants an internal or experimental
file that should not be exported.
Step 9 - Documentation
For public models:
- Add to
docs/modules/models_dx.rstalphabetically so API docs include the generated page. - Add to
docs/userguide/about/install.mdif a model extra exists. Include model notes plus bothpip install earth2studio[model-name]anduv add earth2studio --extra model-nameinstructions. - Update
CHANGELOG.mdunder### Added.
Format and lint:
make format && make lint && make license
Step 10 - Validation (if requested)
Follow references/validation-guide.md. Create uncommitted vanilla,
Earth2Studio, comparison, and sanity-check scripts. Do not commit generated
outputs, checkpoints, images, or local validation scripts.
For generative diagnostics, fix seeds and compare matching samples or report statistical/tolerance-based agreement when exact equality is impossible. Ask the user to visually inspect plots before proceeding.
Step 11 - PR (if requested)
Follow references/validation-guide.md and use:
references/pr-body-template.mdreferences/pr-comment-template.md
Before creating the PR, verify dependency extras, all, install docs, API docs,
changelog, tests, and validation artifacts are consistent. Do not include machine
names, hostnames, absol
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
86.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
44.4kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
