frontend-patterns

frontend-patterns is a skill for Claude Code, Codex from atstaeff/ai-agents. It costs 22 tokens per session (2,798 once invoked), scanned A, original, MIT.

Guidance for building frontend applications with TypeScript, Vue.js, or Angular using reusable and maintainable patterns.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring Vue or Angular interfaces, including reusable state logic, pagination, and TypeScript design.
Why use it?
It helps prevent frontend code from becoming inconsistent or difficult to extend as features and state handling grow.

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/atstaeff/ai-agents/frontend-patterns
Any agent
npx skills add atstaeff/ai-agents --skill frontend-patterns
Clone the repo
git clone --depth 1 https://github.com/atstaeff/ai-agents

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 frontend-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/atstaeff/ai-agents/frontend-patterns.svg)](https://agentmods.dev/skills/atstaeff/ai-agents/frontend-patterns)
Your own site
<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>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,798 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.00022 $0.02798
Opus 5 $0.00011 $0.01399
Sonnet 5 $0.00004 $0.00560
Haiku 4.5 $0.00002 $0.00280

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

Security

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.

skills/frontend-patterns/SKILL.md · 420 lines

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}`)
  }
}

Read the full file on GitHub · 420 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 · 420 lines · 22 tokens per session scan A 825407b23884

Subscribe to this mod's changes

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.

Related

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.

pstuart/pstuart · 39 tokens

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…

ejirocodes/agent-skills · 159 tokens

path-alias

在 Vite + Vue + TypeScript 项目中配置 @/ 路径别名。同时修改 tsconfig 的 compilerOptions.paths 与 vite.config.ts 的 resolve.alias 保持双向同步,并附带 ESM 安全的绝对路径写法与构建验证步骤。当用户说"配置路径别名 / 加 @ 别名 / 让 @ 指向 src / 设置 @/"时触发。.

Ace627/vite-vue3-template · 97 tokens

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…

jianxcao/qbittorrent-web · 83 tokens

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.

uni-helper/skills · 81 tokens

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.

jianxcao/qbittorrent-web · 59 tokens