Agent skill

Seisbench Model API

by benchflow-ai in benchflow-ai/skillsbench

An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data.

Apache-2.0Auto-check passedData & Analytics

Install Seisbench Model API

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill seisbench-model-api -a claude-code

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

GitHub CLI
$ gh skill install benchflow-ai/skillsbench seisbench-model-api --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/seismic-phase-picking/environment/skills/seisbench-model-api .claude/skills/seisbench-model-api && 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
seisbench-model-api
GitHub stars
1.8k
Token cost
~1.9k tokens
SKILL.md length
920 words
Files
1
Skills in repo
178
Repo updated
First seen
Licence
Apache-2.0

At a glance

An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data.

  • Tasks that involve Machine learning
  • SKILL.md covers Installing SeisBench, Overview, Loading Pretrained Models and Speeding Up Model Application, plus 2 more sections
  • Calls pip

What it does

Seisbench Model API is an agent skill from benchflow-ai/skillsbench. An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data. It is useful for annotating waveforms using pretrained SOTA ML models, for tasks like phase picking, earthquake detection, waveform denoising and depth estimation. For any waveform, you can manipulate it into an obspy stream object and it will work seamlessly with seisbench models.

Its SKILL.md is about 1.9k 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 Machine learning. It works with Python. 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

  • Tasks that involve Machine learning

Example prompts

  • “/seisbench-model-api”

Requirements

  • Python 3

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

    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.

  • 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

Seisbench Model API loads about 1.9k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 920 words of instructions outside code blocks.

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

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). 920 words, ~1,853 tokens.

Download SKILL.mdSave it as .claude/skills/seisbench-model-api/SKILL.md (or your agent's skills folder).
name
seisbench-model-api
description
An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data. It is useful for annotating waveforms using pretrained SOTA ML models, for tasks like phase picking, earthquake detection, waveform denoising and depth estimation. For any waveform, you can manipulate it into an obspy stream object and it will work seamlessly with seisbench models.

SeisBench Model API

Installing SeisBench

The recommended way is installation through pip. Simply run:

pip install seisbench

Overview

SeisBench offers the abstract class WaveformModel that every SeisBench model should subclass. This class offers two core functions, annotate and classify. Both of the functions are automatically generated based on configurations and submethods implemented in the specific model.

The SeisBenchModel bridges the gap between the pytorch interface of the models and the obspy interface common in seismology. It automatically assembles obspy streams into pytorch tensors and reassembles the results into streams. It also takes care of batch processing. Computations can be run on GPU by simply moving the model to GPU.

The annotate function takes an obspy stream object as input and returns annotations as stream again. For example, for picking models the output would be the characteristic functions, i.e., the pick probabilities over time.

python
stream = obspy.read("my_waveforms.mseed")
annotations = model.annotate(stream)  # Returns obspy stream object with annotations

The classify function also takes an obspy stream as input, but in contrast to the annotate function returns discrete results. The structure of these results might be model dependent. For example, a pure picking model will return a list of picks, while a picking and detection model might return a list of picks and a list of detections.

python
stream = obspy.read("my_waveforms.mseed")
outputs = model.classify(stream)  # Returns a list of picks
print(outputs)

Both annotate and classify can be supplied with waveforms from multiple stations at once and will automatically handle the correct grouping of the traces. For details on how to build your own model with SeisBench, check the documentation of WaveformModel. For details on how to apply models, check out the Examples.

Loading Pretrained Models

For annotating waveforms in a meaningful way, trained model weights are required. SeisBench offers a range of pretrained model weights through a common interface. Model weights are downloaded on the first use and cached locally afterwards. For some model weights, multiple versions are available. For details on accessing these, check the documentation at from_pretrained.

python
import seisbench.models as sbm

sbm.PhaseNet.list_pretrained()                  # Get available models
model = sbm.PhaseNet.from_pretrained("original")  # Load the original model weights released by PhaseNet authors

Pretrained models can not only be used for annotating data, but also offer a great starting point for transfer learning.

Speeding Up Model Application

When applying models to large datasets, run time is often a major concern. Here are a few tips to make your model run faster:

  • Run on GPU. Execution on GPU is usually faster, even though exact speed-ups vary between models. However, we note that running on GPU is not necessarily the most economic option. For example, in cloud applications it might be cheaper (and equally fast) to pay for a handful of CPU machines to annotate a large dataset than for a GPU machine.

  • Use a large batch_size. This parameter can be passed as an optional argument to all models. Especially on GPUs, larger batch sizes lead to faster annotations. As long as the batch fits into (GPU) memory, it might be worth increasing the batch size.

  • Compile your model (torch 2.0+). If you are using torch in version 2.0 or newer, compile your model. It's as simple as running model = torch.compile(model). The compilation will take some time but if you are annotating large amounts of waveforms, it should pay off quickly. Note that there are many options for compile that might influence the performance gains considerably.

  • Use asyncio interface. Load data in parallel while executing the model using the asyncio interface, i.e., annotate_asyncio and classify_asyncio. This is usually substantially faster because data loading is IO-bound while the actual annotation is compute-bound.

  • Manual resampling. While SeisBench can automatically resample the waveforms, it can be faster to do the resampling manually beforehand. SeisBench uses obspy routines for resampling, which (as of 2023) are not parallelised. Check the required sampling rate with model.sampling_rate. Alternative routines are available, e.g., in the Pyrocko library.

Show full SKILL.md (320 more words)Show less

Models Integrated into SeisBench

You don't have to build models from scratch if you don't want to. SeisBench integrates the following notable models from the literature for you to use. Again, as they inherit from the common SeisBench model interface, all these deep learning models are constructed through PyTorch. Where possible, the original trained weights are imported and made available. These can be accessed via the from_pretrained method.

Integrated ModelTask
BasicPhaseAEPhase Picking
CREDEarthquake Detection
DPPPhase Picking
DepthPhaseNetDepth estimation from depth phases
DepthPhaseTEAMDepth estimation from depth phases
DeepDenoiserDenoising
SeisDAEDenoising
EQTransformerEarthquake Detection/Phase Picking
GPDPhase Picking
LFEDetectPhase Picking (Low-frequency earthquakes)
OBSTransformerEarthquake Detection/Phase Picking
PhaseNetPhase Picking
PhaseNetLightPhase Picking
PickBlueEarthquake Detection/Phase Picking
SkynetPhase Picking
VariableLengthPhaseNetPhase Picking

Currently integrated models are capable of earthquake detection and phase picking, waveform denoising, depth estimation, and low-frequency earthquake phase picking. Furthermore, with SeisBench you can build ML models to perform general seismic tasks such as magnitude and source parameter estimation, hypocentre determination etc.

Best Practices

  • If the waveform data happen to be extremely small in scale (<=1e-10), there might be risk of numerical instability. It is acceptable to increase the value first (by multiplying a large number like 1e10) before normalization or passing to the model.

  • Although the seisbench model API will normalize the waveform for you, it is still highly suggested to apply normalization yourself. Since seisbench's normalization scheme uses an epsilon (waveform - mean(waveform)) / (std(waveform) + epsilon), for extremely small values (such as <=1e-10), their normalization can destroy the signals in the waveform.

  • The seisbench model API can process a stream of waveform data of arbitrary length. Hence, it is not necessary to segment the data yourself. In addition, you should not assume a stream of waveform can only contain one P-wave and one S-wave. It is the best to treat the stream like what it is: a stream of continuous data.

© 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/seismic-phase-picking/environment/skills/seisbench-model-api of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Seisbench Model API 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.

Seisbench Model API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Seisbench Model API this skillbenchflow-ai/skillsbench1.8k—~1.9kAutomated safety check: PassApache-2.0
Scikit LearnzLanqing/codex-claude-academic-skills4.6k17 repos~3.9kAutomated safety check: PassBSD-3-Clause
Senior Data ScientistRaidriar7170/hermes-skilleval1256 repos~1.4kAutomated safety check: PassMIT
Geomlitalo-goncalves/geoML109—~4.2kAutomated safety check: PassGPL-3.0
QuantMind Training Config Generatorqusong0627/QuantMind1.7k—~1.5kAutomated safety check: PassAGPL-3.0
Time Series Analytics Useropen-edge-platform/edge-ai-libraries169—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 6 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Geoml

    italo-goncalves/geoML

    Working knowledge of the geoML Python package (github.com/italo-goncalves/geoML): variational Gaussian processes for spatial data, implicit geological modelling, block models, drillhole data…

    109 GitHub stars~4.2k tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • Turns a plain-language model training request into a validated QuantMind training config file that can be imported from the Model Training page.

    1.7k GitHub stars~1.5k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Time Series Analytics User

    open-edge-platform/edge-ai-libraries

    Build a new time-series analytics use case on top of the deployed Time Series Analytics microservice — bring it up with Docker Compose (from a repo clone, or by fetching the compose files from…

    169 GitHub stars~3.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Cuml Machine Learning

    wahyudesu/Fastapi-AI-Production-Template

    A skill your agent uses for GPU-accelerated machine learning on tabular data using NVIDIA cuML.

    114 GitHub stars~1.8k tokensUpdated 5 mo ago
    Data & AnalyticsAuto-check passed

More from benchflow-ai/skillsbench

All 178 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

Works with

Questions about Seisbench Model API

What does Seisbench Model API do?

An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data. Seisbench Model API is an agent skill from benchflow-ai/skillsbench. An overview of the core model API of SeisBench, a Python framework for training and applying machine learning algorithms to seismic data.

When should I use Seisbench Model API?

Seisbench Model API fits situations like: tasks that involve Machine learning.

How do I install Seisbench Model API in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill seisbench-model-api -a claude-code`. Or copy the skill folder (tasks/seismic-phase-picking/environment/skills/seisbench-model-api in benchflow-ai/skillsbench) into .claude/skills/seisbench-model-api in your project. Claude Code loads it when a task matches its description.

How do I install Seisbench Model API in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill seisbench-model-api -a codex`. Or copy the skill folder (tasks/seismic-phase-picking/environment/skills/seisbench-model-api in benchflow-ai/skillsbench) into .agents/skills/seisbench-model-api in your project. Codex loads it when a task matches its description.

Can I use Seisbench Model API 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 seisbench-model-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/seisbench-model-api, .gemini/skills/seisbench-model-api, .github/skills/seisbench-model-api and .opencode/skills/seisbench-model-api in your project.

What does Seisbench Model API need to run?

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

Does Seisbench Model API access the network?

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.

Is Seisbench Model API 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 Seisbench Model API use?

Seisbench Model API 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 Seisbench Model API use?

About 1.9k tokens (SKILL.md is roughly 7.4k 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 Seisbench Model API?

Skills that share tags, products or a category with Seisbench Model API: Scikit Learn (zLanqing/codex-claude-academic-skills, 4.6k stars), Senior Data Scientist (Raidriar7170/hermes-skilleval, 125 stars), Geoml (italo-goncalves/geoML, 109 stars) and QuantMind Training Config Generator (qusong0627/QuantMind, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Seisbench Model API?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 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.