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 alivirgo/Major-AI-Skills --skill inline-lambda-functionsgit clone --depth 1 https://github.com/alivirgo/Major-AI-SkillsWrote 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/alivirgo/major-ai-skills/inline-lambda-functions)<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/inline-lambda-functions"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/inline-lambda-functions.svg" alt="Measured on agentmods" height="20"></a>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.01153 |
| Opus 5 | $0.00016 | $0.00576 |
| Sonnet 5 | $0.00006 | $0.00231 |
| Haiku 4.5 | $0.00003 | $0.00115 |
Grade A, and why
inline-lambda-functions 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 2d 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 — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Inline Lambda & Callback Compression Protocol
Overview
When generating data transformations, array processing, or event handlers, default LLM outputs frequently define verbose 5-to-8 line standalone named helper functions for trivial, single-use operations ("Let me define a helper function compareUserTimestamps and then pass it to .sort()").
Defining separate named functions for one-off operations bloats output tokens, introduces unneeded namespace pollution, and fragments the reader's attention across multiple parts of the file.
The Inline Lambda Compression Protocol leverages concise single-expression anonymous functions (JavaScript/TypeScript arrow functions, Python lambdas, Rust closures) directly at the call site.
Verbose Named Helpers vs. Inline Lambda Expressions
┌─────────────────────────────────────────────────────────────┐
│ Callback Code Density Comparison │
│ │
│ Verbose Standalone Named Helper (18 Lines / 140 Tokens): │
│ function compareOrdersByDate(a, b) { │
│ const dateA = new Date(a.createdAt).getTime(); │
│ const dateB = new Date(b.createdAt).getTime(); │
│ return dateB - dateA; │
│ } │
│ function getActiveUserIds(users) { │
│ const activeList = []; │
│ for (let i = 0; i < users.length; i++) { │
│ if (users[i].isActive === true) { │
│ activeList.push(users[i].id); │
│ } │
│ } │
│ return activeList; │
│ } │
│ │
│ Inline Lambda Pipeline (3 Lines / 28 Tokens - 80% Cut): │
│ const sorted = orders.sort((a, b) => b.createdAt - a.createdAt);│
│ const activeIds = users.filter(u => u.isActive).map(u => u.id); │
└─────────────────────────────────────────────────────────────┘
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.
- 2d ago First seen · 130 lines · 32 tokens per session scan A 04f108231fa6
inline-lambda-functions is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 1,153 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-05.
Other skills, from other repositories
claude-api
Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.
plankton-code-quality
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
language-patterns
Provides language-specific patterns for TypeScript, Python, and React including idioms, best practices, and common patterns. Use when implementing features in these languages.
generate-code
Generate TypeScript/Python code scaffolds from VDM-SL specifications. Triggered by "generate code from the spec", "convert to TypeScript", "generate Python code", "create a scaffold", "generate implementation template", "create type definitions from VDM", or "generate agent code". Also responds to Japanese…
azure-cosmos-ts
Data plane SDK for Azure Cosmos DB NoSQL API operations — CRUD on documents, queries, bulk operations.
azure-postgres-ts
Connect to Azure Database for PostgreSQL Flexible Server using the pg (node-postgres) package with support for password and Microsoft Entra ID (passwordless) authentication.