RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/crunl/Xingyu-Frontend

Cursor rule

.cursor/rules/api.mdc

[object Object]

Cursor rules

Quality

45/100

Scores the file, not the repository.

Length

166 words

3 headings · 2 code blocks

Repository

0

— · pushed 377 days ago

Last changed

3 days ago

First indexed 3 days ago.
crunl/Xingyu-Frontend/.cursor/rules/api.mdcRawGitHub
1---
2description:
3globs:
4alwaysApply: false
5---
6# API 请求规范
7 
8## 1. 请求函数命名和结构
9```typescript
10// service/api/user.ts
11import { request } from '@/service/request';
12 
13// 获取用户列表
14export const fetchUserList = (params: UserListParams) => {
15 return request<UserListResponse>({
16 url: '/user/list',
17 method: 'GET',
18 params,
19 });
20};
21 
22// 获取用户详情
23export const fetchUserById = (id: string) => {
24 return request<UserInfo>({
25 url: `/user/${id}`,
26 method: 'GET',
27 });
28};
29 
30// 创建用户
31export const createUser = (data: CreateUserData) => {
32 return request<ApiResponse>({
33 url: '/user',
34 method: 'POST',
35 data,
36 });
37};
38 
39// 更新用户
40export const updateUser = (id: string, data: UpdateUserData) => {
41 return request<ApiResponse>({
42 url: `/user/${id}`,
43 method: 'PUT',
44 data,
45 });
46};
47 
48// 删除用户
49export const deleteUser = (id: string) => {
50 return request<ApiResponse>({
51 url: `/user/${id}`,
52 method: 'DELETE',
53 });
54};
55```
56 
57### 2. 类型定义规范
58```typescript
59// types/api.d.ts
60interface ApiResponse<T = any> {
61 code: number;
62 message: string;
63 data: T;
64}
65 
66interface UserInfo {
67 id: string;
68 name: string;
69 email: string;
70 role: string;
71 createTime: string;
72 updateTime: string;
73}
74 
75interface UserListParams {
76 page: number;
77 pageSize: number;
78 keyword?: string;
79 role?: string;
80}
81 
82interface UserListResponse {
83 list: UserInfo[];
84 total: number;
85}
86```
87 
88 

Sections

  • API 请求规范
  • 1. 请求函数命名和结构
  • 2. 类型定义规范

What it covers

api

Stack — with the evidence

typescript

(1.00)

vite

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

github-actions

(0.60)

vercel

(0.60)

Glob targeting

  • [object Object]

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
crunl
Language
—
License
—
Archived
no

All configs in this repo

Also in crunl/Xingyu-Frontend

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
crunl/Xingyu-Frontend.cursor/rules/comments.mdc · 0Cursor rulestypescriptvite+8securityapidocs46/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/componenting.mdc · 0Cursor rulestypescriptvite+8no sections45/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/naming.mdc · 0Cursor rulestypescriptvite+8archtypesapiui58/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/project.mdc · 0Cursor rulestypescriptvite+8no sections50/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/reduxing.mdc · 0Cursor rulestypescriptvite+8no sections45/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/routing.mdc · 0Cursor rulestypescriptvite+8no sections53/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/styling.mdc · 0Cursor rulestypescriptvite+8archui54/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/typescript.mdc · 0Cursor rulestypescriptvite+8typesdocs42/1003 days ago
Diff against .cursor/rules/comments.mdc Diff against .cursor/rules/componenting.mdc Diff against .cursor/rules/naming.mdc Diff against .cursor/rules/project.mdc Diff against .cursor/rules/reduxing.mdc Diff against .cursor/rules/routing.mdc Diff against .cursor/rules/styling.mdc Diff against .cursor/rules/typescript.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack