smarttune

A tool for analysing aircraft flight logs and suggesting tuning changes. PID tuning adjusts control response, FFT looks for repeating vibration frequencies, and filters reduce unwanted sensor noise.

In plain words
What is it for?
Analysing .bin, .log, .bbl, .bfl, and .ulg files for PID, vibration, filter, system-identification, hardware, and magnetometer data.
Why use it?
It turns logs from ArduPilot, Betaflight, or PX4 into checks and tuning advice without requiring the aircraft to be connected.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/raylanlin/smarttune-cli/skill
Any agent
npx skills add raylanlin/smarttune-cli --skill skill
Clone the repo
git clone --depth 1 https://github.com/raylanlin/smarttune-cli

Made for: Claude Code, Codex.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.02803
Opus 5 $0.00026 $0.01401
Sonnet 5 $0.00010 $0.00561
Haiku 4.5 $0.00005 $0.00280

Measured 2d ago against content hash 660d31573324, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

smarttune scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/SKILL.md · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SmartTune CLI (stune)

Multi-platform flight log analysis & tuning advisor. Supports ArduPilot (.bin/.log), Betaflight (.bbl/.bfl), and PX4 (.ulg).

Platform is auto-detected from the log file format.

Installation

cd ~/cli-tools/smarttune-cli
pip install -e .

Quick Reference

# Comprehensive analysis (recommended) — PID + FFT + Filter + Mag
stune analyze -i log.bin

# Log quality scoring — data completeness / excitation / sample rate
stune quality -i log.bin

# Individual analyses
stune pid -i log.bin -a roll
stune fft -i log.bin
stune filter -i log.bin --gyro-filter 40 --visual
stune sysid -i log.bin -a roll
stune hardware -i log.bin
stune magfit -i log.bin

# List supported platforms
stune platforms

Usage Rules

  1. Check help first: stune <command> --help when unsure about flags

  2. Terminal output by default: no -o flag → stdout only

  3. Optional charts: add --visual for matplotlib plots

  4. Cleanup after analysis: delete raw .bin/.log/.bbl/.ulg files after processing

  5. ⚠️ MANDATORY: Validate parameters before recommending. After analysis generates tuning suggestions, you MUST verify each parameter exists in the target firmware by running:

    stune params --validate <PARAM_NAME> <VALUE> -p <platform>
    

    If validation fails (exit code 1), do NOT recommend that parameter — it may not exist in the firmware, the value may be outside [min, max], or (for an enum) not a defined member. When the rejection lists allowed values, pick from those. Find an alternative or tell the user the parameter is not available.

    This is critical because:

    • Betaflight 4.5+ renamed many parameters (e.g., d_min_rolld_max_roll, gyro_lowpass_hzgyro_lpf1_static_hz)
    • Parameter names differ between firmware versions
    • Some parameters have strict value ranges that must be respected

    Never blindly output parameter recommendations without validation.

⚠️ Analysis done = output results. No residual files needed.

Read the full file on GitHub · 319 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 319 lines · 51 tokens per session scan A 660d31573324

Subscribe to this mod's changes

smarttune is a skill published in the GitHub repository raylanlin/smarttune-cli (28 stars, last pushed 19d ago), licensed MIT. It adds 51 tokens to every session and 2,803 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

authoring-pipelines

Use when the user wants a bagel data pipeline — reducing a log to windows around events ("keep 30s around every hard brake"), recurring snippets/GIFs/exports, or any tasks-and-gates automation over robot data.

Extelligence-ai/bagel · 52 tokens

exporting-visualizations

Use when the user wants to SEE robot data — visualize, plot, replay, or export a log or query result from bagel to a viewer or training format (Rerun, Lichtblick, PlotJuggler, LeRobot).

Extelligence-ai/bagel · 54 tokens

operating-live-sinks

Use when subscribing to live robot data (MQTT, rosbridge) through bagel, managing standing pipelines that survive restarts, or when questions about live-buffer sizes and disk usage come up.

Extelligence-ai/bagel · 45 tokens

triaging-robot-logs

Use when investigating a robot log or flight log with bagel — finding events, anomalies, or "what happened around X" in rosbags, MCAP, CAN, MDF4, ULog, or Betaflight files. Routes to the server's triage capability.

Extelligence-ai/bagel · 63 tokens

qt-qml-profiler

Use when the user is investigating QML / Qt Quick performance — both vague complaints ("the UI feels laggy", "this is slow", "frames are dropping", "the app stutters") and explicit asks to profile, find hotspots, or optimize bindings, signals, or rendering. Runs qmlprofiler on a 2D QML application, parses the .qtd…

mavlink/qgroundcontrol · 111 tokens

qt-ui-design

Design or audit UI for Qt/QML, Qt projects, web, or embedded MPU or MCU targets. Use when creating screens, layouts, navigation, or auditing UX.

mavlink/qgroundcontrol · 38 tokens