用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Fadil369/Solutions --skill real-time-collaboration-engine命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | Real-Time Collaboration Engine |
| version | 1.0.0 |
| description | Enables real-time collaborative features with presence, live updates, and shared state. |
| author | workspace |
| activated | false |
Enables multiple users to collaborate in real-time on shared content with presence awareness and conflict-free updates.
| Technology | Best For | Complexity | Scale |
|---|---|---|---|
| WebSockets | Custom solutions | High | Medium |
| Socket.io | Node.js apps | Medium | Medium |
| Pusher/Ably | Managed service | Low | High |
| WebRTC | P2P, video | Very High | Low |
| SSE | Server→Client only | Low | High |
class PresenceManager {
constructor(channel) {
this.channel = channel;
this.users = new Map();
}
async join(userId, metadata) {
this.users.set(userId, {
...metadata,
joinedAt: Date.now(),
lastSeen: Date.now()
});
await this.channel.broadcast('user:joined', { userId, metadata });
}
async updateCursor(userId, position) {
await this.channel.broadcast('cursor:moved', { userId, position });
this.users.get(userId).lastSeen = Date.now();
}
async leave(userId) {
this.users.delete(userId);
await this.channel.(, { userId });
}
() {
now = .();
.(..())
.( now - u. < );
}
}
class OTEngine {
constructor() {
this.document = '';
this.revision = 0;
this.buffer = [];
}
apply(operation) {
// Transform against concurrent operations
let transformed = operation;
for (const concurrent of this.buffer) {
transformed = this.transform(transformed, concurrent);
}
this.document = this.execute(transformed);
this.revision++;
return transformed;
}
transform(op1, op2) {
// Transform op1 against op2
if (op1.position <= op2.position) {
return op1;
}
return { ...op1, position: op1.position + op2.length };
}
}
CONNECTING → CONNECTED → DISCONNECTED
↓ ↓ ↓
[retry] [active] [reconnect]
↓ ↓ ↓
CONNECTED SYNCING CONNECTED
| Error Type | Severity | Recovery |
|---|---|---|
| Connection lost | Warning | Auto-reconnect |
| Conflict detected | Info | OT/CRDT merge |
| Auth expired | Error | Re-authenticate |
| Server error | Critical | Fallback to local |
Provides accessible UI component patterns with ARIA attributes, keyboard navigation, and screen reader support.
Builds robust API clients with retry logic, caching, error handling, and request/response transformation.
Designs secure authentication flows including OAuth2, OIDC, MFA, session management, and password reset patterns.
基于 SOC 职业分类