frontend-module-standards
Enforce this repository's React and TypeScript frontend module architecture standards. Use whenever creating, modifying, refactoring, or reviewing frontend code under `src/`, including feature modules, components, hooks, contexts, shared UI, API access, state, utilities, and frontend tests. Do not apply these rules to backend code under `server/` or non-frontend scaffolding.
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 13 785
- Лиценз
- AGPL-3.0
- Последна проверка на записа
- 20.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add siteboon/claudecodeuiСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Frontend Module Standards
Apply these rules only to frontend code under src/. Preserve the requested task scope: make touched and newly generated frontend code compliant without performing an unrelated repository-wide migration.
Inspect before editing
- Identify the owning feature module and its existing barrel, components, hooks, contexts, utilities, state, API usage, and tests.
- Search for existing shared types, utilities, constants, UI components, hooks, and contexts before adding a new definition.
- Search for every consumer before moving a definition or changing a module's public exports.
- Distinguish application-source imports from package imports before applying the
@alias rules.
Use source-root imports
- Treat
@as the alias forsrc. - Use
@/...imports whenever the import target is frontend application code insidesrc, including imports within the same feature module. - Do not use relative paths such as
../,../../, or./for application-source imports. - Continue using bare package specifiers for external dependencies, such as
reactorreact-router-dom. - Use
import typefor every type-only import.
Organize feature modules
- Place every frontend feature in
src/modules/<feature>/. - Use
.tsfor non-JSX files and.tsxfor files containing JSX. Do not add JavaScript feature-module files. - Give every feature module an
index.tsbarrel that exposes only its required public API. - Import another feature module only through that module's
index.ts. Never deep-import another module's components, hooks, contexts, modals, utilities, or other implementation details. - Keep module-private implementation details out of the barrel.
- Do not create
view/directories inside feature modules. - Keep module-owned UI components within the owning module, either at its root or in clearly named component-specific directories.
A feature module may contain only the directories it needs:
src/modules/<feature>/
|-- index.ts
|-- FeatureComponent.tsx
|-- hooks/
|-- context/
|-- modals/
|-- utils/
`-- tests/