trend-analysis

A statistical guide for finding long-term increases or decreases in time-series data, meaning measurements collected over time.

In plain words
What is it for?
It helps analyze trends with linear regression or with Sen's slope and the Mann-Kendall test, including environmental data.
Why use it?
It helps distinguish a meaningful trend from ordinary variation in the measurements.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/benchflow-ai/benchflow/trend-analysis
Any agent
npx skills add benchflow-ai/benchflow --skill trend-analysis
Clone the repo
git clone --depth 1 https://github.com/benchflow-ai/benchflow

Made for: Claude Code, Codex.

Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 668 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00035 $0.00668
Opus 5 $0.00017 $0.00334
Sonnet 5 $0.00007 $0.00134
Haiku 4.5 $0.00003 $0.00067

Measured 2d ago against content hash eec026677dd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

trend-analysis 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 2d 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.

tests/fixtures/skillsbench_slice/lake-warming-attribution/environment/skills/trend-analysis/SKILL.md · 90 lines

How it starts

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

Trend Analysis Guide

Overview

Trend analysis determines whether a time series shows a statistically significant long-term increase or decrease. This guide covers both parametric (linear regression) and non-parametric (Sen's slope) methods.

Parametric Method: Linear Regression

Linear regression fits a straight line to the data and tests if the slope is significantly different from zero.

from scipy import stats

slope, intercept, r_value, p_value, std_err = stats.linregress(years, values)

print(f"Slope: {slope:.2f} units/year")
print(f"p-value: {p_value:.2f}")

Assumptions

  • Linear relationship between time and variable
  • Residuals are normally distributed
  • Homoscedasticity (constant variance)

Non-Parametric Method: Sen's Slope with Mann-Kendall Test

Sen's slope is robust to outliers and does not assume normality. Recommended for environmental data.

import pymannkendall as mk

result = mk.original_test(values)

print(result.slope)  # Sen's slope (rate of change per time unit)
print(result.p)      # p-value for significance
print(result.trend)  # 'increasing', 'decreasing', or 'no trend'

Comparison

Method Pros Cons
Linear Regression Easy to interpret, gives R² Sensitive to outliers
Sen's Slope Robust to outliers, no normality assumption Slightly less statistical power

Significance Levels

p-value Interpretation
p < 0.01 Highly significant trend
p < 0.05 Significant trend
p < 0.10 Marginally significant
p >= 0.10 No significant trend

Example: Annual Precipitation Trend

import pandas as pd
import pymannkendall as mk

# Load annual precipitation data
df = pd.read_csv('precipitation.csv')
precip = df['Precipitation'].values

# Run Mann-Kendall test
result = mk.original_test(precip)
print(f"Sen's slope: {result.slope:.2f} mm/year")
print(f"p-value: {result.p:.2f}")
print(f"Trend: {result.trend}")

Read the full file on GitHub · 90 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. 2d ago First seen · 90 lines · 35 tokens per session scan A eec026677dd7

Subscribe to this mod's changes

trend-analysis is a skill published in the GitHub repository benchflow-ai/benchflow (335 stars, last pushed 3d ago), licensed Apache-2.0. It adds 35 tokens to every session and 668 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

lastlight-evals

Scaffold, configure and run a Last Light EVALS workspace — the harness that runs Last Light's real workflows against a mocked GitHub and grades them deterministically. Use when the user wants to "set up / scaffold Last Light Evals", "create an evals workspace or instance", "run evals", "compare models", or author new…

nearform/lastlight · 185 tokens

hotpath_init

Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…

pawurb/hotpath-rs · 88 tokens

review-pr

Walk Sean through an incoming waku-agent PR or issue and present it his way — four fixed sections: what this is, why it matters, how HE can test it with you as copilot, and are we ready to merge / reply / close and why. Use whenever Sean asks to look at, test, triage, or decide on a pull request or an issue, and…

ShenSeanChen/waku-agent · 93 tokens

compose-graphics

Advanced Compose visuals - Material 3 Expressive motion physics, AGSL shaders (Android 13+), Canvas/DrawScope generative, graphicsLayer effects.

Jwuthri/Tracely-ai · 36 tokens

canvas-generative

Algorithmic and generative art with Canvas 2D - particles, flow fields, noise, fractals, L-systems.

Jwuthri/Tracely-ai · 30 tokens

writing-bench-task-judge

Use when writing or modifying checkgoals() / getanswer() / App check methods in benchenv/task/, or when reviewing a draft task's judge correctness. Triggers include adding a new task, editing a judge method, or diagnosing a judge false-positive/negative.

Purewhiter/mobilegym · 68 tokens