Matplotlib
zLanqing/codex-claude-academic-skills
Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.
A skill your agent uses when working on pytrendy code, tests, or data.
$ npx skills add RussellSB/pytrendy --skill pytrendy -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install RussellSB/pytrendy pytrendy --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/RussellSB/pytrendy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/pytrendy .claude/skills/pytrendy && rm -rf skills-srcUse ~/.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/
Install the "pytrendy" agent skill from https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendy into .claude/skills/pytrendy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytrendy", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add RussellSB/pytrendy --skill pytrendy -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install RussellSB/pytrendy pytrendy --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RussellSB/pytrendy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.opencode/skills/pytrendy .agents/skills/pytrendy && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pytrendy" agent skill from https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendy into .agents/skills/pytrendy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytrendy", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add RussellSB/pytrendy --skill pytrendy -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install RussellSB/pytrendy pytrendy --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RussellSB/pytrendy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.opencode/skills/pytrendy .cursor/skills/pytrendy && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pytrendy" agent skill from https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendy into .cursor/skills/pytrendy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytrendy", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/RussellSB/pytrendy.git --path .opencode/skills/pytrendy--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add RussellSB/pytrendy --skill pytrendy -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install RussellSB/pytrendy pytrendy --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RussellSB/pytrendy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.opencode/skills/pytrendy .gemini/skills/pytrendy && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pytrendy" agent skill from https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendy into .gemini/skills/pytrendy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytrendy", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install RussellSB/pytrendy pytrendyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add RussellSB/pytrendy --skill pytrendy -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/RussellSB/pytrendy.git skills-src && mkdir -p .github/skills && cp -r skills-src/.opencode/skills/pytrendy .github/skills/pytrendy && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pytrendy" agent skill from https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendy into .github/skills/pytrendy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytrendy", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add RussellSB/pytrendy --skill pytrendy -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install RussellSB/pytrendy pytrendy --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/RussellSB/pytrendy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.opencode/skills/pytrendy .opencode/skills/pytrendy && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pytrendy" agent skill from https://github.com/RussellSB/pytrendy/tree/main/.opencode/skills/pytrendy into .opencode/skills/pytrendy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytrendy", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pytrendyA skill your agent uses when working on pytrendy code, tests, or data.
Pytrendy is an agent skill from RussellSB/pytrendy. Use when working on pytrendy code, tests, or data. Covers the 5-stage pipeline, module map, install/verify, datasets, PyTrendyResults API, and docs tooling.
Its SKILL.md is about 2.5k 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. The repository describes itself as: Trend Detection in Python. Applicable for real-world industry use cases in time series. The licence is MIT.
Read from SKILL.md and the folder at commit 0d6d5bb. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pippytestFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pytrendy loads about 2.5k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 865 words of instructions outside code blocks.
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.
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.
The full file from RussellSB/pytrendy at commit 0d6d5bb, republished under its MIT licence (© RussellSB). 865 words, ~2,549 tokens.
.claude/skills/pytrendy/SKILL.md (or your agent's skills folder).pytrendy/detect_trends.py — the only entrypoint that matters. detect_trends(df, date_col, value_col, plot=True, method_params=None, debug=False) runs:
df → process_signals → get_segments → refine_segments → analyse_segments → [plot_pytrendy] → PyTrendyResultsStages mutate a copy of the input DataFrame and a list of segment dicts. The final PyTrendyResults wraps the segment list.
pytrendy/
├── __init__.py # public exports: detect_trends, load_data, plot_pytrendy, dtw
├── detect_trends.py # pipeline orchestrator (85 lines — read it first)
├── process_signals.py # Savitzky-Golay smoothing + rolling stats → flat/noise/trend flags
├── simpledtw.py # DTW for gradual-vs-abrupt classification (standalone, no deps on rest)
├── io/
│ ├── data_loader.py # load_data('series_synthetic' | 'classes_signals')
│ ├── plot_pytrendy.py # annotated matplotlib viz; called by detect_trends when plot=True
│ ├── results_pytrendy.py # PyTrendyResults: .print_summary(), filtering, ranking, tabular access
│ └── data/ # series_synthetic.csv, classes_signals.csv (packaged CSVs)
└── post_processing/
├── segments_get.py # extract contiguous segments from trend_flag; min-length filter
├── segments_refine/ # package — the heaviest stage
│ ├── __init__.py # refine_segments() orchestrator
│ ├── gradual_expand_contract.py # boundary adjust via local extrema (±7d window)
│ ├── trend_classify.py # DTW-based gradual/abrupt labeling
│ ├── abrupt_shaving.py # z-score outlier changepoint detection on abrupt segs
│ ├── segment_grouping.py # merge short consecutive same-direction segments
│ ├── artifact_cleanup.py # remove invalid segments, fill gaps with flats
│ └── update_neighbours.py # boundary cascade when a neighbor changes
└── segments_analyse.py # per-segment metrics: change, duration, SNR, change_rankload_data(name) reads CSVs shipped in pytrendy/io/data/:
'series_synthetic' — synthetic daily time series with embedded up/down/flat regions. The README quickstart and core plot tests use this.'classes_signals' — reference signals used internally by trend_classify for DTW alignment (gradual vs abrupt templates).Adding a dataset = drop a CSV in pytrendy/io/data/ + extend data_loader.py. It's a plain pd.read_csv wrapper, not a registry.
io/results_pytrendy.py)Returned by detect_trends(). Constructed from the segment list and auto-populates best, df, df_summary, summary in __init__.
| Attr | Type | What it is |
|---|---|---|
.segments | list[dict] | Raw segment dicts (all directions including Flat/Noise). |
.trend_segments | list[dict] | Subset with a trend_class key (Up/Down only — Flats/Noise excluded). |
.best | dict | None | Segment with lowest change_rank among trend_segments; None if no trends. Picked on total_change magnitude (steepness × length), not raw change. |
.df | pd.DataFrame | Full segment table, indexed by time_index. All columns: direction, start, end, trend_class, change, pct_change, days, total_change, SNR, change_rank (+ padded when abrupt_padding>0). |
.df_summary | pd.DataFrame | Slimmer view: direction, start, end, days, total_change, change_rank, trend_class. What .print_summary() prints. |
.summary | dict | direction_counts (Counter→dict over Up/Down/Flat/Noise), trend_class_counts (gradual/abrupt), highest_total_change. |
.print_summary() — prints direction counts, best trend (direction + date range), and the df_summary table. Use for high-level overview; cheap to paste into an LLM context when developing..filter_segments(direction='Any', sort_by='time_index', format='df') — the workhorse for narrowing focus.direction: 'Any' | 'Up/Down' | 'Up' | 'Down' | 'Flat' | 'Noise'.sort_by: 'time_index' (ascending) or 'change_rank' (descending by abs(total_change)).format: 'df' (default) or 'dict'.[:3] for top-N. Invalid direction/sort_by/format print a hint and fall through.results.print_summary(). One-glance counts + best trend.results.filter_segments(direction='Up') to isolate uptrends only (the abrupt notebook does this to compare uptrends against each other).results.filter_segments(direction='Up/Down', sort_by='change_rank'). Rank 1 = steepest+longest by total_change magnitude.results.filter_segments(direction='Up', sort_by='change_rank')[:3].results.df (includes change, pct_change, SNR that df_summary omits).results.filter_segments(format='dict') or results.segments / results.trend_segments.results.best (dict).change / total_change — cumulative sum of day-over-day differences across the segment.pct_change — relative change; e.g. 3.67 = +367%. Useful for comparing trends of different baselines.days — segment length.SNR — signal-to-noise ratio. Lower SNR ≈ noisier segment. Noise segments typically have SNR < ~7; clean gradual trends sit around 17-22. Borderline trends (e.g. SNR ~5.9) show up with high change_rank numbers — still detected but flagged as weak.change_rank — 1 = strongest trend by abs(total_change). Lower is stronger. Artifact trends (short, low-magnitude) get high rank numbers and are effectively de-prioritized.padded — True only when abrupt_padding>0 extended an abrupt segment's end date; NaN for gradual/flat/noise.trend_class — gradual / abrupt / NaN (NaN for Flat/Noise).trend_class='gradual' for all Up/Down. Compare via filter_segments(direction='Up', sort_by='change_rank') to rank competing uptrends.method_params=dict(abrupt_padding=N) to extend each abrupt segment N days forward (for Interrupted Time Series / Pre-Post analysis). Padding stops early if the signal reverses; segments gain a padded=True column. Combine with gradual in one run — DTW classifies each segment independently, so a single detect_trends() call returns both classes.direction='Noise' segments are flagged by a rolling SNR threshold, not by magnitude. Use filter_segments(direction='Noise') to inspect what got rejected. As noise std rises, trends shorten and more Noise/Flat segments appear; borderline trends keep high change_rank so they're easy to filter out.avoid_noise — method_params=dict(avoid_noise=False) opts out of noise detection entirely. Spikes and noisy regions are ignored and trend detection proceeds straight through them. Use case: new-market launches or quasi-experiments where the signal is zero before and after an activation window — with avoid_noise=True (default), the step-change boundaries produce Noise artifacts; with avoid_noise=False, you get clean Up/Down segments. See whats-new.md v1.2.0 entry / PR #110.Tests exercise this heavily in tests/test_io_results.py (all @pytest.mark.core) — any API change there breaks the core suite immediately. Read results_pytrendy.py before extending the class.
Up, Down, Flat, Noise} — assigned during process_signals/segments_get.gradual, abrupt, NaN} — assigned by segments_refine/trend_classify.py via DTW against classes_signals references. Only Up/Down segments get a class; Flat/Noise stay NaN.segments_get.py).method_params (the only tuning surface){'abrupt_padding': 0, 'avoid_noise': True} # defaults; see maintenance skill for deprecation notedetect_trends reconstructs this dict from an allowlist — unknown keys are dropped. Adding a tunable = update the allowlist in detect_trends.py:72 + the docstring + add a test.
During development you can import pytrendy directly — no rebuild step needed.
The commands below are primarily for end users or when setting up a fresh environment.
pip install -e ".[dev]" # dev: pytest, pytest-cov, pytest-mpl, pytest-timeout
pip install -e ".[dev,docs]" # add mkdocs material + mkdocstrings for docs workVerify before push — CI runs core first, then non-core with --cov-append:
pytest tests/ -m core # essential, must pass
pytest tests/ -m "not core" --cov-append # the rest
# or just: pytest (pyproject addopts already set --mpl --cov=pytrendy)pytest-timeout).pyproject.toml). Regenerating baselines on another version = false failures. See the test skill.coverage.xml + .coverage are gitignored artifacts; don't commit.nav: in mkdocs.yml.mkdocs serve for local preview. PRs touching docs/, mkdocs.yml, or pytrendy/ auto-deploy a preview at russellsb.github.io/pytrendy/pr-<N>/ (bot comments the URL; removed on PR close; fork PRs skipped).docs/examples/ — run scripts/normalize_notebooks.sh before building docs (works around a JupyterLite text-output rendering bug).© RussellSB, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .opencode/skills/pytrendy of RussellSB/pytrendy.
Open the folder on GitHubat commit 0d6d5bb
Pytrendy 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pytrendy this skillRussellSB/pytrendy | 106 | — | ~2.5k | Automated safety check: Pass | MIT | |
| MatplotlibzLanqing/codex-claude-academic-skills | 4.7k | 17 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Exploratory Data Analysisspacering-net/codeg | 3.9k | 14 repos | ~3.6k | Automated safety check: Pass | MIT | |
| Scikit LearnzLanqing/codex-claude-academic-skills | 4.7k | 16 repos | ~3.9k | Automated safety check: Pass | BSD-3-Clause | |
| Chart Visualizationbytedance/deer-flow | 84k | 1 repos | ~840 | Automated safety check: Pass | MIT | |
| TimesFM Forecastinggoogle-research/timesfm | 34k | — | ~4.7k | Automated safety check: Pass | Apache-2.0 |
zLanqing/codex-claude-academic-skills
Low-level plotting library for full customization. An agent skill from zLanqing/codex-claude-academic-skills.
spacering-net/codeg
Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.
zLanqing/codex-claude-academic-skills
Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.
bytedance/deer-flow
Picks a suitable chart type from 26 options for your data, maps the data to that chart's parameters and generates a chart image through a JavaScript script.
google-research/timesfm
Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.
vercel/next.js
Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…
RussellSB/pytrendy
A skill your agent uses when debugging a pytrendy bug, reproducing a regression, or inspecting intermediate pipeline stage output.
RussellSB/pytrendy
A skill your agent uses when making ANY code change to pytrendy, creating issues, or opening PRs.
RussellSB/pytrendy
A skill your agent uses when preparing a fix or feature PR for review and adding before/after plot evidence to the PR body.
RussellSB/pytrendy
A skill your agent uses when touching .github/workflows/, release config (.releaserc), mkdocs.yml, docs deploy, or the whats-new generator.
Categories
A skill your agent uses when working on pytrendy code, tests, or data. Pytrendy is an agent skill from RussellSB/pytrendy. Use when working on pytrendy code, tests, or data.
Pytrendy fits situations like: working on pytrendy code.
Run `npx skills add RussellSB/pytrendy --skill pytrendy -a claude-code`. Or copy the skill folder (.opencode/skills/pytrendy in RussellSB/pytrendy) into .claude/skills/pytrendy in your project. Claude Code loads it when a task matches its description.
Run `npx skills add RussellSB/pytrendy --skill pytrendy -a codex`. Or copy the skill folder (.opencode/skills/pytrendy in RussellSB/pytrendy) into .agents/skills/pytrendy in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add RussellSB/pytrendy --skill pytrendy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pytrendy, .gemini/skills/pytrendy, .github/skills/pytrendy and .opencode/skills/pytrendy in your project.
Going by SKILL.md and its folder, Pytrendy needs the command-line tools its instructions call (pip and pytest). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Pytrendy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Pytrendy: Matplotlib (zLanqing/codex-claude-academic-skills, 4.7k stars), Exploratory Data Analysis (spacering-net/codeg, 3.9k stars), Scikit Learn (zLanqing/codex-claude-academic-skills, 4.7k stars) and Chart Visualization (bytedance/deer-flow, 84k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
RussellSB (a GitHub user) maintains it in RussellSB/pytrendy, which has 106 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 8, 2026.
Source: RussellSB/pytrendy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.