Agent Skillshigress-group/himarket › frontend-coding-standards

frontend-coding-standards

GitHub

HiMarket前端开发规范,涵盖React、TypeScript、Vite等标准。用于指导himarket-web/himarket-frontend及admin项目的代码修改与审查,确保遵循严格类型、组件结构及验证流程。

.agent-skills/frontend-coding-standards/SKILL.md higress-group/himarket

Trigger Scenarios

修改 himarket-web/himarket-frontend 或 himarket-web/himarket-admin 项目代码 审查前端代码是否符合编码规范 涉及前端构建、Lint、类型检查或API客户端变更

Install

npx skills add higress-group/himarket --skill frontend-coding-standards -g -y
More Options

Non-standard path

npx skills add https://github.com/higress-group/himarket/tree/main/.agent-skills/frontend-coding-standards -g -y

Use without installing

npx skills use higress-group/himarket@frontend-coding-standards

指定 Agent (Claude Code)

npx skills add higress-group/himarket --skill frontend-coding-standards -a claude-code -g -y

安装 repo 全部 skill

npx skills add higress-group/himarket --all -g -y

预览 repo 内 skill

npx skills add higress-group/himarket --list

SKILL.md

Frontmatter
{
    "name": "frontend-coding-standards",
    "description": "HiMarket frontend coding standards for React, TypeScript, Vite, Ant Design, Tailwind, i18n, API calls, component structure, and frontend verification. Use whenever modifying or reviewing himarket-web\/himarket-frontend or himarket-web\/himarket-admin. Read docs\/standards\/frontend before editing."
}

HiMarket Frontend Coding Standards

This skill is the entry point for HiMarket frontend development standards. It should route the agent to the project documentation instead of duplicating the full rules here.

Source of Truth

The canonical frontend standards live under:

  • docs/standards/frontend/README.md
  • docs/standards/frontend/shared.md
  • docs/standards/frontend/admin.md
  • docs/standards/frontend/portal.md

If this skill conflicts with docs/standards/frontend, follow docs/standards/frontend.

Activation

Use this skill for changes in:

  • himarket-web/himarket-admin
  • himarket-web/himarket-frontend
  • shared frontend build, lint, type, i18n, style, or API client code

Reading Flow

Always read docs/standards/frontend/README.md first.

Then read:

  • docs/standards/frontend/shared.md for every frontend change.
  • docs/standards/frontend/admin.md when touching himarket-web/himarket-admin.
  • docs/standards/frontend/portal.md when touching himarket-web/himarket-frontend.

If a change affects both frontend applications, read both application-specific documents.

Working Rules

  • Follow the existing application structure before introducing a new pattern.
  • Keep shared abstractions small and justified by repeated use.
  • Keep component, hook, API, i18n, and styling changes scoped to the touched feature.
  • Preserve user changes in the working tree.

High-Priority Reminders

  • Use strict TypeScript; do not use any or non-null assertions to bypass typing.
  • Keep imports, object keys, and JSX props ordered according to the local ESLint rules.
  • Keep API calls in the documented API layer and follow the request/response shape conventions.
  • Guard initialization requests that can be double-invoked by React StrictMode.
  • Use i18n resources for user-facing copy.
  • Keep comments useful and remove dead commented-out code.
  • Prefer existing UI tokens, Ant Design conventions, Tailwind utilities, and local components before introducing new styling patterns.
  • Do not add broad frontend dependencies for problems already solved by the project stack.

Verification

Run checks in each changed frontend application directory:

npm run lint
npm run type-check
npm run format:check

For broad changes from the project root, use one of:

  • ./scripts/code-check.sh frontend
  • ./scripts/code-check.sh admin
  • ./scripts/code-check.sh all

Version History

  • a352157 Current 2026-08-20 12:58

Same Skill Collection

.agent-skills/backend-coding-standards/SKILL.md
.claude/skills/backend-coding-standards/SKILL.md
.claude/skills/create-issue-himarket/SKILL.md
.claude/skills/create-pr-himarket/SKILL.md
.claude/skills/frontend-coding-standards/SKILL.md
.claude/skills/springboot-verification/SKILL.md
.claude/skills/tmux/SKILL.md
.codex/skills/backend-coding-standards/SKILL.md
.codex/skills/frontend-coding-standards/SKILL.md
.qoder/skills/backend-coding-standards/SKILL.md
.qoder/skills/create-issue-himarket/SKILL.md
.qoder/skills/frontend-coding-standards/SKILL.md
.qoder/skills/github-issue-berifing/SKILL.md
.qoder/skills/harness-creator/SKILL.md
.qoder/skills/harness-executor/SKILL.md
.qoder/skills/publish-skills/SKILL.md
.qoder/skills/springboot-verification/SKILL.md
.qoder/skills/tmux/SKILL.md

Metadata

Files
0
Version
a352157
Hash
78c9d8d5
Indexed
2026-08-20 12:58

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 04:00
浙ICP备14020137号-1 $Гость$