Skip to content

feat: add supervision AI coding skills for Claude Code and Cursor#2387

Open
greeshmab21 wants to merge 2 commits into
roboflow:developfrom
greeshmab21:feature/skills-integration
Open

feat: add supervision AI coding skills for Claude Code and Cursor#2387
greeshmab21 wants to merge 2 commits into
roboflow:developfrom
greeshmab21:feature/skills-integration

Conversation

@greeshmab21

Copy link
Copy Markdown

Summary

Adds an official AI coding skill for supervision, so agents like Claude Code and Cursor can use the library correctly instead of guessing at API names. Closes #2244.

The skill is organized as a top-level SKILL.md plus focused reference files under skills/references/, each targeting a spot where agents commonly hallucinate methods/params or pick the wrong tool.

What's included

  • skills/SKILL.md — entry point. The standard detect + annotate pattern (model → sv.Detections → annotate → save), plus a decision guide for sv.process_video vs. InferencePipeline: file-in/file-out with a simple callback vs. live/streaming sources with threaded inference. Links out to each reference file.

  • skills/references/detection.md — building sv.Detections from ultralytics/inference/SAM/transformers, key attributes (xyxy, confidence, class_id, tracker_id, mask), and filtering via boolean-mask indexing (detections[detections.class_id == 0]) instead of the nonexistent .filter().

  • skills/references/annotators.md — the full annotator class list with correct parameter names, the chaining/compose pattern for layering multiple annotators, and the BoundingBoxAnnotatorBoxAnnotator naming mistake.

  • skills/references/tracking.mdsv.ByteTrack setup, correct constructor param (track_activation_threshold, not confidence_threshold), correct update method (update_with_detections, not update), and filtering by tracker_id.

  • skills/references/video.mdsv.process_video's show_progress param (the progress=True typo silently no-ops), VideoInfo attributes including fps as a float (not int, to avoid timestamp drift), and VideoSink for manual frame-by-frame writing.

  • skills/references/utils.mdPolygonZone.trigger() for zone membership, LineZone counting with in_count/out_count, and sv.Color/sv.Color.from_hex/sv.ColorPalette.DEFAULT for styling.

Why

Agents frequently invent plausible-but-wrong supervision API surface (.filter(), BoundingBoxAnnotator, tracker.update(), progress=True) or reach for the wrong video-processing tool. This skill packages the correct patterns and the specific mistakes to avoid so agents get it right on the first try.

Testing

Docs-only change (markdown skill files, no source code touched). No tests affected.

@greeshmab21 greeshmab21 requested a review from SkalskiP as a code owner July 2, 2026 11:12
@CLAassistant

CLAassistant commented Jul 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was depercated

@Borda Borda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that shall be covered in llm.txt, and any agent shall be able to learn it from there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Skill Integration

3 participants