TraeSkill: Skill for Claude Code

.trae/Skills/03_Developer_ReactBestPractices/SKILL.md

vercel-react-best-practices is a skill for Claude Code, Codex from boshi-xixixi/TraeSkill. It costs 92 tokens per session (2,836 once invoked), scanned A, a copy of react-performance, MIT.

A set of performance rules for React and Next.js code, covering components, data fetching, animations, and bundle size. React is a library for building user interfaces, while Next.js is a framework built around React.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring React or Next.js code, especially for component performance, animation behavior, data loading, and client bundle size.
Why use it?
It helps identify patterns that make pages load slowly, animations stutter, or browser code become larger than necessary.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

This is boshi-xixixi/TraeSkill's own configuration. It tells Claude Code and Codex how to work on TraeSkill itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything TraeSkill configures →

Reuse

Borrowing it

Nothing to install: this file belongs to boshi-xixixi/TraeSkill. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/boshi-xixixi/TraeSkill/main/.trae/Skills/03_Developer_ReactBestPractices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/boshi-xixixi/TraeSkill

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 vercel-react-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/03_developer_reactbestpractices/github.svg)](https://agentmods.dev/skills/boshi-xixixi/traeskill/03_developer_reactbestpractices)
Your own site
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/03_developer_reactbestpractices"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/03_developer_reactbestpractices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vercel-react-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/03_developer_reactbestpractices"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/03_developer_reactbestpractices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 78% copy Near-identical to another mod 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.1 $0.00092 $0.02836
Opus 5.5 $0.00037 $0.01134
Sonnet 5.5 $0.00018 $0.00567
Haiku 4.5 $0.00009 $0.00284

Measured 8d ago against content hash c354ab2c9e85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vercel-react-best-practices 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 8d 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.

Origin

This is a copy

78% identical to react-performance — 319 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.trae/Skills/03_Developer_ReactBestPractices/SKILL.md · 404 lines

How it starts

The opening of the file, as written. The whole thing — 404 lines — stays where its author put it; the contents beside it link to each section on GitHub.

⚠️ 性能提示: 此 Skill 包含 45 个 rules 文件(L1 ~50KB),专注于 React 性能优化。请根据实际场景选择性应用规则,优先处理 CRITICAL 和 HIGH 优先级的规则。


Vercel React Best Practices

Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.


动画性能规范(Animation Performance)

在 React 应用中实现高性能动画,遵循 compositor-only 原则。

核心原则

浏览器可以在 compositor thread 上独立于主线程处理两种属性:

  • ✅ transform
  • ✅ opacity

所有其他属性(width, height, top, left, background 等)必须在主线程上计算,可能导致卡顿。

只允许的属性

/* ✅ 允许:transform */
transform: translateX(100px);
transform: scale(1.1);
transform: rotate(45deg);
transform: skewX(10deg);

/* ✅ 允许:opacity */
opacity: 0;
opacity: 1;

禁止的属性

/* ❌ 禁止:布局属性 */
width: 100%;
height: 200px;
top: 0;
left: 0;
margin: 10px;
padding: 20px;

/* ❌ 禁止:可能触发布局的属性 */
background-color: red;
border: 1px solid black;
color: blue;

动画实现示例

// ❌ 不合规:使用 height 动画
function ExpandingBox() {
  const [isExpanded, setIsExpanded] = useState(false);

  return (
    <div
      style={{
        height: isExpanded ? '200px' : '50px',
        transition: 'height 0.3s ease'
      }}
    >
      内容
    </div>
  );
}

// ✅ 合规:使用 transform 和 max-height
function ExpandingBox() {
  const [isExpanded, setIsExpanded] = useState(false);

  return (
    <div
      style={{
        maxHeight: isExpanded ? '200px' : '50px',
        overflow: 'hidden',
        transition: 'max-height 0.3s ease'
      }}
    >
      内容
    </div>
  );
}

// ✅ 最佳:纯 transform
function ExpandingBox() {
  const [isExpanded, setIsExpanded] = useState(false);

  return (
    <button onClick={() => setIsExpanded(!isExpanded)}>
      <span style={{
        transform: isExpanded ? 'rotate(180deg)' : 'rotate(0)',
        transition: 'transform 0.3s ease'
      }}>
        ▼
      </span>
      内容
    </button>
  );
}

React 动画库使用规范

Framer Motion / Motion
// ✅ 合规:使用 motion.div
import { motion } from 'framer-motion';

function AnimatedComponent() {
  return (
    <motion.div
      initial={{ opacity: 0, x: -100 }}
      animate={{ opacity: 1, x: 0 }}
      transition={{ duration: 0.5, ease: 'easeOut' }}
    >
      内容
    </motion.div>
  );
}

// ✅ 合规:使用 useTransform 限制属性
import { motion, useTransform } from 'framer-motion';

function ParallaxHeader() {
  const scrollY = useScroll();
  const y = useTransform(scrollY, [0, 500], [0, -200]);

  return (
    <motion.header style={{ y }}>
      内容
    </motion.header>
  );
}

Read the full file on GitHub · 404 lines

Files

What ships with it

50 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 404 lines · 92 tokens per session scan A c354ab2c9e85

Subscribe to this mod's changes

vercel-react-best-practices is a skill published in the GitHub repository boshi-xixixi/TraeSkill (288 stars, last pushed 9d ago), licensed MIT. It adds 92 tokens to every session and 2,836 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 78% identical to react-performance, differing in 319 lines, and is treated as a copy.

Related

vercel-react-best-practices compared with skills from other repositories

vercel-react-best-practices next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vercel-react-best-practicesboshi-xixixi/TraeSkillSkill2889d agoMITA92Claude Code, Codex
expo-app-initializerichkuo/rk-skillsSkill50todayMITA70Claude Code, Codex
android_ui_verificationranbot-ai/awesome-skillsSkill15yesterdaynoneA22Claude Code, Codex
frontend-best-practicesWade-DevCode/awesome-coding-skills-cnSkill75mo agoMITA29Claude Code, Codex
ant-design-chartsIbook000/ibook-skillSkill73d agononeA154Claude Code, Codex
frontend-architectSarthib7/agentsmithSkill111mo agononeA81Claude Code, Codex
<skill-name>Lion-1209/Lion-SkillsSkill55mo agoMITA82Claude Code