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

navi-stream导航流

Agent Skill

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

总安装

212

周安装

9

GitHub Stars

104

下载量

74
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/navi-language/navi --skill navi-stream

简介

navi-stream 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态进行整理时使用。

  • 适用于开发类任务,可协助分析代码变更、协作事项及项目进展。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,具体路径为 skills/navi-stream。
  • 安装前需确认权限范围、维护状态,以及是否涉及联网、命令执行或文件读写。
  • 建议结合原始 README 文档进一步核验功能细节与使用边界。

SKILL.md

Navi Stream Language Skill

Navi Stream (.nvs) is a domain-specific language (DSL) designed specifically for quantitative trading and technical analysis. It is optimized for real-time streaming data processing and technical indicator calculations.

Core Features

  • Real-time Stream Processing - Designed for processing market data tick by tick
  • Technical Indicator Library - Rich built-in technical analysis functions (ta module)
  • Market Data Access - Direct access to OHLC data (quote module)
  • Visualization Support - Built-in plotting functions for indicator display
  • Parameterized Configuration - Support for dynamic parameters and metadata declarations
  • Internationalization - Native support for multi-language labels
  • Navi Integration - Can be imported and called by Navi programs

Quick Reference

Basic Structure

// 1. Metadata declaration
meta {
    title = "MACD",
    overlay = false,
}

// 2. Module imports
use quote, ta;

// 3. Parameter definition
param {
    Length1 = 12,
    Length2 = 26,
    Length3 = 9,
}

// 4. Indicator calculation
let fast_ma = ema(close, Length1);
let slow_ma = ema(close, Length2);

// 5. Export variables
export let hist = fast_ma - slow_ma;
export let signal = ema(hist, Length3);
export let macd = (hist - signal) * 2;

Key Syntax Rules

  • File extension: .nvs
  • Use 4 spaces for indentation
  • Single-line comments: //
  • String interpolation: ` value: ${x} `
  • Variable declaration: let (immutable), var (mutable)

Metadata System

Meta Block

meta {
    title = "Indicator Name",
    overlay = false,        // false: separate window, true: overlay on price chart
    hideparams = true,      // Hide parameter panel
}

Parameter Declaration

param {
    // Simple parameter
    Period = 14,

    // Parameter with metadata
    @meta(title = "MA Period", range = 1..250)
    MA_Period = 20,

    // Multiple parameters
    Short = 12,
    Long = 26,
    Signal = 9,
}

// Use parameters in code
let ma = ema(close, Period);

Internationalization Labels

@title_period {
    "en" = "Period",
    "zh-CN" = "周期",
    "zh-HK" = "週期",
}

// Use label
param {
    @meta(title = @title_period)
    period = 14,
}

Market Data Access (quote module)

Built-in Data Fields

use quote;

// Access current period data
let current_price = close;
let high_price = high;
let low_price = low;
let open_price = open;
let vol = volume;
let amt = turnover;

// Access historical data (time series)
let prev_close = close[1];      // Previous period
let prev_high = high[2];        // 2 periods ago

Available data fields:

  • close - Close price
  • open - Open price
  • high - High price
  • low - Low price
  • volume - Volume
  • turnover - Turnover
  • time - Timestamp

Time Series Pattern

// Access past data
if (close > close[1]) {
    // Current close is higher than previous period
}

// Multi-period comparison
if (close > high[5]) {
    // Current price breaks above high from 5 periods ago
}

Technical Indicator Functions (ta module)

Moving Averages

use ta;

// Simple moving average
let sma20 = ma(close, 20);

// Exponential moving average
let ema12 = ema(close, 12);
let ema26 = ema(close, 26);

// Apply to different data sources
let high_ma = ema(high, 10);
let low_ma = ema(low, 10);

Common Technical Indicators

// MACD
let diff = ema(close, 12) - ema(close, 26);
let dea = ema(diff, 9);
let macd = (diff - dea) * 2;

// Bollinger Bands logic
let mid = ma(close, 20);
let upper = mid * 1.02;
let lower = mid * 0.98;

Helper Functions

// Min and max values
let min_val = min(a, b);
let max_val = max(a, b);

// Absolute value
let abs_val = abs(diff);

// Conditional count
let count_up = count(close > open, 10);  // Number of up days in last 10 periods

// Bars since condition met
let bars = barslast(close > ma);

Plotting System

Plot Function

// Basic plotting
plot(value, title: "Title", color: #ff0000);

// Multiple series
plot(ma5, title: "MA5", color: #ddff53, key: "ma5");
plot(ma10, title: "MA10", color: #4781ff, key: "ma10");
plot(ma20, title: "MA20", color: #fc6ebc, key: "ma20");

Shape Drawing

// Draw candlestick shapes
stick(top, bottom, color, hollow: true);

// Example: Price range
if (close > open) {
    stick(high, low, #red, hollow: false);
}

// Fill area
fill(upper, lower, #blue);

// Polyline
polyline(value, #green);

Text Annotation

// Draw text at specified position
if (buy_signal) {
    drawtext(close * 0.95, "Buy", #red);
}

if (sell_signal) {
    drawtext(close * 1.05, "Sell", #green);
}

Variables and Types

Variable Declaration

// Immutable variable
let price = close;
let ma = ema(close, 20);

// Mutable variable
var counter = 0;
var sum: number = 0.0;

// Export variable (becomes indicator output)
export let signal = cross_signal;
export let macd = macd_value;

Basic Types

// Number type (floating point)
let price: number = 100.5;
let volume: number = 1000000;

// Boolean
let is_up = close > open;
let crossed = cross_over(fast, slow);

// String
let message = "Hello";
let label = `Price: ${close}`;

// nil (null value)
let optional_value: number = nil;

// Color
let red = #ff0000;
let blue = #0000ff;
let green = #00ff00;

Array Operations

// Create array
var values = array.new::<number>();

// Array operations
if (barstate.is_confirmed) {
    values.unshift(close);  // Insert at beginning
}

let first = values.get(0);   // Get element
let length = values.len();   // Get length

// Iterate array
for (let i in 0..values.len()) {
    let val = values.get(i);
}

Control Flow

Conditional Statements

// if-else
if (close > open) {
    stick(high, low, #red);
} else if (close < open) {
    stick(high, low, #green);
} else {
    stick(high, low, #gray);
}

// Conditional plotting
if (close > ma20) {
    plot(close, color: #red);
}

Loops

// Range loop
for (let i in 1..10) {
    sum += values.get(i);
}

// Calculate minimum
let min_val: number = values.get(0);
for (let i in 1..min(n, values.len())) {
    min_val = min(min_val, values.get(i));
}

Function Definition

// Custom function
fn calc_average(x: number, y: number): number {
    return (x + y) / 2;
}

// Function with state
fn dllv(x: number, n: number): number {
    var values = array.new::<number>();
    if (barstate.is_confirmed) {
        values.unshift(x);
    }

    let result: number = values.get(0);
    for (let i in 1..min(n, values.len())) {
        result = min(result, values.get(i));
    }
    return result;
}

// Use function
let low_val = dllv(close, 10);

Common Patterns

Trend Detection

// Golden cross and death cross
let golden_cross = fast_ma > slow_ma && fast_ma[1] <= slow_ma[1];
let death_cross = fast_ma < slow_ma && fast_ma[1] >= slow_ma[1];

// Breakout
let breakout = close > high[20];  // Break above 20-period high
let breakdown = close < low[20];   // Break below 20-period low

Divergence Detection

// Bullish divergence: price makes new low but indicator doesn't
let price_low = dllv(close, n);
let indicator_low = dllv(diff, n);

let bullish_divergence =
    close < price_low[period] &&    // Price makes new low
    diff > indicator_low[period];    // But indicator doesn't

Multi-Period Analysis

// Short, mid, long-term trends
let short_trend = ema(close, 5);
let mid_trend = ema(close, 20);
let long_trend = ema(close, 60);

// Trend alignment
let all_up = short_trend > mid_trend && mid_trend > long_trend;
let all_down = short_trend < mid_trend && mid_trend < long_trend;

Channel System

// Price channel
let mid = ema(close, 20);
let upper = mid * 1.02;
let lower = mid * 0.98;

// Draw channel
plot(upper, color: #red);
plot(mid, color: #yellow);
plot(lower, color: #green);

// Breakout signal
if (close > upper) {
    drawtext(close, "Breakout", #red);
}

Integration with Navi

Calling NVS from Navi

// Navi code (call_macd.nv)
use nvs.macd;  // Import macd.nvs

struct Candlestick {
    time: int,
    open: float,
    high: float,
    low: float,
    close: float,
    volume: float,
    turnover: float,
}

fn main() throws {
    let indicator = macd.new();  // Create instance

    // Feed data tick by tick
    for (let candle in candlesticks) {
        indicator.execute(
            time: candle.time,
            open: candle.open,
            high: candle.high,
            low: candle.low,
            close: candle.close,
            volume: candle.volume,
            turnover: candle.turnover
        );

        // Access exported variables
        println(`hist=${indicator.hist:?}`);
        println(`signal=${indicator.signal:?}`);
        println(`macd=${indicator.macd:?}`);
    }
}

Best Practices

Naming Conventions

// Parameters: CamelCase or snake_case
param {
    ShortPeriod = 12,
    long_period = 26,
}

// Variables: snake_case
let fast_ma = ema(close, ShortPeriod);
let slow_ma = ema(close, long_period);

// Export variables: lowercase
export let signal = buy_signal;

Parameter Ranges

// Set reasonable ranges for parameters
param {
    @meta(range = 1..100)
    Period = 14,  // Limited to 1-100

    @meta(range = 1..250)
    MA_Period = 20,
}

Performance Considerations

// Good: Avoid repeated calculations
let ma20 = ema(close, 20);
let signal1 = close > ma20;
let signal2 = ma20 > ma20[1];

// Bad: Repeated calculations
let signal1 = close > ema(close, 20);
let signal2 = ema(close, 20) > ema(close, 20)[1];

Conditional Optimization

// Good: Combine conditions
let uptrend = close > ma20 && ma20 > ma60;
if (uptrend) {
    plot(close, color: #red);
}

// Use intermediate variables for readability
let price_above_ma = close > ma20;
let ma_trending_up = ma20 > ma20[1];
let strong_signal = price_above_ma && ma_trending_up;

CLI Commands

# Navi Stream runs through Navi
navi run script.nv        # Run Navi script that calls .nvs
navi build                # Build project (including nvs modules)

When to Load References

Load reference files from references/ directory when you need detailed information:

  • syntax.md - Complete syntax reference
  • indicators.md - Technical indicator functions in detail
  • plotting.md - Plotting system detailed guide
  • patterns.md - Common indicator patterns and strategies

Use Read tool to load these files from ~/.claude/skills/navi-stream/references/.

Examples Directory

The examples/ directory contains runnable code samples:

  • macd.nvs - MACD indicator example
  • ma_cross.nvs - Moving average crossover example
  • bollinger.nvs - Bollinger Bands example
  • rsi.nvs - RSI indicator example

Resources

Important Notes

  • Navi Stream focuses on indicator calculation, not general-purpose programming
  • All calculations are streaming - process one data point at a time
  • Exported variables become indicator outputs, displayable on charts
  • When called from Navi programs, each execute() call processes one new data point

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.52%
按下载量换算28

Claude

29.95%
按下载量换算22

Cursor

19.61%
按下载量换算15

Gemini CLI

9.97%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills