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/atstaeff/ai-agents/frontend-patternsnpx skills add atstaeff/ai-agents --skill frontend-patternsgit clone --depth 1 https://github.com/atstaeff/ai-agentsWrote 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/atstaeff/ai-agents/frontend-patterns)<a href="https://agentmods.dev/skills/atstaeff/ai-agents/frontend-patterns"><img src="https://agentmods.dev/badge/skills/atstaeff/ai-agents/frontend-patterns.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.00022 | $0.02798 |
| Opus 5 | $0.00011 | $0.01399 |
| Sonnet 5 | $0.00004 | $0.00560 |
| Haiku 4.5 | $0.00002 | $0.00280 |
Grade A, and why
frontend-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 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.
How it starts
The opening of the file, as written. The whole thing — 420 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Patterns Skill
Instructions for AI
Apply modern frontend patterns, TypeScript best practices, and production-grade standards for Vue.js and Angular applications. Use this skill when writing, reviewing, or refactoring frontend code.
Core Patterns
1. Composable / Hook Pattern (Vue)
Extract reusable stateful logic into composable functions.
import { ref, computed, onUnmounted, type Ref } from 'vue'
interface UsePaginationOptions {
pageSize?: number
initialPage?: number
}
interface UsePaginationReturn<T> {
currentPage: Ref<number>
pageSize: Ref<number>
totalPages: Ref<number>
paginatedItems: Ref<T[]>
next: () => void
prev: () => void
goTo: (page: number) => void
}
export function usePagination<T>(
items: Ref<T[]>,
options: UsePaginationOptions = {}
): UsePaginationReturn<T> {
const currentPage = ref(options.initialPage ?? 1)
const pageSize = ref(options.pageSize ?? 10)
const totalPages = computed(() =>
Math.ceil(items.value.length / pageSize.value)
)
const paginatedItems = computed(() => {
const start = (currentPage.value - 1) * pageSize.value
return items.value.slice(start, start + pageSize.value)
})
const goTo = (page: number) => {
currentPage.value = Math.max(1, Math.min(page, totalPages.value))
}
const next = () => goTo(currentPage.value + 1)
const prev = () => goTo(currentPage.value - 1)
return { currentPage, pageSize, totalPages, paginatedItems, next, prev, goTo }
}
2. Service Injection Pattern (Angular)
Typed, injectable services with clean separation of concerns.
import { Injectable, inject } from '@angular/core'
import { HttpClient } from '@angular/common/http'
import { Observable, catchError, map } from 'rxjs'
export interface User {
id: string
name: string
email: string
role: 'admin' | 'user' | 'viewer'
}
type CreateUserDTO = Omit<User, 'id'>
@Injectable({ providedIn: 'root' })
export class UserService {
private readonly http = inject(HttpClient)
private readonly baseUrl = '/api/users'
getAll(): Observable<User[]> {
return this.http.get<User[]>(this.baseUrl)
}
getById(id: string): Observable<User> {
return this.http.get<User>(`${this.baseUrl}/${id}`)
}
create(dto: CreateUserDTO): Observable<User> {
return this.http.post<User>(this.baseUrl, dto)
}
update(id: string, dto: Partial<CreateUserDTO>): Observable<User> {
return this.http.patch<User>(`${this.baseUrl}/${id}`, dto)
}
delete(id: string): Observable<void> {
return this.http.delete<void>(`${this.baseUrl}/${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.
- 4d ago First seen · 420 lines · 22 tokens per session scan A 825407b23884
frontend-patterns is a skill published in the GitHub repository atstaeff/ai-agents (2 stars, last pushed 6mo ago), licensed MIT. It adds 22 tokens to every session and 2,798 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-08-31.
Other skills, from other repositories
typescript-strict
Use when writing or reviewing TypeScript in Vue, Nuxt, Node, or shared TS utilities, fixing type errors, or deciding how to type API responses and composables.
vue-best-practices
Vue 3 and Vue.js best practices for TypeScript, vue-tsc, Volar, and component patterns. Use when writing, reviewing, or refactoring Vue 3 components with TypeScript, configuring Volar/vueCompilerOptions, extracting component types, working with defineModel/withDefaults, setting up Pinia store tests, or debugging Vue…
path-alias
在 Vite + Vue + TypeScript 项目中配置 @/ 路径别名。同时修改 tsconfig 的 compilerOptions.paths 与 vite.config.ts 的 resolve.alias 保持双向同步,并附带 ESM 安全的绝对路径写法与构建验证步骤。当用户说"配置路径别名 / 加 @ 别名 / 让 @ 指向 src / 设置 @/"时触发。.
vue-best-practices
Comprehensive Vue 3 development best practices, TypeScript configuration, tooling troubleshooting, testing patterns, and composition API gotchas. Covers vue-tsc, Volar, Vite configuration, Vue Router typing, component testing, reactivity patterns, and SFC features. Use when working with Vue 3 + TypeScript projects…
vue-best-practices
MUST be used for Vue.js tasks. Strongly recommends Composition API with and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
pinia-best-practices
Pinia store TypeScript configuration and typing issues. Covers storeToRefs type loss, getters circular references, and setup store patterns. Use when working with Pinia stores in Vue 3 projects, debugging store type errors, or fixing storeToRefs type inference.