feat(skill): REQ-20260406-0004 技能三层分离重构(7主线+16插件)
批次1: req-prd 瘦身 + req-design 重定位 + dev-coding 聚焦 批次2: dev-review 新建 + review-checklist 插件 批次3: dev-integration 新建 + req-compare 拆出 批次4: 插件完善 (req-research/db-migration/dev-scaffold/deploy-rollback) 批次5: 平台拆分 (dev-ios/dev-android/dev-mcp/dev-pda) + dev 分组更新 批次6: marketplace.json 32→44 plugins Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
skills-dev/dev-mcp-plugin/.claude-plugin/plugin.json
Normal file
1
skills-dev/dev-mcp-plugin/.claude-plugin/plugin.json
Normal file
@@ -0,0 +1 @@
|
||||
{"name":"dev-mcp-plugin","description":"MCP Bridge 开发插件。TypeScript MCP 服务开发、Token 管理、HTTP 客户端模式。按需加载。","version":"1.0.0","author":{"name":"qiudl"}}
|
||||
59
skills-dev/dev-mcp-plugin/skills/SKILL.md
Normal file
59
skills-dev/dev-mcp-plugin/skills/SKILL.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
name: dev-mcp
|
||||
description: MCP Bridge 开发插件。TypeScript MCP 服务开发,Token 管理,HTTP 客户端模式。当涉及 mcp-task-bridge 开发时按需加载。
|
||||
---
|
||||
|
||||
# MCP Bridge 开发插件 (dev-mcp)
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
mcp-task-bridge/
|
||||
├── index.ts # 入口,MCP server 注册
|
||||
├── task-service.ts # 任务服务
|
||||
├── document-service.ts # 文档服务
|
||||
├── requirement-service.ts # 需求服务
|
||||
├── base-client.ts # HTTP 基类(认证、重试)
|
||||
├── types.ts # 类型定义
|
||||
└── token-storage.ts # Token 持久化
|
||||
```
|
||||
|
||||
## 代码规范
|
||||
|
||||
```typescript
|
||||
export class TaskService extends BaseClient {
|
||||
async createTask(
|
||||
title: string,
|
||||
projectId: number = 1,
|
||||
options: CreateTaskOptions = {}
|
||||
): Promise<ApiResponse<Task>> {
|
||||
try {
|
||||
const response = await this.makeRequest<Task>(
|
||||
'POST',
|
||||
`/projects/${projectId}/tasks`,
|
||||
{ title, project_id: projectId, ...options }
|
||||
);
|
||||
return response.success
|
||||
? { success: true, data: response.data, message: `✅ 任务创建成功` }
|
||||
: response;
|
||||
} catch (error: any) {
|
||||
return { success: false, error: `创建任务失败: ${error.message}` };
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 关键规则
|
||||
|
||||
1. **MCP endpoint 前缀**:所有 MCP 专用后端接口必须包含 `/mcp/` 前缀
|
||||
2. **修改后重新构建**:`npm run build` → `pkill -f "mcp-task-bridge/dist/index.js"`
|
||||
3. **环境一致性**:不要跨环境混用数据(dev/staging/prod)
|
||||
|
||||
## 常用命令
|
||||
|
||||
```bash
|
||||
npm run dev # 开发(hot reload)
|
||||
npm run build # 编译 TypeScript
|
||||
npm test # 快速测试
|
||||
npm run test:integration # 集成测试
|
||||
```
|
||||
Reference in New Issue
Block a user