用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/trycompai/comp --skill essentials命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | essentials |
| description | Critical rules that must always be followed |
Source Cursor rule: .cursor/rules/essentials.mdc.
Original file scope: **/*.{ts,tsx}.
Original Cursor alwaysApply: true.
Use bun, never npm/yarn/pnpm.
bun install # Install deps
bun add <pkg> # Add package
bun run <script> # Run script
bunx <cmd> # Execute binary
Use @trycompai/design-system first, @trycompai/ui only as fallback.
// ✅ Design system
import { Button, Card, Input, Select } from '@trycompai/design-system';
import { Add, Close } from '@trycompai/design-system/icons';
// ❌ Don't use when DS has the component
import { Button } from '@trycompai/ui/button';
import { Plus } from 'lucide-react';
No className on DS components - use variants and props only.
// ✅ Use variants
<Button variant="destructive" size="sm">Delete</Button>
// ❌ No className overrides
<Button className="bg-red-500">Delete</Button>
No any. No unsafe type assertions.
// ✅ Validate external data with zod
const TaskSchema = z.object({ id: z.string(), title: z.string() });
const task = TaskSchema.parse(response.data);
// ❌ Never
const data: any = fetchData();
const task = response as Task;
Get organizationId from URL params, not session.
// ✅ From params
export default async function Page({ params }: { params: Promise<{ orgId: string }> }) {
const { orgId } = await params;
}
// ❌ Not from session
const session = await auth.api.getSession();
const orgId = session?.session?.activeOrganizationId;
Server components fetch, pass to client with SWR fallbackData.
// Server page
const data = await fetchData(orgId);
return <ClientComponent initialData={data} />;
// Client component
const { data } = useSWR(key, fetcher, { fallbackData: initialData });
No nuqs - use React useState for UI state, Next.js for URL state.
// ✅ React state for UI
const [isOpen, setIsOpen] = useState(false);
// ❌ No nuqs
import { useQueryState } from 'nuqs';
Always run checks after code changes:
bun run typecheck
bun run lint
Fix all errors before committing.