Token导航 LogoToken导航

Agent Skill · 开发

moto-hses-usage(摩托 HSE 用途)

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

moto-hses-usage 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 17,575。

总安装 396周安装 16GitHub Stars 公开资料未说明下载 124核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/masayuki-kono/agent-skills --skill moto-hses-usage

这个 Skill 是做什么的

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

moto-hses-usage 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中整理仓库状态和代码变更。可通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验用法。

安装前建议确认权限范围、维护状态及是否触发联网或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/moto-hses-usage

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/masayuki-kono/agent-skills --skill moto-hses-u…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

moto-hses-usage 怎么安装?

在终端执行 npx skills add https://github.com/masayuki-kono/agent-skills --skill moto-hses-usage。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

moto-hses-usage 支持哪些 AI 工具?

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

moto-hses-usage 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/masayuki-kono/agent-skills --skill moto-hses-usage;npx skills add masayuki-kono/agent-skills --skill "moto-hses-usage" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

moto-hses-usage 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

moto-hses-usage 用的人多吗?

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

moto-hses-usage 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 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有提醒
moto-hses-usage

摩托 HSE 用途 · 本页

396—执行命令MIT通过

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

SKILL.md 原文

moto-hses usage guide

This skill provides guidance for using the moto-hses crate family to communicate with Yaskawa robot controllers via the High Speed Ethernet Server (HSES) protocol.

Note: The moto-hses crate family is a Rust client implementation for the HSES protocol. For the underlying protocol specification (message structure, command IDs, error codes), see the hses-protocol skill.

When to Use

  • Implementing HSES communication with Yaskawa robot controllers in Rust
  • Using moto_hses_client, moto_hses_proto, or moto_hses_mock crates
  • Looking up API methods for robot control, status reading, variable access, file operations
  • Writing tests with MockServer for HSES communication

Crate Overview

CratePurpose
moto_hses_clientHSES client for communicating with robot controllers
moto_hses_protoProtocol types (Status, commands, etc.)
moto_hses_mockMock server for integration testing

Key Types

TypeDescription
HsesClientBasic HSES client (single-task usage)
SharedHsesClientThread-safe wrapper for concurrent access from multiple tasks
HsesClientOpsTrait for client abstraction (implemented by both client types)

Client Connection

Basic Usage

use moto_hses_client::{ClientConfig, HsesClient};
use moto_hses_proto::{ROBOT_CONTROL_PORT, FILE_CONTROL_PORT, TextEncoding};
use std::time::Duration;

// Create configuration
let config = ClientConfig {
    host: "192.168.1.100".to_string(),
    port: ROBOT_CONTROL_PORT,  // 10040 for robot control
    timeout: Duration::from_millis(3000),
    retry_count: 0,
    retry_delay: Duration::from_millis(200),
    buffer_size: 8192,
    text_encoding: TextEncoding::ShiftJis,
};

// Connect to controller
let client = HsesClient::new_with_config(config).await?;

Port Constants

ConstantPortUsage
ROBOT_CONTROL_PORT10040Status, servo, job, variable, I/O, register operations
FILE_CONTROL_PORT10041File transfer operations (send/receive/delete)

Thread-Safe Client (SharedHsesClient)

For concurrent access from multiple tasks, wrap HsesClient with SharedHsesClient:

use moto_hses_client::{HsesClient, HsesClientOps, SharedHsesClient};

// Create HsesClient and wrap it for thread-safe access
let client = HsesClient::new_with_config(config).await?;
let shared_client = SharedHsesClient::new(client);

// Clone for each concurrent task
let client1 = shared_client.clone();
let client2 = shared_client.clone();

let handle1 = tokio::spawn(async move {
    client1.read_status().await
});

let handle2 = tokio::spawn(async move {
    client2.read_position(0).await
});

// Wait for all tasks
let (result1, result2) = tokio::try_join!(handle1, handle2)?;

HsesClientOps Trait

Both HsesClient and SharedHsesClient implement the HsesClientOps trait, enabling abstraction:

use moto_hses_client::HsesClientOps;

/// Accepts any client type implementing HsesClientOps
async fn check_status(client: &impl HsesClientOps) -> Result<bool, ClientError> {
    let status = client.read_status().await?;
    Ok(status.is_running())
}

// Works with both client types
check_status(&client).await?;        // HsesClient
check_status(&shared_client).await?; // SharedHsesClient

HsesClient API

Status & Control

MethodDescription
read_status()Read complete status (Data 1 & Data 2)
read_status_data1()Read status data 1 only
read_status_data2()Read status data 2 only
set_servo(bool)Turn servo ON/OFF
set_hold(bool)Set/release hold state
set_hlock(bool)Set/release HLOCK (interlock PP and I/O)
set_cycle_mode(CycleMode)Set cycle mode (Step/OneCycle/Continuous)
Status Convenience Methods

The Status struct returned by read_status() provides these helper methods:

MethodDescription
is_running()Check if robot is running
is_servo_on()Check if servo is ON
has_alarm()Check if alarm is active
has_error()Check if error is active
is_teach_mode()Check if in teach mode
is_play_mode()Check if in play mode
is_remote_mode()Check if in remote mode
CycleMode Enum (moto_hses_proto::CycleMode)
VariantDescription
CycleMode::StepExecute one instruction at a time
CycleMode::OneCycleExecute job once and stop
CycleMode::ContinuousExecute job repeatedly

Job Control

MethodDescription
select_job(select_type, job_name, line_number)Select job for execution
start_job()Start the selected job
read_executing_job_info(task_type, attribute)Read executing job info
read_executing_job_info_complete(task_type)Read all job info attributes
JobSelectType Enum (moto_hses_proto::commands::JobSelectType)
VariantDescription
JobSelectType::InExecutionSelect job for current task
JobSelectType::MasterJobSelect as master job
Note: Job name does not require .JBI extension.

Position

MethodDescription
read_position(control_group)Read current position

Alarm

MethodDescription
read_alarm_data(instance, attribute)Read alarm data
read_alarm_history(instance, attribute)Read alarm history
reset_alarm()Reset active alarms
cancel_error()Cancel current error
AlarmAttribute Enum (moto_hses_proto::AlarmAttribute)
VariantDescription
AlarmAttribute::AllRead all alarm attributes
AlarmAttribute::CodeRead alarm code only
AlarmAttribute::DataRead alarm data only
AlarmAttribute::TypeRead alarm type only
AlarmAttribute::TimeRead alarm time only
AlarmAttribute::NameRead alarm name only
Alarm Instance Ranges
RangeType
1-10Major failure alarm history
1001-1010Monitor alarm history

Variable (Single)

MethodDescription
read_u8(index) / write_u8(index, value)B-type (8-bit unsigned)
read_i16(index) / write_i16(index, value)I-type (16-bit signed)
read_i32(index) / write_i32(index, value)D-type (32-bit signed)
read_f32(index) / write_f32(index, value)R-type (32-bit float)
read_string(index) / write_string(index, value)S-type (string, 16 bytes max)

Variable (Multiple)

MethodDescription
read_multiple_u8(start, count) / write_multiple_u8(start, values)B-type
read_multiple_i16(start, count) / write_multiple_i16(start, values)I-type
read_multiple_i32(start, count) / write_multiple_i32(start, values)D-type
read_multiple_f32(start, count) / write_multiple_f32(start, values)R-type
read_multiple_strings(start, count) / write_multiple_strings(start, values)S-type

I/O

MethodDescription
read_io(io_number) / write_io(io_number, value)Single I/O
read_multiple_io(start, count) / write_multiple_io(start, data)Multiple I/O

Register

MethodDescription
read_register(number) / write_register(number, value)Single register
read_multiple_registers(start, count) / write_multiple_registers(start, values)Multiple registers

File

Note: File operations require connecting to FILE_CONTROL_PORT (10041), not ROBOT_CONTROL_PORT.
MethodDescription
read_file_list(pattern)Get file list (e.g., "*.JBI")
send_file(filename, content)Send file to controller
receive_file(filename)Receive file from controller
delete_file(filename)Delete file from controller

Error Handling

All async methods return Result<T, ClientError>. Common error patterns:

use moto_hses_client::ClientError;

match client.read_status().await {
    Ok(status) => { /* handle success */ }
    Err(ClientError::TimeoutError(_)) => { /* connection timeout */ }
    Err(ClientError::ConnectionError(_)) => { /* I/O error */ }
    Err(ClientError::ConnectionFailed(retries)) => { /* connection failed after retries */ }
    Err(ClientError::ProtocolError(_)) => { /* protocol-level error */ }
    Err(ClientError::InvalidVariable(_)) => { /* invalid variable access */ }
    Err(ClientError::SystemError(_)) => { /* system error */ }
}

Testing

Unit Tests

Use the HsesClientOps trait (see HsesClientOps Trait section) for dependency injection and mock implementations in unit tests.

use moto_hses_client::{ClientError, HsesClientOps};
use moto_hses_proto::Status;

// Create a mock implementation for unit testing
struct MockClient {
    status: Status,
}

#[async_trait::async_trait]
impl HsesClientOps for MockClient {
    async fn read_status(&self) -> Result<Status, ClientError> {
        Ok(self.status.clone())
    }
    // ... implement other methods as needed
}

// Use in tests
async fn handler(client: &impl HsesClientOps) -> Result<bool, ClientError> {
    let status = client.read_status().await?;
    Ok(status.is_running())
}

Integration Tests with MockServer

Use moto_hses_mock::MockServer for integration testing with actual network communication.

use moto_hses_mock::{MockConfig, MockServer};

let config = MockConfig::new("127.0.0.1", 10040, 10041);
let server = Arc::new(MockServer::new(config).await?);

tokio::spawn({
    let server = Arc::clone(&server);
    async move { server.run().await.ok(); }
});
tokio::time::sleep(Duration::from_millis(200)).await;
State Access
// Get state reference
let state = server.state();

// Read state (async)
let guard = state.read().await;
assert!(guard.servo_on);
assert!(guard.get_running());

// Write state (async)
let mut guard = state.write().await;
guard.set_servo(true);
guard.set_hold(false);
guard.set_running(true);
MockState Methods
MethodDescription
set_servo(bool)Set servo ON/OFF state
set_hold(bool)Set hold state
set_running(bool)Set running state
get_running()Get running state
set_executing_job(Option<ExecutingJobInfo>)Set executing job info
get_variable(index)Get variable value
set_variable(index, value)Set variable value
get_io_state(io_number)Get I/O state
set_io_state(io_number, state)Set I/O state

If a method for the desired state doesn't exist, you can directly access the public fields of MockState (e.g., guard.status.data1.running).

Important Considerations

Port Conflict Avoidance

  • Single-threaded Execution: Configure with RUST_TEST_THREADS = "1"
  • Port Management: MockServer uses fixed ports (10040, 10041)
  • Test Isolation: Independent MockServer instances prevent state interference between tests

Test Design Best Practices

  1. State Management: Utilize MockServer's state modification interfaces
  2. Wait for Async: Add small delays after server start and before assertions

Reference Examples (in references/examples/)

The references/examples/ directory contains sample code for various operations:

ExampleDescription
read_status.rsStatus reading and convenience methods
hold_servo_control.rsServo/Hold/Hlock control operations
cycle_mode_control.rsCycle mode setting
job_select.rsJob selection
job_start.rsJob execution
position_operations.rsRobot position reading
alarm_operations.rsAlarm data reading and reset
byte_variable_operations.rsB-type variable (8-bit unsigned)
integer_variable_operations.rsI-type variable (16-bit signed)
double_variable_operations.rsD-type variable (32-bit signed)
real_variable_operations.rsR-type variable (32-bit float)
string_variable_operations.rsS-type variable (string)
io_operations.rsI/O data reading and writing
register_operations.rsRegister data reading and writing
file_operations.rsFile transfer operations
read_executing_job_info.rsExecuting job information
mock_basic_usage.rsMockServer setup and state configuration
shared_client.rsThread-safe SharedHsesClient for concurrent access
Note: For detailed API specifications, refer to the crate documentation on crates.io. The examples above focus on practical usage patterns.

Protocol Reference

For a complete mapping of HSES protocol commands to API methods, see Protocol Command Reference.

平台分布

Cursor

32.85%
按下载量换算41

OpenCode

21.29%
按下载量换算26

Antigravity

20.25%
按下载量换算25

windsurf

12.52%
按下载量换算16

Claude Code

8.22%
按下载量换算10

Codex

3.43%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/masayuki-kono/agent-skills --skill moto-hses-usage;npx skills add masayuki-kono/agent-skills --skill "moto-hses-usage" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills