Token导航 LogoToken导航

Agent Skill · 开发

cs-compilers(cs 编译器)

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

cs-compilers 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 17,281。

总安装 423周安装 18GitHub Stars 4下载 148核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

支持词法分析、语法解析(LL/LR/PEG)与 LLVM 代码生成等编译器开发任务。集成 Tree-sitter 实现实时解析,适用于 IDE 与静态分析工具构建。可用于源码转换、转译器开发与中间表示优化等场景。安装需通过 npx 添加指定仓库,建议在编译器相关项目中配合使用。

cs-compilers 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/cs-compilers

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/alphaonedev/openclaw-graph --skill cs-compiler…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cs-compilers 怎么安装?

在终端执行 npx skills add https://github.com/alphaonedev/openclaw-graph --skill cs-compilers。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cs-compilers 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cs-compilers 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

cs-compilers 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cs-compilers 用的人多吗?

公开数据是累计安装 423 次,近一周安装 18 次,下载 148 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cs-compilers 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
cs-compilers

cs 编译器 · 本页

4234需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

cs-compilers

Purpose

This skill equips the AI to handle compiler-related tasks, including lexing, parsing (LL/LR/PEG), building ASTs, semantic analysis, code generation with LLVM, optimizations, and integration with Tree-sitter for real-time parsing.

When to Use

Use this skill when developing compilers, analyzing source code, debugging parsers, generating optimized machine code, or integrating parsing into tools like IDEs. Apply it for tasks involving code transformation, such as transpiling or static analysis in programming languages.

Key Capabilities

  • Lexing: Tokenize input using regex; e.g., define patterns like r'\b(int|float)\b' for keywords in a lexer.
  • Parsing: Implement LL(1) with recursive descent or LR(1) via tools like yacc; use PEG with libraries like packrat; integrate Tree-sitter for efficient parsing, e.g., load a language grammar with tree_sitter.Language.build('path/to/tree-sitter-javascript.wasm').
  • AST Handling: Build and manipulate ASTs; traverse nodes for analysis, e.g., use Tree-sitter's cursor: cursor = tree.walk(); while cursor.goto_first_child(): process_node(cursor).
  • Semantic Analysis: Perform type checking and scope resolution; e.g., check variable declarations against usage in a symbol table.
  • Code Generation: Generate LLVM IR; use the LLVM C++ API to create modules, e.g., LLVMModuleCreateWithName("MyModule") then add functions.
  • Optimization: Apply passes like constant propagation or dead code elimination; e.g., run LLVM's opt tool with flags like -O3 for aggressive optimization.
  • Tree-sitter Integration: Parse code in real-time; supports languages like C, Python via pre-built grammars.

Usage Patterns

Invoke this skill via OpenClaw CLI for direct commands or SDK for programmatic access. Always specify the action and parameters as JSON. For CLI, use: openclaw invoke cs-compilers --action <action> --params '<JSON string>'. In code, import the SDK and call: from openclaw import Client; client = Client(api_key=os.environ['OPENCLAW_API_KEY']); response = client.invoke('cs-compilers', {'action': 'parse', 'params': {'language': 'c', 'code': 'int main(){}'}}). Structure params as a dictionary with keys like "language" and "code". If using external tools, ensure dependencies (e.g., LLVM) are installed and pathed correctly.

Common Commands/API

  • Parse Code: CLI: openclaw invoke cs-compilers --action parse --params '{"language": "python", "code": "def foo(x): return x+1"}'; returns AST as JSON. API: POST /api/skills/cs-compilers with body {"action": "parse", "params": {"language": "python", "code": "def foo(x): return x+1"}}.
  • Generate LLVM IR: CLI: openclaw invoke cs-compilers --action generate-llvm --params '{"language": "c", "code": "int add(int a, int b) {return a+b;}", "optimize": true}'; uses flags like --optimize for passes. API: POST /api/skills/cs-compilers with body {"action": "generate-llvm", "params": {"language": "c", "code": "int add(int a, int b) {return a+b;}"}}.
  • Lex Input: CLI: openclaw invoke cs-compilers --action lex --params '{"input": "int x = 5;", "patterns": ["\\bint\\b"]}'; outputs tokens array. API: POST /api/skills/cs-compilers with body {"action": "lex", "params": {"input": "int x = 5;", "patterns": ["\bint\b"]}}.
  • Config Format: Use JSON for params, e.g., {"grammar": "path/to/grammar.json", "options": {"debug": true}}. Authentication: Set env var $OPENCLAW_API_KEY for all API calls.

Integration Notes

Integrate by installing OpenClaw SDK via pip install openclaw and importing it in your project. For LLVM, ensure clang is installed and link via llvm-config --cxxflags. Tree-sitter requires compiling grammars; e.g., clone a repo and build with make. Handle dependencies in your environment; e.g., set PATH for LLVM tools. For custom parsers, provide a config JSON like {"parserType": "LR", "grammarRules": [{"rule": "E -> T + E"}]}. Test integrations in a sandbox to verify responses.

Error Handling

Always check the response object for an 'error' key; if present, it contains a code and message. For CLI, parse output JSON: if response['error'], exit with code response['error']['code']. In SDK: try: response = client.invoke(...); except OpenClawError as e: log(e.code, e.message). Common errors: 400 for invalid params (e.g., malformed JSON), 401 for auth issues (check $OPENCLAW_API_KEY), 500 for internal failures like parser crashes. Retry transient errors (e.g., 503) with exponential backoff, and validate inputs before invoking, e.g., ensure 'language' is a supported string like 'c' or 'python'.

Concrete Usage Examples

  1. Parsing a C Function: To parse and extract an AST for a simple C function, run: openclaw invoke cs-compilers --action parse --params '{"language": "c", "code": "int main() {return 0;}"}'. This returns a JSON AST like {"type": "function_definition", "name": "main", "body": [...]}. Use the AST to analyze structure, e.g., count nodes.
  2. Generating Optimized LLVM IR: To generate and optimize LLVM IR from C code, execute: openclaw invoke cs-compilers --action generate-llvm --params '{"language": "c", "code": "int add(int a, int b) {return a + b;}", "optimize": true}'. Output might be: "define i32 @add(i32 %a, i32 %b) {%1 = add i32 %a, %b; ret i32 %1}". Pipe this to LLVM tools for further compilation.

Graph Relationships

  • Related to: programming-languages (shares parsing and AST techniques for language design)
  • Related to: software-engineering (connects via code optimization and integration with build tools)
  • Related to: algorithms (overlaps on efficient parsing algorithms like LL and LR)

平台分布

Codex

36.38%
按下载量换算54

Claude

30.01%
按下载量换算44

Cursor

17.05%
按下载量换算25

Gemini CLI

8.46%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills