Agent skill

Matched Filtering

by benchflow-ai in benchflow-ai/skillsbench

Matched filtering techniques for gravitational wave detection.

Apache-2.0Auto-check passed

Install Matched Filtering

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill matched-filtering -a claude-code

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

GitHub CLI
$ gh skill install benchflow-ai/skillsbench matched-filtering --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/gravitational-wave-detection/environment/skills/matched-filtering .claude/skills/matched-filtering && 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
matched-filtering
GitHub stars
1.8k
Token cost
~1.6k tokens
SKILL.md length
449 words
Files
1
Skills in repo
178
Repo updated
First seen
Licence
Apache-2.0

At a glance

Matched filtering techniques for gravitational wave detection.

  • Works in 4 steps: Template waveform (expected signal shape) → Conditioned detector data (preprocessed… → Power spectral density (PSD) of the noise → …
  • Searching for signals in detector data using template waveforms
  • SKILL.md covers Overview, Time-Domain Waveforms, Frequency-Domain Waveforms and Key Differences: Time vs…, plus 6 more sections
  • Calls pip

What it does

Matched Filtering is an agent skill from benchflow-ai/skillsbench. Matched filtering techniques for gravitational wave detection. Use when searching for signals in detector data using template waveforms, including both time-domain and frequency-domain approaches. Works with PyCBC for generating templates and performing matched filtering.

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

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

  • Searching for signals in detector data using template waveforms
  • Including both time-domain and frequency-domain approaches

Example prompts

  • “/matched-filtering”

Requirements

  • Python 3

Workflow steps

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

  1. Template waveform (expected signal shape)
  2. Conditioned detector data (preprocessed strain)
  3. Power spectral density (PSD) of the noise
  4. SNR calculation and peak finding

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):

    • pycbc.org
    • colab.research.google.com

    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

Matched Filtering loads about 1.6k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 449 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.6k

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). 449 words, ~1,600 tokens.

Download SKILL.mdSave it as .claude/skills/matched-filtering/SKILL.md (or your agent's skills folder).
name
matched-filtering
description
Matched filtering techniques for gravitational wave detection. Use when searching for signals in detector data using template waveforms, including both time-domain and frequency-domain approaches. Works with PyCBC for generating templates and performing matched filtering.

Matched Filtering for Gravitational Wave Detection

Matched filtering is the primary technique for detecting gravitational wave signals in noisy detector data. It correlates known template waveforms with the detector data to find signals with high signal-to-noise ratio (SNR).

Overview

Matched filtering requires:

  1. Template waveform (expected signal shape)
  2. Conditioned detector data (preprocessed strain)
  3. Power spectral density (PSD) of the noise
  4. SNR calculation and peak finding

PyCBC supports both time-domain and frequency-domain approaches.

Time-Domain Waveforms

Generate templates in time domain using get_td_waveform:

python
from pycbc.waveform import get_td_waveform
from pycbc.filter import matched_filter

# Generate time-domain waveform
hp, hc = get_td_waveform(
    approximant='IMRPhenomD',  # or 'SEOBNRv4_opt', 'TaylorT4'
    mass1=25,                  # Primary mass (solar masses)
    mass2=20,                  # Secondary mass (solar masses)
    delta_t=conditioned.delta_t,  # Must match data sampling
    f_lower=20                 # Lower frequency cutoff (Hz)
)

# Resize template to match data length
hp.resize(len(conditioned))

# Align template: cyclic shift so merger is at the start
template = hp.cyclic_time_shift(hp.start_time)

# Perform matched filtering
snr = matched_filter(
    template,
    conditioned,
    psd=psd,
    low_frequency_cutoff=20
)

# Crop edges corrupted by filtering
# Remove 4 seconds for PSD + 4 seconds for template length at start
# Remove 4 seconds at end for PSD
snr = snr.crop(4 + 4, 4)

# Find peak SNR
import numpy as np
peak_idx = np.argmax(abs(snr).numpy())
peak_snr = abs(snr[peak_idx])
Why Cyclic Shift?

Waveforms from get_td_waveform have the merger at time zero. For matched filtering, we typically want the merger aligned at the start of the template. cyclic_time_shift rotates the waveform appropriately.

Frequency-Domain Waveforms

Generate templates in frequency domain using get_fd_waveform:

python
from pycbc.waveform import get_fd_waveform
from pycbc.filter import matched_filter

# Calculate frequency resolution
delta_f = 1.0 / conditioned.duration

# Generate frequency-domain waveform
hp, hc = get_fd_waveform(
    approximant='IMRPhenomD',
    mass1=25,
    mass2=20,
    delta_f=delta_f,           # Frequency resolution (must match data)
    f_lower=20                 # Lower frequency cutoff (Hz)
)

# Resize template to match PSD length
hp.resize(len(psd))

# Perform matched filtering
snr = matched_filter(
    hp,
    conditioned,
    psd=psd,
    low_frequency_cutoff=20
)

# Find peak SNR
import numpy as np
peak_idx = np.argmax(abs(snr).numpy())
peak_snr = abs(snr[peak_idx])

Key Differences: Time vs Frequency Domain

Time Domain (get_td_waveform)
  • Pros: Works for all approximants, simpler to understand
  • Cons: Can be slower for long waveforms
  • Use when: Approximant doesn't support frequency domain, or you need time-domain manipulation
Frequency Domain (get_fd_waveform)
  • Pros: Faster for matched filtering, directly in frequency space
  • Cons: Not all approximants support it (e.g., SEOBNRv4_opt may not be available)
  • Use when: Approximant supports it and you want computational efficiency

Approximants

Common waveform approximants:

python
# Phenomenological models (fast, good accuracy)
'IMRPhenomD'      # Good for most binary black hole systems
'IMRPhenomPv2'    # More accurate for precessing systems

# Effective One-Body models (very accurate, slower)
'SEOBNRv4_opt'    # Optimized EOB model (time-domain only typically)

# Post-Newtonian models (approximate, fast)
'TaylorT4'        # Post-Newtonian expansion

Note: Some approximants may not be available in frequency domain. If get_fd_waveform fails, use get_td_waveform instead.

Matched Filter Parameters

low_frequency_cutoff
  • Should match your high-pass filter cutoff (typically 15-20 Hz)
  • Templates are only meaningful above this frequency
  • Lower values = more signal, but more noise
Template Resizing
  • Time domain: hp.resize(len(conditioned)) - match data length
  • Frequency domain: hp.resize(len(psd)) - match PSD length
  • Critical for proper correlation
Show full SKILL.md (189 more words)Show less
Crop Amounts

After matched filtering, crop edges corrupted by:

  • PSD filtering: 4 seconds at both ends
  • Template length: Additional 4 seconds at start (for time-domain)
  • Total: snr.crop(8, 4) for time-domain, snr.crop(4, 4) for frequency-domain

Best Practices

  1. Match sampling/frequency resolution: Template delta_t/delta_f must match data
  2. Resize templates correctly: Time-domain → data length, Frequency-domain → PSD length
  3. Crop after filtering: Always crop edges corrupted by filtering
  4. Use abs() for SNR: Matched filter returns complex SNR; use magnitude
  5. Handle failures gracefully: Some approximants may not work for certain mass combinations

Common Issues

Problem: "Approximant not available" error

  • Solution: Try time-domain instead of frequency-domain, or use different approximant

Problem: Template size mismatch

  • Solution: Ensure template is resized to match data length (TD) or PSD length (FD)

Problem: Poor SNR even with correct masses

  • Solution: Check that PSD low_frequency_cutoff matches your high-pass filter, verify data conditioning

Problem: Edge artifacts in SNR time series

  • Solution: Increase crop amounts or verify filtering pipeline order

Dependencies

bash
pip install pycbc numpy

References

© 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/gravitational-wave-detection/environment/skills/matched-filtering of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Matched Filtering 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.

Matched Filtering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Matched Filtering this skillbenchflow-ai/skillsbench1.8k—~1.6kAutomated safety check: PassApache-2.0
Detecting Process Injection Techniquesmukul975/Anthropic-Cybersecurity-Skills34k—~3.5kAutomated safety check: PassApache-2.0
Detecting Evasion Techniques In Endpoint Logsmukul975/Anthropic-Cybersecurity-Skills34k—~2.4kAutomated safety check: PassApache-2.0
Searchdavila7/claude-code-templates32k1 repos~339Automated safety check: PassMIT
Detecting Credential Dumping Techniquesmukul975/Anthropic-Cybersecurity-Skills34k—~849Automated safety check: PassApache-2.0
Detecting Fileless Malware Techniquesmukul975/Anthropic-Cybersecurity-Skills34k—~4.2kAutomated safety check: PassApache-2.0

Similar skills

  • Detecting Process Injection Techniques

    mukul975/Anthropic-Cybersecurity-Skills

    Detects and analyzes process injection techniques used by malware including classic DLL injection, process hollowing, APC injection, thread hijacking, and reflective loading.

    34k GitHub stars~3.5k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Detecting Evasion Techniques In Endpoint Logs

    mukul975/Anthropic-Cybersecurity-Skills

    Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling.

    34k GitHub stars~2.4k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Search

    davila7/claude-code-templates

    Search Google via Bright Data SERP API. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 1 repo~339 tokens
    Productivity & AutomationAuto-check passed
  • Detecting Credential Dumping Techniques

    mukul975/Anthropic-Cybersecurity-Skills

    Detect LSASS credential dumping, SAM database extraction, and NTDS.dit theft (e.g.

    34k GitHub stars~849 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Detecting Fileless Malware Techniques

    mukul975/Anthropic-Cybersecurity-Skills

    Detects and analyzes fileless malware that operates entirely in memory using PowerShell, WMI, .NET reflection, registry-resident payloads, and living-off-the-land binaries (LOLBins) without writing…

    34k GitHub stars~4.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Detecting Process Hollowing Technique

    mukul975/Anthropic-Cybersecurity-Skills

    Detect process hollowing (MITRE T1055.012) by analyzing memory-mapped sections, hollowed process indicators, and parent-child anomalies using EDR telemetry, Volatility's malfind plugin, pe-sieve…

    34k GitHub stars~1.2k tokensUpdated 1 mo ago
    SecurityAuto-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

Questions about Matched Filtering

What does Matched Filtering do?

Matched filtering techniques for gravitational wave detection. Matched Filtering is an agent skill from benchflow-ai/skillsbench. Matched filtering techniques for gravitational wave detection.

When should I use Matched Filtering?

Matched Filtering fits situations like: searching for signals in detector data using template waveforms; including both time-domain and frequency-domain approaches.

How do I install Matched Filtering in Claude Code?

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

How do I install Matched Filtering in Codex?

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

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

What does Matched Filtering need to run?

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

Does Matched Filtering access the network?

SKILL.md names 2 domains. As links in the text: pycbc.org and colab.research.google.com. This is read from the text; nothing was executed.

Is Matched Filtering 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 Matched Filtering use?

Matched Filtering 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 Matched Filtering use?

About 1.6k tokens (SKILL.md is roughly 6.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 Matched Filtering?

Skills that share tags, products or a category with Matched Filtering: Detecting Process Injection Techniques (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Detecting Evasion Techniques In Endpoint Logs (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Search (davila7/claude-code-templates, 32k stars) and Detecting Credential Dumping Techniques (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Matched Filtering?

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.