timeseries-cleaning

timeseries-cleaning is a skill for Claude Code, Codex from spedas/spedas_agent_kit. It costs 87 tokens per session (2,135 once invoked), scanned A, original, MIT.

A preparation workflow for fixing common problems in measured data over time, such as spikes, missing-value markers, gaps, and uneven sampling.

In plain words
What is it for?
Use it before turbulence, minimum-variance, magnetic-boundary, polarization, or particle-moment analysis.
Why use it?
Spectral, wave, and statistical analyses can give misleading results when raw measurements contain these problems or are not evenly spaced.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it before turbulence, minimum-variance, magnetic-boundary, polarization, or particle-moment analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spedas/spedas_agent_kit/timeseries-cleaning
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add spedas/spedas_agent_kit --skill timeseries-cleaning
Clone the repo
git clone --depth 1 https://github.com/spedas/spedas_agent_kit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for timeseries-cleaning

README.md
[![agentmods](https://agentmods.dev/badge/skills/spedas/spedas_agent_kit/timeseries-cleaning.svg)](https://agentmods.dev/skills/spedas/spedas_agent_kit/timeseries-cleaning)
Your own site
<a href="https://agentmods.dev/skills/spedas/spedas_agent_kit/timeseries-cleaning"><img src="https://agentmods.dev/badge/skills/spedas/spedas_agent_kit/timeseries-cleaning.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.02135
Opus 5 $0.00044 $0.01068
Sonnet 5 $0.00017 $0.00427
Haiku 4.5 $0.00009 $0.00214

Measured 8d ago against content hash 03734e6c201d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

timeseries-cleaning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/plugins/spedas-codex/skills/timeseries-cleaning/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Time-series cleaning (the tplot-math hygiene crib)

The IDL-SPEDAS tplot_math pre-analysis ritual: take a raw, messy, possibly irregular-cadence series and condition it into something the spectral / minimum-variance / moment tools can trust. This is the first step in front of solar-wind-turbulence-spectrum, boundary-minimum-variance / magnetopause-lmn-analysis, and wave-polarization — never feed those raw fill-value-laden, gappy data. There is no dedicated "clean" MCP tool; the value is the ordered chain and recording every step for reproducibility.

When to use

  • "Clean up this B/V series before I run a spectrum / MVA / polarization."
  • "There are spikes / fill values / gaps / NaNs in the data — regularize it."
  • "Put this irregular-cadence series on a uniform time grid."
  • Any series with data dropouts, instrument spikes, sentinel fill values, or non-uniform cadence.

Do not over-clean: aggressive smoothing destroys the high-frequency power a spectrum needs, and background subtraction changes what MVA/moments see. Clean the minimum required.

Tool chain (all existing)

load_data_sourcebrowse_data_parametersfetch_data_product (raw series) → load the fetched array as a tplot variable → chain the pyspedas tplot_math ops (time_cliptdeflagclean_spikestsmoothsubtract_averagetinterpol) → get_data the cleaned var → write a cleaned CSV/NPZ artifact → feed the downstream skill, all wrapped in a create_spedas_analysis_bundle. Use render_tplot for a before/after look.

Backend (verified output contract)

All of these are pyspedas top-level functions that operate on tplot variable names, store a new tplot variable (via newname= or a suffix), and return None — they do NOT return arrays. Retrieve the result with pytplot.get_data(<name>).

  • pyspedas.tdeflag(names, flag=None, method='remove_nan', fillval=...) — replace/remove fill values and NaNs. method='remove_nan' drops flagged rows (changes the time base); other methods (e.g. interpolate/repeat) keep length. Set flag/fillval to the dataset's sentinel (e.g. -1e31) when it isn't already NaN.
  • pyspedas.clean_spikes(names, nsmooth=10, thresh=0.3, sub_avg=False, ...) — despike by comparing to an nsmooth-point smooth; points deviating beyond thresh are removed.
  • pyspedas.tsmooth(names, width=10, median=...) — boxcar (or median, if median set) smooth over width points.
  • pyspedas.subtract_average(names, median=...) — subtract the interval mean (or median) to remove a DC background.
  • pyspedas.tinterpol(names, interp_to, ...) — interpolate names onto the time base of the interp_to variable; build a uniform-grid dummy var first to regularize cadence.
  • pyspedas.avg_data(...) — downsample by time-bin averaging when you want a coarser uniform cadence.
  • pyspedas.time_clip(names, trange) — trim to the analysis window.

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 100 lines · 87 tokens per session scan A 03734e6c201d

Subscribe to this mod's changes

timeseries-cleaning is a skill published in the GitHub repository spedas/spedas_agent_kit (3 stars, last pushed 1mo ago), licensed MIT. It adds 87 tokens to every session and 2,135 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

K-Dense-AI/scientific-agent-skills · 216 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens

esm

Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel…

synthetic-sciences/openscience · 86 tokens