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 agentmods add skills/sutchan/agent-skills-hub/prototype-patternnpx skills add sutchan/Agent-Skills-Hub --skill prototype-patterngit clone --depth 1 https://github.com/sutchan/Agent-Skills-HubWrote 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/sutchan/agent-skills-hub/prototype-pattern)<a href="https://agentmods.dev/skills/sutchan/agent-skills-hub/prototype-pattern"><img src="https://agentmods.dev/badge/skills/sutchan/agent-skills-hub/prototype-pattern.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 | $0.00016 | $0.01258 |
| Opus 5 | $0.00008 | $0.00629 |
| Sonnet 5 | $0.00003 | $0.00252 |
| Haiku 4.5 | $0.00002 | $0.00126 |
Grade A, and why
prototype-pattern 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 today.
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 — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prototype Pattern
The prototype pattern is a useful way to share properties among many objects of the same type. The prototype is an object that's native to JavaScript, and can be accessed by objects through the prototype chain.
In our applications, we often have to create many objects of the same type. A useful way of doing this is by creating multiple instances of an ES6 class.
When to Use
- Use this when many objects need access to the same methods without duplicating them
- This is helpful for understanding JavaScript's inheritance model and ES6 classes
Instructions
- Use ES6 classes to automatically add methods to the prototype
- Use
Object.create()to create objects with a specific prototype - Leverage the prototype chain for inheritance (
extendskeyword in ES6 classes) - Understand that properties on the prototype are shared and not duplicated per instance
Details
Let's say we want to create many dogs! In our example, dogs can't do that much: they simply have a name, and they can bark!
class Dog {
constructor(name) {
this.name = name;
}
bark() {
return `Woof!`;
}
}
const dog1 = new Dog("Daisy");
const dog2 = new Dog("Max");
const dog3 = new Dog("Spot");
Notice here how the constructor contains a name property, and the class itself contains a bark property. When using ES6 classes, all properties that are defined on the class itself, bark in this case, are automatically added to the prototype.
We can see the prototype directly through accessing the prototype property on a constructor, or through the __proto__ property on any instance.
console.log(Dog.prototype);
// constructor: ƒ Dog(name, breed) bark: ƒ bark()
console.log(dog1.__proto__);
// constructor: ƒ Dog(name, breed) bark: ƒ bark()
The value of __proto__ on any instance of the constructor, is a direct reference to the constructor's prototype! Whenever we try to access a property on an object that doesn't exist on the object directly, JavaScript will go down the prototype chain to see if the property is available within the prototype chain.
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.
- today First seen · 126 lines · 16 tokens per session scan A d5bb230b3578
prototype-pattern is a skill published in the GitHub repository sutchan/Agent-Skills-Hub (2 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 1,258 once invoked, about $0.0001 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-04.
Other skills, from other repositories
source-driven-development
Grounds framework-specific code decisions in official documentation instead of training data or memory. Use before writing framework- or library-specific code (forms, routing, data fetching, auth, state management), when the user asks for "current best practices" or "documented"/"verified" code, or before reviewing…
技能创建助手
创建、测试和迭代改进技能的开发指南,用于扩展 Claude 的专业知识、工作流程或工具集成。包含完整的 evaluate 体系:创建 skill 后可以跑测试用例、量化评分、迭代优化 description。.
论文讲解助手
将学术论文PDF转化为结构化、可视化的精讲文档。 触发场景: (1) 用户提供PDF论文文件并要求讲解/分析 (2) 用户询问"帮我讲解这篇论文"、"分析这个PDF" (3) 用户需要提取论文的核心方法、实验结果 (4) 用户希望生成论文的可视化HTML摘要 支持: AI/ML、CV、NLP、系统、理论等计算机科学领域论文.
深度对话思考
深度思考与对话伙伴。帮助你梳理思路、检查事实、辩论观点、探索想法。 适用于:日常思考、技术想法、创业项目讨论、前沿技术探讨、认知提升、 深度思辨、健康计划、天马行空的 idea 等。 当用户说"深度对话"、"跟我聊聊"、"帮我想想"、"思考一下"、 "讨论一下"、"deep dialogue"、"深度思考"时触发。.
french-tutor
Interactive French translation tutor that drills active sentence production. Use this skill whenever the user wants to practice French, do French translation exercises, work on their French production skills, or mentions anything about drilling, practicing, or studying French. Also trigger when the user says things…
anki-cards
Distill conversations into Anki flashcards exported as a TSV file. Use this skill whenever the user mentions Anki, flashcards, spaced repetition cards, "make cards from this", "distill into cards", "I want to memorize this", "create review cards", or any variation of turning conversation content into study material.…