遵守工作区规则

人工智能 社区

技能解读

当前原文的自动摘译,尚未人工审校。

真相来源

项目约定位于.cursor/rules/*.mdc(始终应用于 Cursor)。不要仅仅依靠记忆——当任务触及该区域时,打开并遵循相关的.mdc文件。另请注意AGENTS.md(Next.js:在使用您不确定的框架 API 之前请咨询node_modules/next/dist/docs/)。

规则图(什么时候读什么)

文件 · 当architecture.mdc时使用 · 决定新代码所属的位置;导入方向(App → Features → Lib/Components);通过 index.ts layers.mdc 提供公共 API · 在 src/app/、src/features/、src/components/ 或 src/lib/ naming.mdc 下放置或检查代码 · 新文件、文件夹、挂钩、服务、测试 styling.mdc · Tailwind/cn()、NavLink、设计代币、globals.css实用程序

工作流程

对更改进行分类:涉及哪些图层和文件(app、features、components、lib)?引入规则:至少,浏览 architecture.mdc + layers.mdc 以查找任何添加导入或新模块的内容。 UI添加styling.mdc; naming.mdc 用于新文件; performance.mdc 当更改状态、上下文或大型列表时。实现: 依赖流与架构表匹配(无向上导入;无功能到功能的导入;lib 不受功能/组件导入的影响)。

冲突解决

如果建议与.cursor/rules冲突,则以规则为准。如果两条规则看起来有冲突,那么优先考虑架构/层的结构,然后优先考虑 UI 和 React 习惯的样式和反模式。

与其他项目技能的关系

ui-design-review注重视觉质量和层次感;该技能涵盖存储库范围的约定(层、命名、Tailwind/NavLink 规则、性能护栏)。在完善还必须符合项目标准的 UI 时使用两者。资料来源:andraderaul/random-fy — 由 TomeVault 分发。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
人工智能
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Follow workspace rules

## Source of truth

Project conventions live in **`.cursor/rules/*.mdc`** (always applied in Cursor). Do not rely on memory alone—**open and follow the relevant `.mdc` file** when the task touches that area.

Also heed **`AGENTS.md`** (Next.js: consult `node_modules/next/dist/docs/` before using framework APIs you are unsure about).

## Rule map (what to read when)

| File                                                 | Use when                                                                                                                 |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [`architecture.mdc`](../../rules/architecture.mdc)   | Deciding where new code belongs; import direction (`App → Features → Lib/Components`); feature public API via `index.ts` |
| [`layers.mdc`](../../rules/layers.mdc)               | Placing or reviewing code under `src/app/`, `src/features/`, `src/components/`, or `src/lib/`                            |
| [`naming.mdc`](../../rules/naming.mdc)               | New files, folders, hooks, services, tests                                                                               |
| [`styling.mdc`](../../rules/styling.mdc)             | Tailwind/`cn()`, `NavLink`, design tokens, `globals.css` utilities                                                       |
| [`anti-patterns.mdc`](../../rules/anti-patterns.mdc) | Quick pass for common violations (duplicate link styling, wrong layer imports, hook misuse, etc.)                        |
| [`performance.mdc`](../../rules/performance.mdc)     | State placement, lists, memoization, context providers                                                                   |

Repo path (for search/open): `.cursor/rules/<file>`.

## Workflow

1. **Classify the change**: Which layers and files are involved (`app`, `features`, `components`, `lib`)?
2. **Pull in rules**: At minimum, skim `architecture.mdc` + `layers.mdc` for anything that adds imports or new modules. Add `styling.mdc` for UI; `naming.mdc` for new files; `performance.mdc` when changing state, context, or large lists.
3. **Implement** so that:
   - Dependency flow matches the architecture table (no upward imports; no feature-to-feature imports; `lib` stays free of feature/component imports).
   - UI matches styling rules (`NavLink` for links, `cn()` for conditional classes, tokens from `tailwind.config.js` / globals—not ad-hoc patterns that break safelisting).
4. **Before finishing**: Re-read `anti-patterns.mdc` for a fast sanity check on the touched surface.

## Conflict resolution

If a suggestion conflicts with **`.cursor/rules`**, the rules win. If two rules seem to conflict, prefer **architecture / layers** for structure, then styling and anti-patterns for UI and React habits.

## Relation to other project skills

- **[`ui-design-review`](../ui-design-review/SKILL.md)** focuses on visual quality and hierarchy; this skill covers **repository-wide** conventions (layers, naming, Tailwind/NavLink rules, performance guardrails). Use both when polishing UI that must also match project standards.

---
> Source: [andraderaul/random-fy](https://github.com/andraderaul/random-fy) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。