matrix-operations

matrix-operations is a skill for Claude Code, Codex from Arcadi4/nerdy. It costs 58 tokens per session (3,340 once invoked), scanned A, original, MIT.

A guide for solving matrix problems, including systems of equations, matrix factorizations, least-squares fitting, and related topics.

In plain words
What is it for?
It covers Gaussian elimination, LU and LUP factorization, pivoting, positive-definite matrices, pseudoinverses, and tridiagonal systems.
Why use it?
It helps choose methods only when their mathematical conditions are satisfied and avoids inefficient approaches such as unnecessary matrix inversion.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/arcadi4/nerdy/matrix-operations
Any agent
npx skills add Arcadi4/nerdy --skill matrix-operations
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 matrix-operations

README.md
[![agentmods](https://agentmods.dev/badge/skills/arcadi4/nerdy/matrix-operations.svg)](https://agentmods.dev/skills/arcadi4/nerdy/matrix-operations)
Your own site
<a href="https://agentmods.dev/skills/arcadi4/nerdy/matrix-operations"><img src="https://agentmods.dev/badge/skills/arcadi4/nerdy/matrix-operations.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,340 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00058 $0.03340
Opus 5 $0.00029 $0.01670
Sonnet 5 $0.00012 $0.00668
Haiku 4.5 $0.00006 $0.00334

Measured 4d ago against content hash c60161c46d26, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

matrix-operations 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.

clrs/matrix-operations/SKILL.md · 325 lines

How it starts

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

Matrix Operations

Overview

This skill turns matrix-operation questions into method choices with visible hypotheses. The core habit is: factor once, solve with triangular systems, state the rank or definiteness condition before using a shortcut, and never treat explicit inversion as the default way to solve a linear system.

Shared CLRS Conventions

Use the parent clrs skill for display-math-only formatting, theorem-precondition discipline, and CLRS answer tone. In this chapter skill, keep tables verbal; place every matrix equation, cost expression, or symbolic condition in display LaTeX blocks outside the table.

When to Use

Use this skill for:

  • solving square linear systems by Gaussian elimination, LU decomposition, or LUP decomposition;
  • reusing a factorization for many right-hand sides;
  • deciding whether to compute an explicit inverse;
  • explaining pivoting, permutation arrays, forward substitution, or back substitution;
  • proving facts about symmetric positive-definite matrices and Schur complements;
  • deriving least-squares normal equations and the full-column-rank pseudoinverse;
  • recognizing tridiagonal linear systems and spline-style systems from the chapter problems.

Do not use this skill as the main guide for Strassen-style matrix multiplication; route those questions to divide-and-conquer unless the prompt is about its equivalence with inversion.

First Decision

Situation Choose Why
Square nonsingular system LUP decomposition, then triangular solves Pivoting avoids zero pivots and is the practical chapter default
Many right-hand sides for the same matrix Reuse one LUP factorization Each additional solve is quadratic; explicit inverse is not needed
User asks for the inverse itself Solve one system per identity-column after LUP The inverse is the deliverable, not a shortcut for solving
Matrix is known symmetric positive-definite LU without pivoting is theoretically safe Leading submatrices and Schur complements remain positive-definite
Least-squares with more observations than basis functions Build normal equations if full column rank holds The normal-equation matrix is symmetric positive-definite under that hypothesis
Rectangular, rank-deficient, or numerically delicate prompt State the chapter limit first Do not invent unprovided QR, SVD, or rank-revealing claims unless asked beyond the chapter

Read the full file on GitHub · 325 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. 4d ago First seen · 325 lines · 58 tokens per session scan A c60161c46d26

Subscribe to this mod's changes

matrix-operations is a skill published in the GitHub repository Arcadi4/nerdy (7 stars, last pushed 4mo ago), licensed MIT. It adds 58 tokens to every session and 3,340 once invoked, about $0.0003 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-08-31.

Related

Other skills, from other repositories

campus-dsa-visualizer

Activate when a student, TA, or instructor asks to visualize the execution of a data structure or algorithm rather than just read its code — trigger phrasings include "visualize this binary search tree", "show me how quicksort partitions this array step by step", "trace this BFS/DFS on the whiteboard", "draw the DP…

ieeecsopen/mcp-cs · 148 tokens

building-patient-timelines

Assemble a chronological patient timeline from OpenMed-extracted clinical events, normalizing dates and resolving relative time expressions on-device. Use when the user wants to build a patient timeline, order events from clinical notes, reconstruct a longitudinal history, plot a course of illness, or turn…

maziyarpanahi/openmed · 154 tokens

scientific-critical-thinking

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review…

xintaofei/codeg · 63 tokens

scientific-critical-thinking

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review…

K-Dense-AI/claude-scientific-writer · 63 tokens

evomath-tao

Use this skill whenever the user submits a non-trivial mathematical claim that needs a rigorous proof or audit. Trigger on IMO/Putnam/USAMO/Olympiad-style problems, ML/AI theoretical statements, research conjectures, suspected-false claims, multi-step proofs the user already failed on, proof drafts with possible…

EvoScientist/EvoSkills · 203 tokens

thermite

Thermite, the generic ISA-portable Rust SIMD library, and its thermite- companions (special, dual/autodiff, compensated/double-double, sort, sdf, geometry, ffi). Load when writing/reviewing/debugging code using thermite/thermite- crates - GenericVector/NumericVector/FloatVector bounds, the policy math library, masks…

raygon-renderer/thermite · 195 tokens