vision-scaffold

vision-scaffold is a skill for Claude Code from Jinchen-Yang/diansai-skill. It costs 99 tokens per session (782 once invoked), scanned A, original, MIT.

A starter code structure for visual software running on a K230 camera board with CanMV, a Python-based camera platform. It processes camera images and sends results to a main controller.

In plain words
What is it for?
Use it to build line following, colored-object tracking, and digit recognition, while grouping camera settings and sending results over the defined serial connection.
Why use it?
It gives vision code a consistent structure and keeps messages between the camera board and controller aligned.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is protocol.py # 从 ../contracts/ 复制(勿手改).

Good fit Use it to build line following, colored-object tracking, and digit recognition, while grouping camera settings and sending results over the defined serial connection.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Jinchen-Yang/diansai-skill
agentmods
npx agentmods add skills/jinchen-yang/diansai-skill/vision-scaffold

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vision-scaffold

README.md
[![agentmods](https://agentmods.dev/badge/skills/jinchen-yang/diansai-skill/vision-scaffold/github.svg)](https://agentmods.dev/skills/jinchen-yang/diansai-skill/vision-scaffold)
Your own site
<a href="https://agentmods.dev/skills/jinchen-yang/diansai-skill/vision-scaffold"><img src="https://agentmods.dev/badge/skills/jinchen-yang/diansai-skill/vision-scaffold/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vision-scaffold

Your own site · 80×15
<a href="https://agentmods.dev/skills/jinchen-yang/diansai-skill/vision-scaffold"><img src="https://agentmods.dev/badge/skills/jinchen-yang/diansai-skill/vision-scaffold.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 782 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00099 $0.00782
Opus 5 $0.00049 $0.00391
Sonnet 5 $0.00020 $0.00156
Haiku 4.5 $0.00010 $0.00078

Measured 12d ago against content hash 491aa7717bfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

vision-scaffold 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 12d 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.

.claude/skills/vision-scaffold/SKILL.md · 39 lines

What it actually says

vision-scaffold —— K230 视觉骨架(流水线 ⑧,算法 lane)

lane: 算法(DeepSeek/GLM 擅长代码) · : 语法检查 + 现场标阈值

K230 是独立板,可桌面独立开发。发帧只用 contracts/protocol.py(与主控 protocol.h 同源同签名,杜绝漂移)。

前置

design/solution.md(视觉要做什么)、contracts/protocol.py(已生成)。

生成结构(写到 vision/

vision/
  README.md          # CanMV 烧录/运行(指向 env/vision.md), 镜像版本锁定提醒
  main.py            # 主循环: 取流 → 处理 → 用 protocol.py 发帧
  line_follow.py     # 巡线: 取一行/多行, 求中线偏差 error(int16)
  blob_track.py      # 色块/光点: find_blobs → cx,cy
  digit_recog.py     # 门牌数字: KPU/模板, 出 class_id+confidence
  protocol.py        # 从 ../contracts/ 复制(勿手改)
  config.py          # ★ 阈值/ROI/曝光 占位, 现场标定

步骤

  1. main.py:CanMV 初始化(sensor/lcd),主循环里按当前任务调 line_follow/blob_track/digit_recog,把结果用 protocol.line_error()/blob_xy()/target_class() 经 UART 发出。硬件相关 import(sensor/image/lib)放运行时,保证主机 py_compile 语法可过
  2. line_follow.py:灰度/二值化取中线,输出 error(中线相对画面中心的偏差,int16)。阈值放 config.py
  3. blob_track.pyfind_blobs 取最大色块 cx,cy。
  4. digit_recog.py:KPU 模型或模板匹配,出 class_id+confidence连续 N 帧一致才采信(防误识,呼应 KB08 FSM)。
  5. config.py:所有阈值/ROI/曝光/串口波特(115200)集中放,标"现场标定"。
  6. 复制 contracts/protocol.pyvision/
  7. README 写运行步骤 + 镜像版本须与队伍锁定一致;阈值现场标(见 test-checklist)。

与主控对接

  • 帧格式由 contracts/protocol.py 决定;改协议找 lead 改 protocol.yaml 重生成,不要在 K230 端硬编
  • 联调:K230 发 → 主控 k230_uart.cproto_parse_byte 收,串口助手可旁观 AA 55 .. 0D
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. 12d ago First seen · 39 lines · 99 tokens per session scan A 491aa7717bfe

Subscribe to this mod's changes

vision-scaffold is a skill published in the GitHub repository Jinchen-Yang/diansai-skill (9 stars, last pushed 1mo ago), licensed MIT. It adds 99 tokens to every session and 782 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

mspm0-ccs

Tool-neutral CLI agent rules for TI MSPM0 development with Code Composer Studio, Keil/uVision, CMake/GCC/OpenOCD, SysConfig, and DriverLib. Use when an agent needs to inspect or modify MSPM0 projects, edit .syscfg configuration, avoid generated SysConfig/build files, use DriverLib APIs, validate SysConfig output…

mc3545dada/mspm0-skill · 101 tokens

mspm0-skill

Tool-neutral CLI agent rules for TI MSPM0 development with SysConfig, DriverLib, CCS, Keil/uVision, CMake/GCC/OpenOCD, and supported board references. Use when an agent needs to inspect or modify MSPM0 projects, validate SysConfig output, package examples, or work on NUEDC embedded firmware.

Ibook000/mspm0-skill · 76 tokens

llama-cpp

Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware. Use for edge deployment, M1/M2/M3 Macs, AMD/Intel GPUs, or when CUDA is unavailable. Supports GGUF quantization (1.5-8 bit) for reduced memory and 4-10× speedup vs PyTorch on CPU.

davila7/claude-code-templates · 76 tokens

iot-expert

Expert-level IoT systems, embedded devices, edge computing, and IoT protocols. Use when the user mentions embedded, edge computing, MQTT, sensors, or firmware, or when the task involves IoT Architecture, IoT Protocols, Embedded Systems, or Device Design.

personamanagmentlayer/pcl · 59 tokens

embedded-debugging

Debug embedded firmware on real hardware through the jlink-mcp server — crashes, hangs, peripheral misconfiguration, silent devices. Covers loading ELF symbols for source-level backtraces, supplying an SVD for named peripheral fields, and the halt/read/resume discipline. Use whenever debugging a microcontroller over a…

Klievan/jlink-mcp · 77 tokens

iot-skills

Use when developing with Raspberry Pi Pico (RP2040) for GPIO, I2C, Wi-Fi, MQTT, or sensor integration using MicroPython. Index of 1 skill: KE3036 Keyes Pico learning kit.

znlgis/opengis-skills · 50 tokens