Borrowing it
Nothing to install: this file belongs to sumulige/sumulige-claude. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sumulige/sumulige-claude/main/.claude/skills/_archived/react-node-practices/SKILL.mdgit clone --depth 1 https://github.com/sumulige/sumulige-claudeWrote 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/sumulige/sumulige-claude/react-node-practices)<a href="https://agentmods.dev/skills/sumulige/sumulige-claude/react-node-practices"><img src="https://agentmods.dev/badge/skills/sumulige/sumulige-claude/react-node-practices/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.
<a href="https://agentmods.dev/skills/sumulige/sumulige-claude/react-node-practices"><img src="https://agentmods.dev/badge/skills/sumulige/sumulige-claude/react-node-practices.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00000 | $0.02514 |
| Opus 5.5 | $0.00000 | $0.01006 |
| Sonnet 5.5 | $0.00000 | $0.00503 |
| Haiku 4.5 | $0.00000 | $0.00251 |
Grade A, and why
react-node-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 3mo 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 — 410 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React & Node.js Best Practices
AI Agent 编写正确代码的知识包 - 灵感来自 Supabase Agent Skills
规则分类(按优先级)
| 优先级 | 类别 | 说明 |
|---|---|---|
| 🔴 Critical | 安全 & 性能 | 必须遵守,违反将阻止提交 |
| 🟠 High | 架构 & 模式 | 应该遵守,影响可维护性 |
| 🟡 Medium | 代码质量 | 建议遵守,提升代码质量 |
| 🟢 Low | 风格偏好 | 可选遵守,团队约定 |
🔴 Critical: 安全规则
SEC-001: 环境变量处理
// ❌ 错误:硬编码密钥
const apiKey = "sk-proj-xxxxx"
const dbUrl = "postgres://user:pass@localhost/db"
// ✅ 正确:环境变量
const apiKey = process.env.API_KEY
if (!apiKey) throw new Error('API_KEY not configured')
// ✅ 正确:使用 zod 验证环境变量
import { z } from 'zod'
const envSchema = z.object({
API_KEY: z.string().min(1),
DATABASE_URL: z.string().url(),
})
const env = envSchema.parse(process.env)
SEC-002: 用户输入验证
// ❌ 错误:信任用户输入
app.post('/user', (req, res) => {
db.query(`SELECT * FROM users WHERE id = ${req.body.id}`)
})
// ✅ 正确:参数化查询 + 验证
import { z } from 'zod'
const userIdSchema = z.string().uuid()
app.post('/user', (req, res) => {
const id = userIdSchema.parse(req.body.id)
db.query('SELECT * FROM users WHERE id = $1', [id])
})
SEC-003: 敏感数据不入日志
// ❌ 错误:记录敏感信息
console.log('User login:', { email, password, token })
logger.info('Payment:', { cardNumber, cvv })
// ✅ 正确:脱敏处理
console.log('User login:', { email, password: '[REDACTED]' })
logger.info('Payment:', { cardLast4: card.slice(-4) })
SEC-004: XSS 防护
// ❌ 错误:直接渲染用户内容
<div dangerouslySetInnerHTML={{ __html: userContent }} />
// ✅ 正确:使用 DOMPurify 或避免 dangerouslySetInnerHTML
import DOMPurify from 'dompurify'
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(userContent) }} />
// ✅ 更好:直接渲染文本
<div>{userContent}</div>
🔴 Critical: 性能规则
PERF-001: 避免 useEffect 瀑布
// ❌ 错误:串行请求
useEffect(() => {
fetchUser().then(user => {
fetchPosts(user.id).then(posts => {
fetchComments(posts[0].id)
})
})
}, [])
// ✅ 正确:并行请求
useEffect(() => {
Promise.all([
fetchUser(),
fetchPosts(),
fetchComments()
]).then(([user, posts, comments]) => {
// 处理数据
})
}, [])
// ✅ 更好:使用 React Query / SWR
const { data: user } = useQuery('user', fetchUser)
const { data: posts } = useQuery(['posts', user?.id], () => fetchPosts(user.id), {
enabled: !!user
})
What ships with it
1 file 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.
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.
- 3mo ago First seen · 410 lines · 0 tokens per session scan A e25c57b949c6
react-node-practices is a skill published in the GitHub repository sumulige/sumulige-claude (1 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,514 tokens. 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.
react-node-practices compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| react-node-practicessumulige/sumulige-claude | Skill | 1 | 9mo ago | MIT | A | 0 | Claude Code |
| codex-buildalanshurafa/co-evolution | Skill | 4 | 2mo ago | MIT | A | 181 | Claude Code |
| co-evolutionalanshurafa/co-evolution | Skill | 4 | 2mo ago | MIT | A | 118 | Claude Code |
| dev-reviewalanshurafa/co-evolution | Skill | 4 | 2mo ago | MIT | B | 176 | Claude Code |
| recursive-task-optimizerlaruss/recursive-task-optimizer | Skill | 1 | 3mo ago | MIT | A | 101 | Claude Code, Codex |
| frontend-best-practicesApexIQ/skillsmith | Skill | 5 | 8mo ago | MIT | A | 29 | Claude Code, Codex |
| frontend-testingApexIQ/skillsmith | Skill | 5 | 8mo ago | MIT | A | 27 | Claude Code, Codex |