Agent skill

Light Curve Preprocessing

by benchflow-ai in benchflow-ai/skillsbench

Preprocessing and cleaning techniques for astronomical light curves.

Apache-2.0Auto-check passedData & Analytics

Install Light Curve Preprocessing

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill light-curve-preprocessing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench light-curve-preprocessing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/exoplanet-detection-period/environment/skills/light-curve-preprocessing .claude/skills/light-curve-preprocessing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
light-curve-preprocessing
GitHub stars
1.8k
Token cost
~1.4k tokens
SKILL.md length
399 words
Files
1
Skills in repo
180
Repo updated
First seen
Licence
Apache-2.0

At a glance

Preprocessing and cleaning techniques for astronomical light curves.

  • Works in 4 steps: Remove outliers → Remove long-term trends → Handle data quality flags → …
  • Preparing light curve data for period analysis
  • SKILL.md covers Overview, Outlier Removal, Removing Long-Term Trends and Handling Data Quality Flags, plus 6 more sections
  • Calls pip

What it does

Light Curve Preprocessing is an agent skill from benchflow-ai/skillsbench. Preprocessing and cleaning techniques for astronomical light curves. Use when preparing light curve data for period analysis, including outlier removal, trend removal, flattening, and handling data quality flags. Works with lightkurve and general time series data.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Data cleaning and Forecasting and time series. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Preparing light curve data for period analysis
  • Including outlier removal
  • Handling data quality flags

Example prompts

  • “/light-curve-preprocessing”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Remove outliers
  2. Remove long-term trends
  3. Handle data quality flags
  4. Remove stellar variability (optional)

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • lightkurve.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Light Curve Preprocessing loads about 1.4k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 399 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 399 words, ~1,378 tokens.

Download SKILL.mdSave it as .claude/skills/light-curve-preprocessing/SKILL.md (or your agent's skills folder).
name
light-curve-preprocessing
description
Preprocessing and cleaning techniques for astronomical light curves. Use when preparing light curve data for period analysis, including outlier removal, trend removal, flattening, and handling data quality flags. Works with lightkurve and general time series data.

Light Curve Preprocessing

Preprocessing is essential before period analysis. Raw light curves often contain outliers, long-term trends, and instrumental effects that can mask or create false periodic signals.

Overview

Common preprocessing steps:

  1. Remove outliers
  2. Remove long-term trends
  3. Handle data quality flags
  4. Remove stellar variability (optional)

Outlier Removal

Using Lightkurve
python
import lightkurve as lk

# Remove outliers using sigma clipping
lc_clean, mask = lc.remove_outliers(sigma=3, return_mask=True)
outliers = lc[mask]  # Points that were removed

# Common sigma values:
# sigma=3: Standard (removes ~0.3% of data)
# sigma=5: Conservative (removes fewer points)
# sigma=2: Aggressive (removes more points)
Manual Outlier Removal
python
import numpy as np

# Calculate median and standard deviation
median = np.median(flux)
std = np.std(flux)

# Remove points beyond 3 sigma
good = np.abs(flux - median) < 3 * std
time_clean = time[good]
flux_clean = flux[good]
error_clean = error[good]
Flattening with Lightkurve
python
# Flatten to remove low-frequency variability
# window_length: number of cadences to use for smoothing
lc_flat = lc_clean.flatten(window_length=500)

# Common window lengths:
# 100-200: Remove short-term trends
# 300-500: Remove medium-term trends (typical for TESS)
# 500-1000: Remove long-term trends

The flatten() method uses a Savitzky-Golay filter to remove trends while preserving transit signals.

Iterative Sine Fitting

For removing high-frequency stellar variability (rotation, pulsation):

python
def sine_fitting(lc):
    """Remove dominant periodic signal by fitting sine wave."""
    pg = lc.to_periodogram()
    model = pg.model(time=lc.time, frequency=pg.frequency_at_max_power)
    lc_new = lc.copy()
    lc_new.flux = lc_new.flux / model.flux
    return lc_new, model

# Iterate multiple times to remove multiple periodic components
lc_processed = lc_clean.copy()
for i in range(50):  # Number of iterations
    lc_processed, model = sine_fitting(lc_processed)

Warning: This removes periodic signals, so use carefully if you're searching for periodic transits.

Handling Data Quality Flags

IMPORTANT: Quality flag conventions vary by data source!

Standard TESS format
python
# For standard TESS files (flag=0 is GOOD):
good = flag == 0
time_clean = time[good]
flux_clean = flux[good]
error_clean = error[good]
Alternative formats
python
# For some exported files (flag=0 is BAD):
good = flag != 0
time_clean = time[good]
flux_clean = flux[good]
error_clean = error[good]

Always verify your data format! Check which approach gives cleaner results.

Preprocessing Pipeline Considerations

When building a preprocessing pipeline for exoplanet detection:

Key Steps (Order Matters!)
  1. Quality filtering: Apply data quality flags first
  2. Outlier removal: Remove bad data points (flares, cosmic rays)
  3. Trend removal: Remove long-term variations (stellar rotation, instrumental drift)
  4. Optional second pass: Additional outlier removal after detrending
Important Principles
  • Always include flux_err: Critical for proper weighting in period search algorithms
  • Preserve transit shapes: Use methods like flatten() that preserve short-duration dips
  • Don't over-process: Too aggressive preprocessing can remove real signals
  • Verify visually: Plot each step to ensure quality
Show full SKILL.md (178 more words)Show less
Parameter Selection
  • Outlier removal sigma: Lower sigma (2-3) is aggressive, higher (5-7) is conservative
  • Flattening window: Should be longer than transit duration but shorter than stellar rotation period
  • When to do two passes: Remove obvious outliers before detrending, then remove residual outliers after

Preprocessing for Exoplanet Detection

For transit detection, be careful not to remove the transit signal:

  1. Remove outliers first: Use sigma=3 or sigma=5
  2. Flatten trends: Use window_length appropriate for your data
  3. Don't over-process: Too much smoothing can remove shallow transits

Visualizing Results

Always plot your light curve to verify preprocessing quality:

python
import matplotlib.pyplot as plt

# Use .plot() method on LightCurve objects
lc.plot()
plt.show()

Best practice: Plot before and after each major step to ensure you're improving data quality, not removing real signals.

Dependencies

bash
pip install lightkurve numpy matplotlib

References

Best Practices

  1. Always check quality flags first: Remove bad data before processing
  2. Remove outliers before flattening: Outliers can affect trend removal
  3. Choose appropriate window length: Too short = doesn't remove trends, too long = removes transits
  4. Visualize each step: Make sure preprocessing improves the data
  5. Don't over-process: More preprocessing isn't always better

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tasks/exoplanet-detection-period/environment/skills/light-curve-preprocessing of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Light Curve Preprocessing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Light Curve Preprocessing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Light Curve Preprocessing this skillbenchflow-ai/skillsbench1.8k—~1.4kAutomated safety check: PassApache-2.0
Statistical Analysismajiayu000/claude-skill-registry6662 repos~2.6kAutomated safety check: PassMIT
Visual Skillsnpc-live/clawfirm156—~7.4kAutomated safety check: PassNone
Matlab Analyze Datamatlab/matlab-agentic-toolkit1.1k—~3.2kAutomated safety check: PassCustom licence
Cja Dimension Analysisadobe/skills195—~3.3kAutomated safety check: PassApache-2.0
ML Data Leakage Guardmajiayu000/claude-skill-registry6661 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • Statistical Analysis

    majiayu000/claude-skill-registry

    Apply statistical methods including descriptive stats, trend analysis, outlier detection, and hypothesis testing.

    666 GitHub starsUsed in 2 repos~2.6k tokens
    Data & AnalyticsAuto-check passed
  • Visual Skills

    npc-live/clawfirm

    A skill your agent uses whenever the user provides data (CSV, JSON, table, pasted numbers, or any structured dataset) and expects a visual output — even if they don't say 'chart' or 'visualize'.

    156 GitHub stars~7.4k tokensUpdated 3 mo ago
    Data & AnalyticsAuto-check passed
  • Matlab Analyze Data

    matlab/matlab-agentic-toolkit

    Analyze data using MATLAB. An agent skill from matlab/matlab-agentic-toolkit.

    1.1k GitHub stars~3.2k tokensUpdated 7 days ago
    Data & AnalyticsAuto-check passed
  • Comprehensive dimension analysis and reporting for CJA. An agent skill from adobe/skills.

    195 GitHub stars~3.3k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • ML Data Leakage Guard

    majiayu000/claude-skill-registry

    Detects and prevents data leakage in machine learning and mathematical modeling.

    666 GitHub starsUsed in 1 repo~3.4k tokens
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed

More from benchflow-ai/skillsbench

All 180 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Light Curve Preprocessing

What does Light Curve Preprocessing do?

Preprocessing and cleaning techniques for astronomical light curves. Light Curve Preprocessing is an agent skill from benchflow-ai/skillsbench. Preprocessing and cleaning techniques for astronomical light curves.

When should I use Light Curve Preprocessing?

Light Curve Preprocessing fits situations like: preparing light curve data for period analysis; including outlier removal; handling data quality flags.

How do I install Light Curve Preprocessing in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill light-curve-preprocessing -a claude-code`. Or copy the skill folder (tasks/exoplanet-detection-period/environment/skills/light-curve-preprocessing in benchflow-ai/skillsbench) into .claude/skills/light-curve-preprocessing in your project. Claude Code loads it when a task matches its description.

How do I install Light Curve Preprocessing in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill light-curve-preprocessing -a codex`. Or copy the skill folder (tasks/exoplanet-detection-period/environment/skills/light-curve-preprocessing in benchflow-ai/skillsbench) into .agents/skills/light-curve-preprocessing in your project. Codex loads it when a task matches its description.

Can I use Light Curve Preprocessing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill light-curve-preprocessing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/light-curve-preprocessing, .gemini/skills/light-curve-preprocessing, .github/skills/light-curve-preprocessing and .opencode/skills/light-curve-preprocessing in your project.

What does Light Curve Preprocessing need to run?

Going by SKILL.md and its folder, Light Curve Preprocessing needs the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Light Curve Preprocessing access the network?

SKILL.md names 1 domain. As links in the text: lightkurve.github.io. This is read from the text; nothing was executed.

Is Light Curve Preprocessing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Light Curve Preprocessing use?

Light Curve Preprocessing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Light Curve Preprocessing use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Light Curve Preprocessing?

Skills that share tags, products or a category with Light Curve Preprocessing: Statistical Analysis (majiayu000/claude-skill-registry, 666 stars), Visual Skills (npc-live/clawfirm, 156 stars), Matlab Analyze Data (matlab/matlab-agentic-toolkit, 1.1k stars) and Cja Dimension Analysis (adobe/skills, 195 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Light Curve Preprocessing?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 180 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.