
pio-wrapper
by ShocKwav3
A configurable Bluetooth HID rotary encoder. Turns a simple knob into a versatile desktop peripheral with customizable wheel behaviors and button actions.
SKILL.md
name: pio-wrapper description: Filters PlatformIO output to reduce token usage in agentic tools. Returns success confirmation on successful builds and only error lines on failures instead of full logs. Use when agentic tools need to run PlatformIO commands to reduce context token consumption.
PlatformIO Cli (pio) Wrapper
Overview
This skill provides a transparent wrapper for PlatformIO (pio) commands that dramatically reduces token usage by filtering verbose build output. Instead of agentic tools receiving entire build logs, this wrapper returns:
- On success: A simple confirmation message
- On error: Only the relevant error lines, not the full log
This keeps your token budget for more important context while still providing agentic tools with actionable error information for debugging.
How It Works
The wrapper script (scripts/pio-wrapper.py) intercepts all PlatformIO commands and:
- Runs the
piocommand with all provided arguments - Captures both stdout and stderr
- Checks the exit code
- Filters and returns appropriate output
Success Case
When a PlatformIO command completes successfully (exit code 0), agentic tools receive:
✓ PlatformIO command succeeded
This confirms the operation worked without wasting tokens on verbose success output.
Error Case
When a command fails, the wrapper extracts only error-related lines that contain:
- Keywords like "error", "failed" (case insensitive)
- ANSI color codes indicating red text (typical error formatting)
Example error output:
✗ PlatformIO command failed. Errors:
In file included from src/main.cpp:5:
include/config.h:12:10: error: 'UNDEFINED_CONSTANT' was not declared in this scope
int val = UNDEFINED_CONSTANT;
^
Usage
When using this skill, agentic tools should call the wrapper script instead of running pio directly:
/path/to/skill/scripts/pio-wrapper.py run -e use_nimble
The wrapper accepts all the same arguments as the standard pio command and transparently filters the output.
Token Savings
For a typical failed PlatformIO build:
- Standard output: 2000-5000 tokens (entire build log)
- Wrapped output: 50-200 tokens (error lines only)
This 10-50x reduction keeps your context window available for actual implementation work.
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です