Communitygithub.com

ComeOnOliver/skillshub

Outils et conventions opinés d'Anthony Fu pour les projets JavaScript/TypeScript. À utiliser lors de la configuration de nouveaux projets, de la mise en place d'alternatives à ESLint/Prettier, de monorepos, de publication de bibliothèques, ou lorsque l'utilisateur mentionne les préférences d'Anthony Fu.

Qu'est-ce que skillshub ?

Ce skill fournit un ensemble de conventions et d'outils de développement opinés, basés sur les préférences d'Anthony Fu, pour les projets JavaScript et TypeScript. Il couvre l'organisation du code, les bonnes pratiques TypeScript, les commentaires, les tests avec Vitest, ainsi que des choix d'outillage tels que `@antfu/ni`, la configuration ESLint avec `@antfu/eslint-config`, les hooks Git avec `simple-git-hooks` et `lint-staged`, et la gestion des versions avec les catalogues pnpm. Il est conçu pour être utilisé lors de la création de nouveaux projets, de la configuration d'alternatives à ESLint/Prettier, de la gestion de monorepos ou de la publication de bibliothèques. Le skill supporte les plateformes d'agents IA comme Claude Code, Cursor, et Codex, et se base sur un fichier SKILL.md détaillé qui sert de guide de référence.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/antfu/skills/antfu

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Pratiques de codage

Organisation du code

  • Responsabilité unique : Chaque fichier source doit avoir un champ d'application / objectif clair et ciblé
  • Diviser les gros fichiers : Fractionner les fichiers lorsqu'ils deviennent volumineux ou gèrent trop de préoccupations
  • Séparation des types : Toujours séparer les types et les interfaces dans types.ts ou types/*.ts
  • Extraction des constantes : Déplacer les constantes vers un fichier dédié constants.ts

Environnement d'exécution

  • Préférer le code isomorphe : Écrire du code agnostique vis-à-vis de l'environnement d'exécution qui fonctionne dans Node, le navigateur et les workers chaque fois que possible
  • Indicateurs d'environnement clairs : Lorsque le code est spécifique à un environnement, ajouter un commentaire en haut du fichier :
// @env node
// @env browser

TypeScript

  • Types de retour explicites : Déclarer les types de retour explicitement lorsque c'est possible
  • Éviter les types en ligne complexes : Extraire les types complexes dans des déclarations type ou interface dédiées

Commentaires

  • Éviter les commentaires inutiles : Le code doit être explicite
  • Expliquer le "pourquoi" pas le "comment" : Les commentaires doivent décrire le raisonnement ou l'intention, pas ce que fait le code

Tests (Vitest)

  • Fichiers de test : foo.ts → foo.test.ts (même répertoire)
  • Utiliser l'API describe/it (pas test)
  • Utiliser toMatchSnapshot pour les sorties complexes
  • Utiliser toMatchFileSnapshot avec un chemin explicite pour les instantanés spécifiques à une langue

Choix d'outillage

Commandes @antfu/ni

CommandeDescription
niInstaller les dépendances
ni <pkg> / ni -D <pkg>Ajouter une dépendance / dépendance de développement
nr <script>Exécuter un script
nuMettre à jour les dépendances
nun <pkg>Désinstaller une dépendance
nciInstallation propre (pnpm i --frozen-lockfile)
nlx <pkg>Exécuter un paquet (npx)

Configuration TypeScript

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true
  }
}

Configuration ESLint

// eslint.config.mjs
import antfu from '@antfu/eslint-config'

export default antfu()

Lors de l'exécution des tâches, exécutez pnpm run lint --fix pour formater le code et corriger le style de codage.

Pour les options de configuration détaillées : antfu-eslint-config

Hooks Git

{
  "simple-git-hooks": {
    "pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
  },
  "lint-staged": { "*": "eslint --fix" },
  "scripts": {
    "prepare": "npx simple-git-hooks"
  }
}

Catalogues pnpm

Utiliser des catalogues nommés dans pnpm-workspace.yaml pour la gestion des versions :

CatalogueObjectif
prodDépendances de production
inlinedDépendances intégrées au bundler
devOutils de développement (linter, bundler, tests)
frontendBibliothèques frontend

Évitez le catalogue par défaut. Les noms des catalogues peuvent être ajustés selon les besoins du projet.


Références

SujetDescriptionRéférence
Configuration ESLintSupport des frameworks, formateurs, surcharges de règles, paramètres VS Codeantfu-eslint-config
Configuration du projet.gitignore, GitHub Actions, extensions VS Codesetting-up
Développement d'applicationsConventions et modèles Vue/Nuxt/UnoCSSapp-development
Développement de bibliothèquesEmpaquetage tsdown, publication ESM purlibrary-development
MonorepoEspaces de travail pnpm, alias centralisé, Turborepomonorepo

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

Skills associés