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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for timeseries-cleaning

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00035 $0.00854
Sonnet 5.5 $0.00017 $0.00427
Haiku 4.5 $0.00009 $0.00214

Measured 3mo ago against content hash 03734e6c201d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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_source → browse_data_parameters → fetch_data_product (raw series) → load the fetched array as a tplot variable → chain the pyspedas tplot_math ops (time_clip → tdeflag → clean_spikes → tsmooth → subtract_average → tinterpol) → 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. 3mo 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 4mo ago), licensed MIT. It adds 87 tokens to every session and 2,135 once invoked, about $0.0003 per session on Opus 5.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

timeseries-cleaning compared with skills from other repositories

timeseries-cleaning next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
timeseries-cleaningspedas/spedas_agent_kitSkill34mo agoMITA87Claude Code, Codex
torchdrugK-Dense-AI/scientific-agent-skillsSkill60k6d agoMITA64Claude Code
arboretoK-Dense-AI/scientific-agent-skillsSkill60k6d agoMITA55Claude Code, Codex
deepspot-mK-Dense-AI/scientific-agent-skillsSkill60k6d agoMITA70Claude Code
pyhealthK-Dense-AI/scientific-agent-skillsSkill60k6d agoMITA84Claude Code, Codex
tao-validate-recipe-transferNVIDIA/skillsSkill4.4kyesterdayApache-2.0A179Claude Code
nemo-mbridge-perf-expert-parallel-overlapNVIDIA/skillsSkill4.4kyesterdayApache-2.0A56Claude Code