Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions skills/rust-cli-inspector/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "rust-cli-inspector",
"description": "Rust CLI querying ETH price via Onchain OS",
"version": "1.1.0",
"author": {"name": "OKX"},
"license": "MIT",
"keywords": ["rust", "onchainos", "eth"]
}
7 changes: 7 additions & 0 deletions skills/rust-cli-inspector/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions skills/rust-cli-inspector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[package]
name = "rust-cli-inspector"
version = "1.1.0"
edition = "2021"
1 change: 1 addition & 0 deletions skills/rust-cli-inspector/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MIT License
35 changes: 35 additions & 0 deletions skills/rust-cli-inspector/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: rust-cli-inspector
description: "Rust CLI querying ETH price via Onchain OS"
version: "1.1.0"
author: "OKX"
tags: [rust, onchainos]
---

# Rust CLI Inspector

## Overview
Queries ETH price via Onchain OS token price-info.

## Pre-flight Checks
1. Ensure rust-cli-inspector binary is installed
2. Ensure onchainos CLI is available

## Commands

### Query ETH Price (default)
`rust-cli-inspector`

**When to use:** When user asks about ETH price. Runs onchainos token price-info automatically.

### Query ETH Price (explicit)
`rust-cli-inspector --query eth-price`

### Help
`rust-cli-inspector --help`

## Error Handling
| Error | Cause | Resolution |
|-------|-------|------------|
| Binary not found | CLI not installed | Run pre-flight |
| onchainos not found | Onchain OS not installed | Install onchainos |
16 changes: 16 additions & 0 deletions skills/rust-cli-inspector/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
schema_version: 1
name: rust-cli-inspector
version: "1.1.0"
description: "Rust CLI querying ETH price via Onchain OS"
author:
name: "OKX"
github: "okx"
license: MIT
category: utility
tags: [rust, onchainos, eth]
components:
skill:
dir: .
build:
lang: rust
binary_name: rust-cli-inspector
19 changes: 19 additions & 0 deletions skills/rust-cli-inspector/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use std::process::Command;

fn main() {
let args: Vec<String> = std::env::args().collect();
if args.len() > 1 && args[1] == "--help" {
println!("rust-cli-inspector v1.1.0");
println!("Usage: rust-cli-inspector [--query eth-price]");
println!("Queries ETH price via onchainos token price-info");
} else {
println!("rust-cli-inspector v1.1.0 - Querying ETH price via onchainos...");
let output = Command::new("onchainos")
.args(["token", "price-info", "--address", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "--chain", "ethereum"])
.output();
match output {
Ok(o) => print!("{}", String::from_utf8_lossy(&o.stdout)),
Err(e) => eprintln!("Error: {}", e),
}
}
}
Loading