Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

cs-concurrencyCS 并发

Agent Skill

cs-concurrency 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

384

周安装

16

GitHub Stars

4

下载量

128
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cs-concurrency(CS 并发)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/cs-concurrency
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill cs-concurrency
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill cs-concurrency

简介

提供线程与异步编程、锁与原子操作等并发概念支持。

  • 涵盖死锁避免、STM 与 Actor 模型等高级主题解释与代码示例。
  • 适用于多线程应用调试与 I/O 密集型任务优化场景。
  • 安装需通过 npx 添加指定仓库,建议在涉及共享资源访问时使用。
  • cs-concurrency 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

cs-concurrency

Purpose

This skill equips OpenClaw to assist with concurrency concepts in computer science, including threads vs. async programming, synchronization primitives like locks and atomics, and advanced topics like actor models, STM, and deadlock avoidance. Use it to generate code, explain pitfalls, or debug issues.

When to Use

Apply this skill when developing multi-threaded applications (e.g., in C++ or Python), handling shared resources to prevent race conditions, optimizing for I/O-bound tasks with async/await, or analyzing deadlocks in production code. Use it for real-time systems, web servers, or distributed computing where concurrency is critical.

Key Capabilities

  • Explain differences: Threads (blocking, OS-level) vs. async (non-blocking, event-loop based).
  • Demonstrate synchronization: Implement mutexes, RW locks, and atomics for shared data.
  • Handle advanced patterns: Generate actor model code (e.g., using Erlang-style actors) or STM for transactional memory.
  • Detect issues: Identify potential deadlocks or race conditions in provided code snippets.
  • Optimize: Suggest lock-free data structures like concurrent queues.

Usage Patterns

Invoke OpenClaw via CLI for quick explanations or code generation; use API for integration into scripts. Always specify the subtopic (e.g., "threads" or "locks") for targeted responses. For interactive sessions, prefix commands with "openclaw cs-concurrency". If using programmatically, pass JSON payloads with required parameters like topic and language.

Common Commands/API

Use CLI commands like: openclaw cs-concurrency explain threads --lang python (explains threads with a Python example). openclaw cs-concurrency generate lock --type mutex --code c++ (generates a mutex example in C++).

For API, send POST requests to /api/cs-concurrency/explain with JSON body: {"topic": "atomics", "lang": "rust", "detail": "high"} Headers: Authorization: Bearer $OPENCLAW_API_KEY (set via environment variable for authentication).

Config format for custom sessions: JSON file like {"defaultLang": "go", "focus": ["deadlock", "async"]} passed with --config path/to/file.json.

Integration Notes

Integrate by setting $OPENCLAW_API_KEY in your environment for authenticated API calls. For example, in a bash script: export OPENCLAW_API_KEY=your_api_key_here. Combine with other tools like debuggers (e.g., gdb for threads) by piping output: openclaw cs-concurrency explain deadlock | gdb -ex "run". Ensure your application handles async contexts if embedding responses in Node.js or Python event loops.

Error Handling

When using this skill, check for concurrency errors like deadlocks by wrapping code in try-except blocks. For example, in Python:

import threading
lock = threading.Lock()
try:
    with lock:
        # Critical section
        pass
except threading.LockError:
    print("Lock acquisition failed")

For API calls, handle HTTP errors (e.g., 401 for invalid $OPENCLAW_API_KEY) by checking response status codes. In OpenClaw commands, use --verbose flag to debug: openclaw cs-concurrency explain async --verbose to log detailed errors.

Concrete Usage Examples

Example 1: To generate a simple threads example in C++: Run: openclaw cs-concurrency generate threads --lang c++ Output might include:

#include <thread>
void task() { /* code */ }
int main() {
    std::thread t1(task);
    t1.join();
}

This helps in understanding basic thread creation and joining.

Example 2: To explain and fix a race condition with atomics: Command: openclaw cs-concurrency explain race --fix --lang rust Response: Explains the issue and provides:

use std::sync::atomic::{AtomicUsize, Ordering};
static COUNTER: AtomicUsize = AtomicUsize::new(0);
COUNTER.fetch_add(1, Ordering::SeqCst);

Use this to safely increment shared counters without locks.

Graph Relationships

  • Related to: cs-algorithms (via concurrency tag for parallel algorithms)
  • Connected to: programming-languages (shares tags like "threads" for language-specific implementations)
  • Links with: software-engineering (for deadlock in system design)
  • Associated via: cs (cluster overlap for computer science topics)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.92%
按下载量换算50

Claude

31.42%
按下载量换算40

Cursor

17.45%
按下载量换算22

Gemini CLI

8.61%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills