Token导航 LogoToken导航TokenDH.com
开发规范可写文件github未标认证来源可访问许可证需确认审计异常

reactlynx-best-practicesReactlynx 最佳实践

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,004

周安装

41

GitHub Stars

21

下载量

325
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/lynx-community/skills --skill reactlynx-best-practices

简介

用于辅助 ReactLynx 开发规范的制定与执行,适合在 Codex、Claude、Cursor、Gemini CLI 中快速检查代码风格与架构合理性。

  • 支持提供组件拆分建议、状态管理规范和安全编码准则,提升项目质量。
  • 通过 npx skills add 命令从指定仓库安装,需确认本地环境是否支持 GitHub 技能加载。
  • 使用前建议核对项目路由、构建配置及测试框架版本,避免只生成孤立片段。
  • 涉及页面改动时,应配合本地预览和构建检查,确认视觉效果与交互行为一致。

SKILL.md

ReactLynx Best Practices

ReactLynx best practices covering dual-thread architecture and React patterns. Provides rules reference for writing, static analysis for reviewing, and auto-fix for refactoring.

When to Apply

This skill should be used when:

  • Writing new ReactLynx components or application → Reference rules as guidelines
  • Reviewing existing ReactLynx code → Use scanner to detect issues
  • Refactoring ReactLynx code → Use auto-fix with user approval

Input

This skill accepts the following inputs:

InputRequiredDescription
sourceCodeNoThe ReactLynx source code to analyze (string or file path)
modeNoWorkflow mode: writing, review, or refactor. Auto-detected if not specified

Mode Auto-Detection

When mode is not explicitly provided, the skill will determine the appropriate mode based on context:

ContextAuto-Selected Mode
User is asking for best practices or guidelineswriting
User wants to check/analyze existing code for issuesreview
User wants to fix/refactor code with auto-fixesrefactor

Workflow Modes

📝 Writing Mode

When writing new ReactLynx code, reference the rules in rules/*.md as best practice guidelines. See also the Rules section below for a summary of all available rules.

Use this mode when:

  • User is creating new ReactLynx components or application
  • User asks "how should I write..." or "what's the best practice for..."
  • No existing code to analyze

🔍 Review Mode

When reviewing code, do both:

  1. Use the scanner (scripts/index.mjs) to analyze source code for issues
  2. Combine findings with rules/*.md explanations to generate a rule-aware report

Use this mode when:

  • User provides code and asks to "check", "review", or "analyze" it
  • User wants to know if their code has any issues
  • User asks "is this code correct?" or "any problems with this?"

Report requirements (must include):

  • Scan summary from workflow.reviewCode(sourceCode)
  • Rule interpretation for each hit ruleId from rules/<ruleId>.md
  • Severity/impact context from rule metadata (impact, impactDescription)
  • Actionable suggestions based on rule guidance (not only raw diagnostics)
node -e "
import fs from 'fs';
import { ReactLynxWorkflow, formatScanReport } from '<path_to_skill>/scripts/index.mjs';

// <sourceCode>: string (source code) or file path
const input = '<sourceCode>';
const sourceCode = fs.existsSync(input) ? fs.readFileSync(input, 'utf-8') : input;

const workflow = new ReactLynxWorkflow('review');
const summary = workflow.reviewCode(sourceCode);
console.log(formatScanReport(summary));
"

🔧 Refactor Mode

When refactoring, generate a fix plan and ask the user before applying. In this mode, output must include both script results and a rules-aware report.

Use this mode when:

  • User explicitly asks to "fix", "refactor", or "auto-fix" code
  • User wants to apply suggested fixes from a previous review
  • User says "please fix these issues" or "apply the fixes"

Report requirements (must include):

  • Pre-fix scan summary and rule-aware interpretation
  • Fix plan summary (fixableIssues, manualIssues, per-file changes)
  • Post-fix outcome (appliedFixes) and remaining manual issues
TOOL CALL: AskUserQuestion(
  question: "🔧 Found {fixableIssues} auto-fixable issues. Would you like me to apply these fixes?",
  options: ["Yes, apply fixes", "No, show me the issues first", "Skip auto-fix"]
)
node -e "
import fs from 'fs';
import { ReactLynxWorkflow, formatFixPlan } from '<path_to_skill>/scripts/index.mjs';

// <sourceCode>: string (source code) or file path
const input = '<sourceCode>';
const sourceCode = fs.existsSync(input) ? fs.readFileSync(input, 'utf-8') : input;

const workflow = new ReactLynxWorkflow('refactor');
workflow.reviewCode(sourceCode);
const plan = workflow.generateFixPlan();

if (plan && plan.fixableIssues > 0) {
  console.log(formatFixPlan(plan));
  // ASK USER: 'Would you like me to apply these auto-fixes?'
  // If yes:
  const { fixed, appliedFixes } = workflow.applyAutoFixes(sourceCode);
  console.log('Fixed code:', fixed);
}
"

Rules

All rules are documented in the rules/ directory as Markdown files:

RuleImpactDescription
detect-background-onlyCRITICALNative APIs in background contexts, use 'background only' directive
proper-event-handlersMEDIUMCorrect event handler usage
main-thread-scripts-guideMEDIUMMain thread scripts guide
hoist-static-jsxLOWPerformance optimization

API Reference

For complete type definitions:

TOOL CALL: Read(<path_to_skill>/scripts/index.d.ts)

Exported Functions

function runSkill(source: string): Diagnostic[];
function runSkillWithFixes(source: string): DiagnosticWithFix[];
function analyzeBackgroundOnlyUsage(source: string): Diagnostic[];
function generateFixes(source: string, diagnostic: Diagnostic): Fix[];
function applyFix(source: string, fix: Fix): string;
function applyFixes(source: string, fixes: Fix[]): string;
function formatScanReport(summary: ScanSummary): string;
function formatFixPlan(plan: FixPlan): string;

Workflow Class

class ReactLynxWorkflow {
  constructor(mode: WorkflowMode);
  reviewCode(source: string): ScanSummary;
  generateFixPlan(): FixPlan | null;
  applyAutoFixes(source: string): { fixed: string; appliedFixes: Fix[] };
}

Key Types

type WorkflowMode = 'writing' | 'review' | 'refactor';

interface Diagnostic {
  ruleId: string;
  message: string;
  severity: 'error' | 'warning' | 'info';
  location: { start: { line: number; column: number }; end: { line: number; column: number } };
}

interface DiagnosticWithFix extends Diagnostic {
  fixes?: Fix[];
}

interface Fix {
  type: 'wrap-in-useEffect' | 'add-directive' | 'add-import' | 'move-to-event-handler';
  description: string;
  oldCode: string;
  newCode: string;
  location: { start: { line: number; column: number }; end: { line: number; column: number } };
}

interface ScanSummary {
  totalFiles: number;
  filesWithIssues: number;
  totalIssues: number;
  errorCount: number;
  warningCount: number;
  infoCount: number;
  results: ScanResult[];
}

interface FixPlan {
  totalIssues: number;
  fixableIssues: number;
  manualIssues: number;
  files: FilePlan[];
}

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.84%
按下载量换算110

Claude

31.1%
按下载量换算101

Cursor

18.2%
按下载量换算59

Gemini CLI

8.66%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

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

来源信息

继续浏览同类 Skills