feat: P1 学习技能包 — 可组合技能模块系统

后端:
- SkillsModule (service + controller),8 个预置技能
- GET /skills (支持 category/difficulty/search 过滤)
- GET /skills/:id /categories /difficulties

前端:
- /skills 技能市场 — 分类/难度/搜索过滤
- /skills/[id] 技能详情 — system prompt、练习任务、starter
- header 导航新增「技能」入口
- sandbox page 改为从 API 加载技能(替代硬编码 SCENES)
- 支持 ?skill=xxx 直接加载指定技能
- useSearchParams Suspense 包装

全栈: 70 pages / 92 tests 全部通过
This commit is contained in:
yuzhiran-dev
2026-05-18 11:15:00 +08:00
parent cba785e6bd
commit fb092cb5d9
14 changed files with 553 additions and 26 deletions
+22
View File
@@ -150,6 +150,28 @@ const en: Translations = {
three: 'Three.js',
console: 'Console Output',
},
skills: {
title: 'Skill Library',
desc: 'Composable AI learning skill modules',
search: 'Search skills...',
allCategories: 'All Categories',
allDifficulties: 'All Levels',
beginner: 'Beginner',
intermediate: 'Intermediate',
advanced: 'Advanced',
tasks: 'Practice Tasks',
starters: 'Try these questions',
prerequisites: 'Prerequisites',
apply: 'Use this skill',
categories: {
basic: 'Basic',
technical: 'Technical',
creative: 'Creative',
education: 'Education',
advanced: 'Advanced',
career: 'Career',
},
},
promptWorkshop: {
title: 'Prompt Workshop',
desc: 'Write, test, and optimize your prompts',
+22
View File
@@ -148,6 +148,28 @@ const zh = {
three: '3D (Three.js)',
console: '控制台输出',
},
skills: {
title: '技能库',
desc: '可组合的 AI 学习技能模块',
search: '搜索技能...',
allCategories: '全部分类',
allDifficulties: '全部难度',
beginner: '入门',
intermediate: '中级',
advanced: '高级',
tasks: '练习任务',
starters: '试试这些问题',
prerequisites: '前置技能',
apply: '使用此技能',
categories: {
basic: '基础',
technical: '技术',
creative: '创意',
education: '教育',
advanced: '进阶',
career: '职业',
},
},
promptWorkshop: {
title: '提示词工坊',
desc: '编写、测试、优化你的提示词',