machine-learning-algorithms

machine-learning-algorithms is a skill for Claude Code, Codex from Arcadi4/nerdy. It costs 53 tokens per session (3,759 once invoked), scanned A, original, MIT.

A guide to machine-learning algorithms including k-means clustering, online expert prediction, gradient descent, linear regression, and regularization. It focuses on the mathematical models and proofs used in CLRS-style questions.

In plain words
What is it for?
Use it to explain or solve questions about clustering, multiplicative weights, weighted majority, convex optimization, regression, and regularization.
Why use it?
It separates textbook assumptions and guarantees from practical machine-learning defaults, reducing the risk of using the wrong algorithm or proof argument.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to explain or solve questions about clustering, multiplicative weights, weighted majority, convex optimization, regression, and regularization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arcadi4/nerdy/machine-learning-algorithms
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.

Any agent
npx skills add Arcadi4/nerdy --skill machine-learning-algorithms
Clone the repo
git clone --depth 1 https://github.com/Arcadi4/nerdy

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for machine-learning-algorithms

README.md
[![agentmods](https://agentmods.dev/badge/skills/arcadi4/nerdy/machine-learning-algorithms/github.svg)](https://agentmods.dev/skills/arcadi4/nerdy/machine-learning-algorithms)
Your own site
<a href="https://agentmods.dev/skills/arcadi4/nerdy/machine-learning-algorithms"><img src="https://agentmods.dev/badge/skills/arcadi4/nerdy/machine-learning-algorithms/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for machine-learning-algorithms

Your own site · 80×15
<a href="https://agentmods.dev/skills/arcadi4/nerdy/machine-learning-algorithms"><img src="https://agentmods.dev/badge/skills/arcadi4/nerdy/machine-learning-algorithms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,759 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00053 $0.03759
Opus 5.5 $0.00021 $0.01504
Sonnet 5.5 $0.00011 $0.00752
Haiku 4.5 $0.00005 $0.00376

Measured 1mo ago against content hash 01595379268d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

machine-learning-algorithms 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 1mo 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.

clrs/machine-learning-algorithms/SKILL.md · 410 lines

How it starts

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

Machine-Learning Algorithms

Overview

Machine-learning-algorithm answers must separate the textbook model from production machine-learning practice. Use the chapter mechanisms for their invariants, regret potentials, and convex-optimization proof moves; do not silently replace them with modern defaults such as k-means++ initialization, randomized exponential weights, or library-regression pipelines unless the prompt asks for production advice.

Core principle: first identify whether the task is clustering, online expert prediction, or convex optimization, then state the model assumptions that make the chapter theorem true before giving an algorithm, bound, or engineering recommendation.

Shared CLRS Conventions

Follow the parent clrs skill for mathematical formatting, direct polished answers, theorem preconditions, and formula-free headings. Keep tables verbal and put objectives, updates, bounds, and potentials in display blocks adjacent to the table.

Answer Formatting Guardrail

Machine-learning prompts often invite verification tables after theorem statements. A verification table is still a table: do not put parameter ranges, update factors, objective values, asymptotic bounds, theorem inequalities, or potential expressions in its cells.

Use this safe pattern instead:

  1. In the table, use verbal labels such as "chapter penalty range," "prefix mistake theorem," "expert lower bound," or "projected-gradient guarantee."
  2. Immediately before or after the table, put the exact expression in a display block.
  3. If several expressions must be checked, use a numbered list with one display block per item instead of a table.

When reviewing your own answer, scan tables separately. If a table cell contains a symbol-heavy expression, move the expression out of the table before responding.

When to Use

Use this skill for:

  • k-means clustering, squared Euclidean dissimilarity, Lloyd's procedure, centroid updates, empty clusters, and vector quantization;
  • online prediction from binary experts, deterministic weighted majority, multiplicative weights, mistake bounds, and regret-style potential arguments;
  • convex gradient descent, projected gradient descent, average-iterate guarantees, line search, and amortized potential proofs;
  • least-squares linear regression as convex optimization over weights, including norm-constrained regularization.

Read the full file on GitHub · 410 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. 1mo ago First seen · 410 lines · 53 tokens per session scan A 01595379268d

Subscribe to this mod's changes

machine-learning-algorithms is a skill published in the GitHub repository Arcadi4/nerdy (6 stars, last pushed 6mo ago), licensed MIT. It adds 53 tokens to every session and 3,759 once invoked, about $0.0002 per session on Opus 5.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-31.

Related

Other skills, from other repositories

fs-notebook-tabs

A computer-science capstone: an on-device ML keyboard that predicts next words privately — problem, method, evaluation, and defense answers. Built as a decision-grade coursework defense deck for professor, defense committee.

nexu-io/open-design · 47 tokens

model-architecture-litgpt

Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral). Use when need clean model implementations, educational understanding of architectures, or production fine-tuning with LoRA/QLoRA. Single-file implementations, no abstraction layers.

davila7/claude-code-templates · 75 tokens

model-architecture-rwkv

RNN+Transformer hybrid with O(n) inference. Linear time, infinite context, no KV cache. Train like GPT (parallel), infer like RNN (sequential). Linux Foundation AI project. Production at Windows, Office, NeMo. RWKV-7 (March 2025). Models up to 14B parameters.

davila7/claude-code-templates · 74 tokens

kv-cache-design

A guide to arranging an AI agent's conversation so previously processed text can be reused. A KV cache stores intermediate results for earlier tokens, while a prompt cache reuses a stable beginning across requests.

bojieli/ai-agent-book · 91 tokens

reward-design

A guide to defining the scores that an AI agent receives during trial-and-error training. It covers checks based on rules, human preferences, or another model, and distinguishes rewarding the final result from rewarding the steps taken.

bojieli/ai-agent-book · 131 tokens

agent-evolution

A guide to making an AI agent improve from its past runs. It covers how to judge results, extract reusable lessons, and decide whether to store them as knowledge, instructions, code, or model training.

bojieli/ai-agent-book · 126 tokens