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

cs-math数学

Agent Skill

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

总安装

539

周安装

22

GitHub Stars

4

下载量

172
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

cs-math 提供计算机科学数学计算能力,覆盖离散数学、组合学、概率、线性代数与微积分。

  • 适用于算法概率计算、ML 模型梯度求解、数据结构组合分析等程序化数学任务。
  • 使用优化算法确保精度与效率,适合需要精确数值结果的代码场景。
  • 不支持符号推导或教学解释,仅输出可执行计算结果或调用相应数学库。
  • 典型应用包括 ML 训练流水线、加密算法验证与性能建模中的数学运算。

SKILL.md

cs-math

Purpose

This skill enables OpenClaw to perform computations in computer science mathematics, covering discrete math (e.g., sets, graphs), combinatorics (e.g., permutations), probability (e.g., distributions), linear algebra (e.g., matrix operations), and calculus for ML (e.g., gradients), using optimized algorithms.

When to Use

Use this skill for tasks involving mathematical computations in code, such as calculating probabilities in algorithms, solving linear systems for ML models, or analyzing combinatorics in data structures. Apply it when precise, programmatic math is needed, like in optimization problems or statistical analysis, rather than general queries.

Key Capabilities

  • Compute discrete math operations: permutations, combinations, graph traversals (e.g., via adjacency matrices).
  • Handle probability: calculate expected values, binomial probabilities, or simulate distributions.
  • Perform linear algebra: matrix multiplication, determinants, inverses, and eigenvalue calculations.
  • Support calculus for ML: compute gradients, partial derivatives for loss functions.
  • Integrate with data: process arrays or vectors from inputs, returning results as JSON.

Usage Patterns

Invoke the skill via OpenClaw's CLI or API by specifying an operation and parameters. Always pass inputs as a JSON object for consistency. For example, in Python code: import openclaw; result = openclaw.invoke_skill('cs-math', {'operation': 'permutation', 'n': 5, 'r': 3}). Handle outputs as dictionaries, e.g., check for a 'result' key. Use try-except blocks for API calls to catch failures. If reusing parameters, store them in a config file like JSON: {"default_n": 5}, and load it before invoking.

Common Commands/API

Use the OpenClaw CLI: openclaw cs-math --operation calculate --params '{"type": "permutation", "n": 5, "r": 3}' --output json For API, send a POST to /api/skills/cs-math/execute with headers {'Authorization': 'Bearer $OPENCLAW_API_KEY'} and body: {"operation": "matrix_multiply", "A": [[1,2],[3,4]], "B": [[5,6],[7,8]]} Config format: Parameters must be JSON objects, e.g., {"operation": "probability", "distribution": "binomial", "n": 10, "p": 0.5}. Common flags: --verbose for debug output, --timeout 30 for setting API timeouts in seconds. Code snippet for Python: import openclaw params = {"operation": "gradient", "function": "x2 + y2", "at": [1,1]} result = openclaw.invoke('cs-math', params) print(result['value']) # Outputs the gradient vector

Integration Notes

Integrate by setting the environment variable for authentication: export OPENCLAW_API_KEY=your_api_key_value. In code, import the OpenClaw library and call skills like: openclaw.set_api_key(os.environ['OPENCLAW_API_KEY']); openclaw.invoke('cs-math', params). For web apps, use the SDK to handle retries: openclaw.configure(retries=3). Ensure inputs are validated against schema, e.g., use JSON Schema for params. If embedding in larger workflows, chain with other skills via OpenClaw's event system, like triggering 'algorithms' skill after a math computation.

Error Handling

Always check the response for an 'error' key, e.g., if result.get('error'), raise a custom exception. Common errors: InvalidInputError for non-numeric params (e.g., negative 'n' in permutations), handle with: try: openclaw.invoke('cs-math', {'operation': 'permutation', 'n': -1}) except ValueError as e: log_error(e). For API timeouts, use --timeout flag and catch HTTP errors: if response.status_code == 504, retry up to 3 times. Validate inputs beforehand, e.g., ensure matrices are square for inverses using: if not all(len(row) == len(matrix) for row in matrix): raise Error. Log detailed errors with --verbose flag for debugging.

Concrete Usage Examples

  1. Calculate permutations for arranging 5 items taken 3 at a time: Use code: import openclaw; params = {"operation": "permutation", "n": 5, "r": 3}; result = openclaw.invoke('cs-math', params); print(result['result']) # Outputs: 10
  2. Perform matrix multiplication for two 2x2 matrices: Use code: import openclaw; A = [[1,2],[3,4]]; B = [[5,6],[7,8]]; params = {"operation": "matrix_multiply", "A": A, "B": B}; result = openclaw.invoke('cs-math', params); print(result['result']) # Outputs: [[19,22],[43,50]]

Graph Relationships

  • Belongs to cluster: computer-science
  • Related tags: math, discrete, probability, linear-algebra, combinatorics, statistics
  • Connected skills: algorithms (for applying math to sorting/complexity), data-science (for statistical integrations), ml-foundations (for calculus in training models)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.21%
按下载量换算61

Claude

31.8%
按下载量换算55

Cursor

17.16%
按下载量换算30

Gemini CLI

9.41%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills