Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

hairyhairy 文档

Agent Skill

hairy 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,903

周安装

336

GitHub Stars

15

下载量

2,769
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hairy(hairy 文档)
来源仓库:https://github.com/hairyf/skills
仓库路径:skills/hairy
安装命令:
npx skills add https://github.com/hairyf/skills --skill hairy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hairyf/skills --skill hairy

简介

Hairyf 固执己见的 Web 开发堆栈和 TypeScript 项目的最佳实践。

  • 核心工具:pnpm、TypeScript(严格模式)、ESM、@antfu/eslint-config(无 Prettier)、Vitest 和 VitePress 用于文档
  • 强制执行“指定”工作流程以使项目与这些首选项保持一致,包括通过架构维护进行架构检测、通过 taze 进行依赖新鲜度以及 lint + 类型检查门
  • 优先考虑 unjs 生态系统框架(Nuxt、Nitro、h3 等)并将项目架构映射到规范的 arch-* 技能以实现一致的结构
  • 包括 Git hooks 设置(simple-git-hooks + lint-staged)和通过bumpp 为库项目发布工作流程

SKILL.md

Hairyf's Preferences

This skill covers Hairyf's preferred tooling, configurations, and best practices for web development. This skill is opinionated.

Quick Summary

CategoryPreference
Package Managerpnpm
LanguageTypeScript (strict mode)
Module SystemESM ("type": "module")
Linting & Formatting@antfu/eslint-config (no Prettier)
TestingVitest
Git Hookssimple-git-hooks + lint-staged
DocumentationVitePress (in docs/)

Global Preferences

High-level cross-cutting preferences that should be respected whenever possible:

"specify" keyword

When a task is marked with "specify" (for example: "specify this repo according to hairy"):

  • Treat it as a request to inspect the current project and optimize it until it matches these preferences as much as reasonably possible.
  • Concretely, this should trigger:

- Architecture detection and upgrade planning via @skills/arch-upkeep and the relevant arch-* skills. - Preference-aware stack choices (prefer unjs ecosystem via @skills/unjs). - Dependency freshness checks and upgrades via @skills/taze. - A final pass of lint + typecheck (and tests if present) before considering the "specify" task done.

Prefer unjs ecosystem frameworks

  • When choosing frameworks or runtimes (SSR, API, tooling, dev server, etc.), prefer unjs ecosystem projects first (for example Nuxt, Nitro, h3, unstorage, unplugin, unocss, ofetch, and other unjs-maintained tools).
  • Only fall back to non-unjs options when there is a clear, justified reason (missing feature, ecosystem constraint, or legacy requirements).
  • For concrete choices, recipes, and defaults, delegate to @skills/unjs and follow its recommendations.

Architecture must map to arch-* skills

  • A project’s architecture should always map to one of the canonical arch-* stacks (tsdown library, CLI, monorepo, unplugin, webext, vscode, etc.).
  • When the current shape does not match any target cleanly, treat it as an upgrade opportunity and plan a migration instead of adding more ad‑hoc structure.
  • Use @skills/arch-upkeep to:

- Detect the current architecture. - Choose the best target arch-* skill(s). - Orchestrate an incremental migration to that architecture.

Keep dependencies fresh with taze

  • Dependencies should be kept continuously fresh, not only during big refactors.
  • Prefer using taze (see @skills/taze) to:

- Audit outdated dependencies. - Perform controlled upgrades (minor/patch regularly; majors with explicit review). - Align versions across a monorepo using pnpm workspaces and catalogs.

  • Avoid hand-editing versions in package.json unless there is a specific reason not to follow taze’s suggestions.

Always finish with lint + typecheck

  • After implementing any non-trivial change (feature, refactor, config change, dependency upgrade, CI change, etc.), always run lint and typecheck before considering the task done.
  • Standard scripts:

- nr lint → ESLint via @antfu/eslint-config. - nr typecheck → TypeScript in strict mode (project-wide).

  • For CI and Git hooks:

- Ensure pre-commit hooks at least run lint on staged files. - Ensure GitHub Actions (or other CI) run both lint and typecheck on PRs and main pushes.


Core Stack

Package Manager (pnpm)

Use pnpm as the package manager.

For monorepo setups, use pnpm workspaces:

# pnpm-workspace.yaml
packages:
  - 'packages/*'

Use pnpm named catalogs in pnpm-workspace.yaml to manage dependency versions:

CatalogPurpose
prodProduction dependencies
inlinedDependencies inlined by bundler
devDevelopment tools (linter, bundler, testing, dev-server)
frontendFrontend libraries bundled into frontend

Catalog names are not limited to the above and can be adjusted based on needs. Avoid using default catalog.

@antfu/ni

Use @antfu/ni for unified package manager commands. It auto-detects the package manager (pnpm/npm/yarn/bun) based on lockfile.

CommandDescription
niInstall dependencies
ni <pkg>Add dependency
ni -D <pkg>Add dev dependency
nr <script>Run script
nuUpgrade dependencies
nun <pkg>Uninstall dependency
nciClean install (like pnpm i --frozen-lockfile)
nlx <pkg>Execute package (like npx)

Install globally with pnpm i -g @antfu/ni if the commands are not found.

TypeScript (Strict Mode)

Always use TypeScript with strict mode enabled.

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

ESM (ECMAScript Modules)

Always work in ESM mode. Set "type": "module" in package.json.


Code Quality

ESLint (@antfu/eslint-config)

Use @antfu/eslint-config for both formatting and linting. This eliminates the need for Prettier.

Create eslint.config.js with // @ts-check comment:

// @ts-check
import antfu from '@antfu/eslint-config'

export default antfu()

Add script to package.json:

{
  "scripts": {
    "lint": "eslint ."
  }
}

When getting linting errors, try to fix them with nr lint --fix. Don't add lint:fix script.

Git Hooks (simple-git-hooks + lint-staged)

Use simple-git-hooks with lint-staged for pre-commit linting:

{
  "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"
  }
}

Unit Testing (Vitest)

Use Vitest for unit testing.

{
  "scripts": {
    "test": "vitest"
  }
}

Conventions:

  • Place test files next to source files: foo.tsfoo.test.ts (same directory)
  • High-level tests go in tests/ directory in each package
  • Use describe and it API (not test)
  • Use expect API for assertions
  • Use assert only for TypeScript null assertions
  • Use toMatchSnapshot for complex output assertions
  • Use toMatchFileSnapshot with explicit file path and extension for language-specific output (exclude those files from linting)

Project Setup

Publishing (Library Projects)

For library projects, publish through GitHub Releases triggered by bumpp:

{
  "scripts": {
    "release": "bumpp -r"
  }
}

Documentation (VitePress)

Use VitePress for documentation. Place docs under docs/ directory.

docs/
├── .vitepress/
│   └── config.ts
├── index.md
└── guide/
    └── getting-started.md

Add script to package.json:

{
  "scripts": {
    "docs:dev": "vitepress dev docs",
    "docs:build": "vitepress build docs"
  }
}

References

Global Preferences

TopicDescriptionReference
Prefer unjs ecosystemPrefer unjs ecosystem frameworks and tooling; delegate to @skills/unjscore-unjs-preferences
Architecture via arch-*Map repo shape to canonical arch-* skills and upgrade via arch-upkeepcore-arch-upkeep-routing
Fresh dependencies with tazeKeep dependencies continuously fresh using taze and controlled upgradescore-deps-taze
Lint + typecheck as gateAlways finish with lint + typecheck locally and in CIcore-lint-typecheck

Project Setup

TopicDescriptionReference
@antfu/eslint-configESLint flat config for formatting and lintingantfu-eslint-config
VS Code ExtensionsRecommended extensions for developmentvscode-extensions

Development

TopicDescriptionReference
App DevelopmentPreferences for Vue/Vite/Nuxt/UnoCSS web applicationsapp-development

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.83%
按下载量换算937

Claude

27.94%
按下载量换算774

Cursor

18.76%
按下载量换算519

Gemini CLI

9.85%
按下载量换算273

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills