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 thapaliyabikendra/ai-artifacts --skill modern-javascript-patternsgit clone --depth 1 https://github.com/thapaliyabikendra/ai-artifactsWrote 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/thapaliyabikendra/ai-artifacts/modern-javascript-patterns)<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/modern-javascript-patterns"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/modern-javascript-patterns/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.
<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/modern-javascript-patterns"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/modern-javascript-patterns.svg" alt="Reviewed on agentmods" width="80" 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.00064 | $0.01668 |
| Opus 5.5 | $0.00026 | $0.00667 |
| Sonnet 5.5 | $0.00013 | $0.00334 |
| Haiku 4.5 | $0.00006 | $0.00167 |
Grade A, and why
modern-javascript-patterns 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 3mo 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 — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Modern JavaScript Patterns
Master ES6+ features and functional programming for clean, efficient code.
Arrow Functions
// Basic syntax
const add = (a, b) => a + b;
const double = x => x * 2;
const getRandom = () => Math.random();
// Multi-line (need braces)
const processUser = user => {
const normalized = user.name.toLowerCase();
return { ...user, name: normalized };
};
// Returning objects (wrap in parentheses)
const createUser = (name, age) => ({ name, age });
// Lexical 'this' binding
class Counter {
increment = () => { this.count++; }; // 'this' preserved
}
Destructuring
// Object destructuring
const { name, email } = user;
const { name: userName } = user; // Rename
const { age = 25 } = user; // Default value
const { address: { city } } = user; // Nested
const { id, ...userData } = user; // Rest
// Array destructuring
const [first, second] = numbers;
const [, , third] = numbers; // Skip elements
const [head, ...tail] = numbers; // Rest
let [a, b] = [1, 2]; [a, b] = [b, a]; // Swap
// Function parameters
function greet({ name, age = 18 }) {
console.log(`Hello ${name}`);
}
Spread & Rest
// Spread arrays
const combined = [...arr1, ...arr2];
const copy = [...arr1];
// Spread objects
const settings = { ...defaults, ...userPrefs };
const newObj = { ...user, age: 31 };
// Rest parameters
function sum(...numbers) {
return numbers.reduce((total, n) => total + n, 0);
}
Async/Await
// Basic usage
async function fetchUser(id) {
try {
const response = await fetch(`/api/users/${id}`);
return await response.json();
} catch (error) {
console.error('Error:', error);
throw error;
}
}
// Parallel execution
const [user1, user2] = await Promise.all([
fetchUser(1),
fetchUser(2)
]);
// Promise combinators
Promise.all(promises); // Wait for all
Promise.allSettled(promises); // All results, regardless of outcome
Promise.race(promises); // First to complete
Promise.any(promises); // First to succeed
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.
- 3mo ago First seen · 255 lines · 64 tokens per session scan A 233d8cdf88c2
modern-javascript-patterns is a skill published in the GitHub repository thapaliyabikendra/ai-artifacts (25 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 64 tokens to every session and 1,668 once invoked, about $0.0003 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-09-03.
modern-javascript-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| modern-javascript-patternsthapaliyabikendra/ai-artifacts | Skill | 25 | 8mo ago | Apache-2.0 | A | 64 | Claude Code |
| Async Correctness 非同期処理の正しさ検証s977043/river-review | Skill | 8 | yesterday | MIT | A | 95 | Claude Code |
| fastapifastapi/fastapi | Skill | 105k | yesterday | MIT | A | 57 | Claude Code, Codex |
| fastapiericrisco/rsc-harness | Skill | 701 | yesterday | MIT | A | 94 | Claude Code, Codex |
| pythonericrisco/rsc-harness | Skill | 701 | yesterday | MIT | A | 94 | Claude Code, Codex |
| connect-toolericrisco/rsc-harness | Skill | 701 | yesterday | MIT | B | 109 | Claude Code, Codex |
| pytdbotpytdbot/client | Skill | 145 | 4d ago | MIT | A | 49 | Claude Code, Codex |