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.
npx skills add cxcscmu/SkillLearnBench --skill dbscan-custom-metricgit clone --depth 1 https://github.com/cxcscmu/SkillLearnBenchWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cxcscmu/skilllearnbench/dbscan-custom-metric)<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/dbscan-custom-metric"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/dbscan-custom-metric.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium analysis-evasion · line 1 Suspicious Unicode normalization or mixed-script contentFix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.01535 |
| Opus 5 | $0.00016 | $0.00767 |
| Sonnet 5 | $0.00006 | $0.00307 |
| Haiku 4.5 | $0.00003 | $0.00153 |
Grade A, and why
dbscan-custom-metric 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DBSCAN with Custom Distance Metrics
Overview
scikit-learn's DBSCAN accepts a metric parameter that can be a callable Python function. When using a custom metric, set algorithm='ball_tree' or algorithm='brute' (default 'auto' may not support custom callables).
Installation
pip install scikit-learn numpy
Custom Metric Definition
A custom metric must accept two 1D arrays and return a scalar distance.
import numpy as np
def weighted_euclidean(a, b, w=1.0):
"""
Weighted Euclidean distance:
d(a, b) = sqrt((w * Δx)² + ((2 - w) * Δy)²)
When w=1: standard Euclidean distance.
w>1: attenuates y-distances (stretches x influence).
w<1: attenuates x-distances (stretches y influence).
"""
dx = a[0] - b[0]
dy = a[1] - b[1]
return np.sqrt((w * dx)**2 + ((2 - w) * dy)**2)
Using with DBSCAN
DBSCAN requires a metric with a fixed signature (a, b) -> float. Use functools.partial or a closure to bind parameters:
from sklearn.cluster import DBSCAN
from functools import partial
import numpy as np
def make_metric(shape_weight):
def metric(a, b):
dx = a[0] - b[0]
dy = a[1] - b[1]
return np.sqrt((shape_weight * dx)**2 + ((2 - shape_weight) * dy)**2)
return metric
# Run DBSCAN
points = np.array([[x1, y1], [x2, y2], ...]) # shape (N, 2)
dbscan = DBSCAN(eps=epsilon, min_samples=min_samples, metric=make_metric(1.2))
labels = dbscan.fit_predict(points)
Important: When using a custom callable metric, sklearn uses algorithm='brute' internally. You do NOT need to pass a precomputed distance matrix — just pass the raw points array.
Extracting Cluster Centroids
import numpy as np
def get_cluster_centroids(points, labels):
"""
Returns array of centroids for each cluster (excluding noise label -1).
points: np.array of shape (N, 2)
labels: np.array of cluster labels from DBSCAN
"""
unique_labels = set(labels) - {-1} # exclude noise
centroids = []
for label in unique_labels:
mask = labels == label
centroid = points[mask].mean(axis=0)
centroids.append(centroid)
return np.array(centroids) if centroids else np.empty((0, 2))
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.
- 4d ago First seen · 187 lines · 32 tokens per session scan A 8016b5b829d4
dbscan-custom-metric is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 1,535 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-09-03.
Other skills, from other repositories
seisbench-model-api
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…
jax-skills
High-performance numerical computing and machine learning workflows using JAX. Supports array operations, automatic differentiation, JIT compilation, RNN-style scans, map/reduce operations, and gradient computations. Ideal for scientific computing, ML models, and dynamic array transformations.
Multimodal Alignment
Align speech, text, image, or video signals for multimodal benchmarks.
embodied-eval-automation
Plan, explain, build, run, monitor, validate, transfer, and audit reproducible embodied-model studies and batch episode collection. Use when a user wants to connect a local, SSH, or cloud GPU host; understand and compare a policy, VLA, world model, world-action model, or hybrid with a benchmark; discover and reuse…
pick-a-pii-model
Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.
esm
Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel…