Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计提醒

rose-container-tools玫瑰容器工具

Agent Skill

rose-container-tools 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

25,494

周安装

1,073

GitHub Stars

公开资料未说明

下载量

8,927
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:rose-container-tools(玫瑰容器工具)
来源仓库:https://github.com/chunhualiao/rose-container-tools
安装命令:
openclaw skills install rose-container-tools
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install rose-container-tools

简介

使用安装在 Docker 容器中的 ROSE 构建并运行 ROSE 编译器工具。在开发源到源转换器、调用图分析器、AST 处理器或任何链接到 librose.so 的工具时使用。在“ROSE 工具”、“callgraph”、“AST 遍历”、“源到源”、“使用 ROSE 构建”、“librose”上触发。

SKILL.md

name
rose-container-tools
version
0.1.0
description
Build and run ROSE compiler tools using ROSE installed in a Docker container. Use when developing source-to-source translators, call graph analyzers, AST processors, or any tool that links against librose.so. Triggers on "ROSE tool", "callgraph", "AST traversal", "source-to-source", "build with ROSE", "librose".

ROSE Container Tools

Build and run ROSE-based source code analysis tools using ROSE installed in a container.

⚠️ ALWAYS Use Makefile

Never use ad-hoc scripts or command-line compilation for ROSE tools.

  • Use Makefile for all builds
  • Enables make -j parallelism
  • Ensures consistent flags
  • Supports make check for testing

Why Container?

ROSE requires GCC 7-10 and specific Boost versions. Most modern hosts don't have these. The container provides:

  • Pre-installed ROSE at /rose/install
  • Correct compiler toolchain
  • All dependencies configured

Quick Start

1. Start the Container

# If container exists
docker start rose-tools-dev
docker exec -it rose-tools-dev bash

# Or create new container
docker run -it --name rose-tools-dev \
  -v /home/liao/rose-install:/rose/install:ro \
  -v $(pwd):/work \
  -w /work \
  rose-dev:latest bash

2. Build with Makefile

Always use Makefile to build ROSE tools. Never use ad-hoc scripts.

# Inside container
make        # Build all tools
make check  # Build and test

3. Run the Tool

./build/my_tool -c input.c

Makefile (Required)

Create Makefile for your tool:

ROSE_INSTALL = /rose/install

CXX      = g++
CXXFLAGS = -std=c++14 -Wall -g -I$(ROSE_INSTALL)/include/rose
LDFLAGS  = -L$(ROSE_INSTALL)/lib -Wl,-rpath,$(ROSE_INSTALL)/lib
LIBS     = -lrose

BUILDDIR = build
SOURCES  = $(wildcard tools/*.cpp)
TOOLS    = $(patsubst tools/%.cpp,$(BUILDDIR)/%,$(SOURCES))

.PHONY: all clean check

all: $(TOOLS)

$(BUILDDIR)/%: tools/%.cpp
	@mkdir -p $(BUILDDIR)
	$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(LIBS)

check: all
	@for tool in $(TOOLS); do \
		echo "Testing $$tool..."; \
		LD_LIBRARY_PATH=$(ROSE_INSTALL)/lib $$tool -c tests/hello.c; \
	done

clean:
	rm -rf $(BUILDDIR)

Example: Identity Translator

Minimal ROSE tool that parses and unparses code:

// tools/identity.cpp
#include "rose.h"

int main(int argc, char* argv[]) {
    SgProject* project = frontend(argc, argv);
    if (!project) return 1;
    
    AstTests::runAllTests(project);
    return backend(project);
}

Build and run:

make
./build/identity -c tests/hello.c
# Output: rose_hello.c (unparsed)

Example: Call Graph Generator

// tools/callgraph.cpp
#include "rose.h"
#include <CallGraph.h>

int main(int argc, char* argv[]) {
    ROSE_INITIALIZE;
    SgProject* project = new SgProject(argc, argv);
    
    CallGraphBuilder builder(project);
    builder.buildCallGraph();
    
    AstDOTGeneration dotgen;
    dotgen.writeIncidenceGraphToDOTFile(
        builder.getGraph(), "callgraph.dot");
    
    return 0;
}

Example: AST Node Counter

// tools/ast_stats.cpp
#include "rose.h"
#include <map>

class NodeCounter : public AstSimpleProcessing {
public:
    std::map<std::string, int> counts;
    
    void visit(SgNode* node) override {
        if (node) counts[node->class_name()]++;
    }
};

int main(int argc, char* argv[]) {
    SgProject* project = frontend(argc, argv);
    
    NodeCounter counter;
    counter.traverseInputFiles(project, preorder);
    
    for (auto& [name, count] : counter.counts)
        std::cout << name << ": " << count << "\
";
    
    return 0;
}

Common ROSE Headers

HeaderPurpose
rose.hMain header (includes most things)
CallGraph.hCall graph construction
AstDOTGeneration.hDOT output for AST/graphs
sageInterface.hAST manipulation utilities

AST Traversal Patterns

Simple Traversal (preorder/postorder)

class MyTraversal : public AstSimpleProcessing {
    void visit(SgNode* node) override {
        // Process each node
    }
};

MyTraversal t;
t.traverseInputFiles(project, preorder);

Top-Down with Inherited Attributes

class MyTraversal : public AstTopDownProcessing<int> {
    int evaluateInheritedAttribute(SgNode* node, int depth) override {
        return depth + 1;  // Pass to children
    }
};

Bottom-Up with Synthesized Attributes

class MyTraversal : public AstBottomUpProcessing<int> {
    int evaluateSynthesizedAttribute(SgNode* node, 
        SynthesizedAttributesList childAttrs) override {
        int sum = 0;
        for (auto& attr : childAttrs) sum += attr;
        return sum + 1;  // Return to parent
    }
};

Testing in Container

# Run from host
docker exec -w /work rose-tools-dev make check

# Or interactively
docker exec -it rose-tools-dev bash
cd /work
make && make check

Troubleshooting

"rose.h not found"

# Check include path
echo $ROSE/include/rose
ls $ROSE/include/rose/rose.h

"cannot find -lrose"

# Check library path
ls $ROSE/lib/librose.so

Runtime: "librose.so not found"

# Set library path
export LD_LIBRARY_PATH=$ROSE/lib:$LD_LIBRARY_PATH

Segfault on large files

# Increase stack size
ulimit -s unlimited

Container Reference

PathContents
/rose/installROSE installation (headers, libs, bins)
/rose/install/include/roseHeader files
/rose/install/liblibrose.so and dependencies
/rose/install/binROSE tools (identityTranslator, etc.)
/workMounted workspace (your code)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

90.15%
按下载量换算8,048

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install rose-container-tools 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills