用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill codebase-conventions命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | codebase-conventions |
| description | >- Use when this capability is needed. |
Project standards and constraints for 10x-Mapmaster.
Announce: "I'm checking codebase-conventions to ensure I follow project standards."
src/ # Vue 3 frontend (presentation only)
├── components/ # Reusable components
│ ├── game/ # Game-specific components
│ ├── map/ # MapLibre components
│ └── ui/ # shadcn-vue components
├── composables/ # Shared reactive logic
│ ├── game/ # Game-related composables
│ └── map/ # Map-related composables
├── stores/ # Pinia stores
├── views/ # Page-level components
├── lib/ # Utilities, API, types
│ ├── api/ # RPC call wrappers
│ └── places/ # Place-related utilities
├── types/ # TypeScript types
└── i18n/ # Translations
supabase/
├── db/ # Database source files
│ ├── schema/ # Tables, types, RLS policies
│ ├── game_logic/ # Internal functions (scoring, questions)
│ │ ├── functions/ # Function definitions
│ │ └── data/ # Seed data
│ └── public/ # Player-facing RPC entrypoints
│ └── functions/
├── functions/ # Deno edge functions
├── migrations/ # Generated (never edit directly)
├── seeds/ # Development data
└── tests/ # pgTAP tests
openspec/ # Specifications
├── specs/ # Capability specs
└── changes/ # Active change proposals
docs/ # Human-readable documentation
| Type | Convention | Example |
|---|---|---|
| Files (frontend) | kebab-case | game-session.ts, PlaceView.vue |
| Vue components | PascalCase | GameActive.vue, PlacesLayer.vue |
| Composables | camelCase with use prefix | useMapCamera, useGameMap |
| Pinia stores | camelCase with use...Store | useGameSessionStore |
| SQL identifiers | snake_case | game_sessions, user_id |
| SQL keywords | UPPERCASE | SELECT, FROM, WHERE |
| Database functions | snake_case | start_game, play_turn |
| TypeScript types | PascalCase | GameSession, Candidate |
Player descriptions are limited to 200 characters:
-- Enforced by database constraint
CONSTRAINT check_description_length
CHECK (char_length(description) <= 200)
Valid answers are strictly typed:
CREATE TYPE answer_value AS ENUM('yes', 'no', 'not_sure');
yes / no - For both questions AND guessesnot_sure - ONLY for questions, never for guessesCREATE TYPE game_session_status AS ENUM(
'active', -- Game in progress
'won', -- System guessed correctly
'ended', -- Max turns reached without win
'needs_submission' -- Awaiting player to submit correct place
);
-- CORRECT style
SELECT
p.id,
p.name,
1 - (p.embedding <=> v_query) AS similarity
FROM places p
JOIN place_traits pt ON pt.place_id = p.id
WHERE p.status = 'active'
AND similarity > 0.5
ORDER BY similarity DESC
LIMIT 10;
-- WRONG: lowercase keywords, SELECT *
select * from places where status = 'active'
Rules:
SELECT, FROM, WHERE, JOIN, ORDER BYplaces, user_id, created_atSELECT *)any in application code// CORRECT
export function useMapCamera(): UseMapCameraReturn {
const center = ref<{ lng: number; lat: number }>({ lng: 0, lat: 20 })
// ...
return { center, flyTo, isAnimating }
}
// WRONG
export function useMapCamera() { // Missing return type
const center: any = ref({ lng: 0, lat: 20 }) // any usage
// ...
}
Max 200 lines per file. If larger, split:
feat/, fix/, chore/, docs/feat: add candidate scoring function
fix: prevent camera feedback loop
chore: update dependencies
docs: add algorithm documentation
supabase/db/bun run db:rebuild (generates migration + resets)supabase test dbsrc/bun run type-checkbun run test:unitSee references/glossary.md for domain term definitions.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.