Files
ai-proj-helper/skills-dev/dev-mcp-plugin/skills/SKILL.md
John Qiu 3706d7f32d 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>
2026-04-06 17:44:08 +09:30

60 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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 # 集成测试
```