/qimsdk-agentic-skills:qimsdk-python-app-builderfrom qimsdk-agentic-skills
Builds, debugs, and packages Python apps using the qimsdk package for multimedia and AI pipelines, including Pipeline, Element, and ML bin wrappers.
Ships in qimsdk-agentic-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to generate, debug, validate, and package QIM SDK Python applications. This skill is for Python qimsdk app artifacts only; it is not for C++, C sample apps, or gst-launch-1.0 command generation.
SKILL.md is the router. Detailed API facts, plugin facts, construction patterns, artifact rules, and verifier checks live in the purpose-named references below. Load only the references needed for the user's task so generation stays fast, low-token, and accurate.
references/generation-rules.md for any generation, edit, validation, or review task.references/example-retrieval.md and run rank_examples.py to ground the draft in known-good examples — this adds context alongside the rest of this workflow, it does not replace steps 4-8. Finding a retrieval match does not skip or shorten any subsequent step — all of steps 4-8 run unconditionally regardless of what retrieval returns or whether a file was leveraged. Skip this step for plugin-only lookups.references/plugin-catalog.md for plugin/property/module/runtime facts; do not invent or duplicate plugin facts..tflite filename, load references/model-catalog.md before filling module, delegate, labels/settings expectations, or mandatory results.references/artifact-contract.md, create every required file, and run references/verify-python-app.sh before declaring the artifact complete.SKILL.md + references/*.md).references/plugin-catalog.md; other references may show usage but must not become competing catalogs.references/model-catalog.md; use it when the prompt names a known model or .tflite filename. Catalog model facts override generic heuristics; user-provided paths and values still win.qimsdk-python- prefix.main.py and README.md; YAML-mode requests also produce a YAML config file unless the user explicitly says the YAML already exists and should not be generated.main.py changes, update the artifact README.md in the same pass.Pipeline Flow with Text Summary and Mermaid Diagram subsections, plus Steps to Run; flow content must match the actual code.pulsesrc or pulsesink, include the PulseAudio prerequisite in the response and in README Steps to Run: wpctl status, then wpctl set-default <node_no.>. Do not invent a default node number; <node_no.> is device-specific.Steps to Run must first state that all models, labels, media, and other referenced files are present on the device, then show scp main.py <user>@<device-ip>:~/, then ssh <user>@<device-ip> and python3 ~/main.py. Do not add chmod +x — Python apps run via python3 <path>, not direct execution, so the executable bit is irrelevant; this is the one place this skill diverges from the GStreamer and C++ builder skills, which both chmod/execute a compiled or script artifact.create_and_execute_pipeline(...), define main() -> None, and end with if __name__ == "__main__": main().-i as the short alias for --input-config and -m as the short alias for --model-base-path; do not invent additional aliases.The SDK supports two construction styles.
Use explicit construction for new generated apps unless the user asks otherwise:
Element, wrapper, and filter objects first.set(...)pipeline.add(element)pipeline.link(...), or rely on insertion-order auto-linking only for simple linear chainsImplicit construction uses chained factory calls such as .add("factory", "name", "prop", value, ...).
Use implicit style when:
Do not mix explicit and implicit construction styles in one generated app unless the user explicitly asks for mixed style.
Keep these rules router-visible because missing them commonly creates broken apps:
qimsdk exports. Do not import from qimsdk._* internals unless the user explicitly asks.pipeline.execute() inside create_and_execute_pipeline(...); keep main() -> None for logging setup, argument parsing, and calling create_and_execute_pipeline(...). Do not leave executable pipeline setup at module top level.ImsdkLogLevel, ImsdkGstLogMode, SetImsdkLogLevel, SetImsdkGstLogMode.SetImsdkGstLogMode(ImsdkGstLogMode.ImsdkLog) and SetImsdkLogLevel(ImsdkLogLevel.Debug) unless user explicitly requests a different logging mode or verbosity.VideoFilter().resolution(width, height) and .framerate(fps); do not invent .width() or .height().$HOME in Python before passing any path to an element property. Element properties do not do shell expansion — a raw "$HOME/..." string fails to open. Use f"{os.environ['HOME']}/..." for every path constant (input/model/labels/output); do not use os.path.expandvars("$HOME/...") — it silently leaves the string unexpanded if HOME is unset instead of raising, reproducing the same unresolved-path failure. See references/generation-rules.md.VideoFilter, TextFilter, TensorFilter, ImageFilter, H264Filter, and other stream filter objects with pipeline.add_stream_filter(...), never with pipeline.add(...).pipeline.add_stream_filter("<name>", filter_obj) form. Do not use the one-argument form, because repeated filter types such as two TextFilter() instances collide on default element names like textfilter.pipeline.link(...) must exactly match the name passed to pipeline.add_stream_filter(...), for example pipeline.add_stream_filter("vf", vf), pipeline.add_stream_filter("mlf1", mlf1), and pipeline.add_stream_filter("mlf2", mlf2).set_buffer_producer(...), set_buffer_consumer(...), set_preroll_handler(...), set_eos_handler(...), and set_enough_handler(...); for raw element signals (e.g. AppSrc need-data) use connect_signal("need-data", ...) (preferred over get_raw().connect(...)) only when explicitly requested. connect_signal/disconnect_signal are for generic GObject element signals not covered by a typed wrapper — do not use them to replace the AppSrc/AppSink handler callbacks, and do not generate generic set_handler(...) on AppSrc or AppSink. AppSrc.push_buffer(...) consumes the wrapper through the SDK's raw-buffer transfer path; use Buffer.get_raw_buffer() only when an explicit copy/ownership bridge is required.v4l2h264dec capture-io-mode=4 output-io-mode=4 unless user overrides with documented values, and place a queue immediately after hardware decode before any filter, tee, AI, display, or mux stage.VideoFilter().format("NV12") before branching or AI preprocessing unless user requests another documented format.qticamsrc/qtiqmmfsrc, default camera=0 unless user asks for another camera.qticamsrc/qtiqmmfsrc camera inputs, if the user does not provide resolution or framerate, constrain the camera stream with VideoFilter().format("NV12").resolution(1920, 1080).framerate(30) before display, branching, or AI preprocessing, and call out 1920x1080 @ 30fps as an assumed camera default in the artifact README.v4l2src device=<DEVICE_NODE> -> VideoFilter().format("YUY2") -> qtivtransform -> VideoFilter().format("NV12") before display, branching, or AI preprocessing; do not apply ISP-camera resolution/framerate defaults to USB unless the user requests them.waylandsink fullscreen=True sync=True for EVERY source type, including live camera sources (qticamsrc, qtiqmmfsrc, v4l2src) — camera source type alone is not a reason to use sync=False. Use sync=False only for three exceptions: (1) more than 8 independent concurrently active input streams AND a processing-heavy topology (shared/batched inference, or a large composer grid where HTP/batch preroll makes frames arrive well behind their PTS, causing sync=True to drop late frames and freeze/blacken the display) — a 4-stream AI wall, a simple multi-stream playback grid, or a batch group of 8 or fewer streams stays sync=True; (2) display shares a tee/composer source with a parallel encode/file/metadata sink that can stall the display clock (stream-count-independent, can apply even with 1 stream) — pair with enable-last-sample=False when it is also a multi-sink camera pipeline; (3) the user explicitly requests lower latency over A/V sync. Audio-classification display pipelines must OMIT the sync property entirely.tee, route postprocess metadata through TextFilter(), and merge video + metadata with qtimetamux before qtivoverlay.qtivcomposer. Do not force rendered video through TextFilter()/qtimetamux.VideoFilter after qtimlpostprocess MUST be .format("RGBA") (never BGRA/RGB — src caps are video/x-raw,{RGBA,RGBx}; anything else fails to link). Resolution: when the branch feeds a qtivcomposer whose sink pad sets dimensions (segmentation/depth/super-res/detection tiles), do NOT also pin .resolution() on this filter — device-verified, it fails caps fixation with Fixated width in filter caps is not supported with current post-process type! regardless of format; let the composer size it. Only pin .resolution(w, h) when there is NO composer pad geometry sizing the branch (e.g. a small overlay panel composited without per-pad dimensions). See references/plugin-catalog.md "Module Output Types".qtivcomposer pad geometry via composer.input(N).set("position", [x, y]) / .set("dimensions", [w, h]) using Python LISTS. Never use gst-array strings like "<x, y>", never element-level sink_N::position properties, never scalar x/y/width/height. See references/api-surface.md.qtivcomposer (always a trigger — composer holds buffers for stream sync → the in-place qtimetamux/qtivoverlay draws nothing), a sibling branch has filesink or qtimlmetaparser (required under load — these are fast but can still hold the buffer), a leaf video AppSink shares a tee with qtimlvconverter (poisons the DMA pool → 0 inference, "Buffer does not have FD memory"), or N sibling AI branches each overlay their own result off one shared tee with no composer at all (only one buffer-mutating consumer per shared tee pad can draw in place — the rest render nothing), insert qtivtransform ! VideoFilter(NV12) on each affected branch to force a private buffer copy. See references/source-sink-patterns.md "Buffer Writability Under Shared Tees".references/ai-pipeline-patterns.md; do not reduce these to the generic single-stream or two-stage templates.references/multimedia-pipeline-patterns.md and references/source-sink-patterns.md.MLVideo*Bin / qtimlvideo*bin), keep ML-bin stages directly in the media path: source/decode -> VideoFilter(NV12) -> MLVideo*Bin -> qtivoverlay -> sink, or direct cascades such as mlbin1 -> mlbin2 -> qtivoverlay -> sink. Do not wrap ML-bin output in external tee -> TextFilter() -> qtimetamux metadata fan-in; use qtimetamux/TextFilter() only for discrete AI branches that emit metadata separately.qtimetamux writability, do not assume camera buffers are inherently non-writable; add qtivtransform before qtimetamux when the same source/tee also feeds qtivcomposer (always required — it holds buffers for stream sync), when a sibling branch has filesink or qtimlmetaparser (required under load — these are fast but can still hold the buffer), when a documented source/format path requires conversion/copy, or when runtime logs show the metadata attach warning.qtimlvconverter mode="image-batch-non-cumulative" and stage-2 mode="roi-batch-cumulative".references/generation-rules.md "Known Model Catalog".lite-3dmm (facemap 3DMM, stage 2 of face recognition) requires /etc/data/{blendShape,meanFace,shapeBasis}.bin on the device (hard-coded in facemap_3dmm_settings.json); without them stage 2 fails Failed to open /etc/data/meanFace.bin. Note this device prerequisite in the README. See references/model-catalog.md.postprocess -> TextFilter -> qtimetamux -> qtivoverlay chain. Use two tee/mux stages: split before stage 1, merge stage-1 metadata with qtimetamux, split the merged stream before stage 2, merge stage-2 metadata with a second qtimetamux, then overlay.qtimetamux stages, qtimetatransform module="roi-palmd" between the first mux and the second split, stage-2 inference output split into an hlandmark metadata branch and a tensor -> embedder inference -> classifier inference -> mobilenet classification branch, then merge both into the second mux before qtivoverlay.qtimlpostprocess, use module, labels, and optional settings; include settings only when user asks for config/settings/threshold tuning or provides a settings path.settings as JSON with the canonical confidence key, for example {"confidence": 50.0}. Do not use confidence_threshold or semicolon-delimited settings.yolov8, yolov5, yolo-nas, qfd, palmd), set bbox-stabilization=True; omit it for file-source pipelines unless user requests stabilization.module="qpd" when model/labels/settings paths indicate person-foot intent, unless user overrides.gear_guard_net paths default to module="yolov8" unless user overrides.module="yolov8" unless user overrides.external-delegate-path="libQnnTFLiteDelegate.so" and external-delegate-options="QNNExternalDelegate,backend_type=htp,log_level=(string)1;" unless the user provides exact delegate options.QNNExternalDelegate,backend_type=htp,htp_performance_mode=(string)2,log_level=(string)1;. For multi-batch HTP/NPU walls, use the named topology section and round-robin batch groups with htp_device_id when multiple HTP devices are present.QNNExecurorBackend:HTP, QNNExecutorBackend:HTP, QNNExternalDelegateBackend:HTP, or colon-separated QNN delegate option strings.inference-* and postprocess-* property families; do not mix discrete-element property names with bin property names.MLVConverter("name").set(engine="none").set_handler(callback) for discrete pipelines or MLVideo*Bin.set("preprocess-engine", "none").set_preprocess_handler(callback) for ML-bin pipelines.signal.signal(SIGINT, ...) handling unless the user asks for custom shutdown behavior.MLVConverter("preprocessing").set(engine="none").set_handler(callback)..set_preprocess_handler(callback) on MLVideoTFLiteBin, MLVideoQNNBin, MLVideoSNPEBin, or MLVideoONNXBin.(blits, outmlframe) -> bool."preprocess-engine", "none" before .set_preprocess_handler(...).blits contains MLVideoBlit entries; use blit.info, blit.destination, and blit.planes() only as placeholders unless the request provides exact tensor conversion logic. Do not instruct generated callbacks to call blit.unmap() manually; qimsdk unmaps blits after callback return.False because no valid tensor was written. Generated comments must state that after implementing tensor conversion and writing outmlframe.get_tensor(...), the callback must return True. README must state that placeholder custom-preprocess artifacts are not functionally runnable for inference until real tensor-write logic is implemented.MLPostprocess("name").set_handler(callback) for discrete postprocess stages..set_postprocess_handler(callback, kind=None) after the bin is constructed and contains an internal qtimlpostprocess.(mlframe, mlparams, results) or (mlpostprocess, mlframe, mlparams, results).ObjectDetections, Poses, Segmentations, DepthMaps, Tensors, ImageClassifications, or AudioClassifications.gi.require_version("GstQtiML", "1.0") import block from references/ml-postprocess.md and mention the GstQtiML-1.0.typelib runtime dependency in README.GstQtiML.* objects (Detection, Pose, Keypoint, KeypointLink, Segmentation, DepthMap, Classification) or write Tensors outputs as documented in references/ml-postprocess.md.return. They must leave the typed output object valid and return True, even if it is empty, so downstream TextFilter/qtimetamux can receive a buffer and the pipeline can advance past PAUSED. Use False only for real validation/error branches. Add a TODO comment beside the stub explaining that decode/population logic is intentionally omitted.| Task | Load these references |
|---|---|
| Any generation, edit, validation, or review | references/generation-rules.md |
| API/method/import/style lookup | references/api-surface.md, references/sdk-architecture.md, references/pipeline-construction.md |
| Plugin/property/module/runtime lookup | references/plugin-catalog.md |
| Known model filename/display name lookup | references/model-catalog.md |
| Source, sink, decode, encode, display, AppSrc/AppSink, queue/tee/filter utility rules | references/source-sink-patterns.md |
| Multimedia-only camera/file/encode/display/playback patterns | references/multimedia-pipeline-patterns.md |
| AI, ML-bin, daisy-chain, overlay, custom preprocess/postprocess | references/ai-pipeline-patterns.md, references/ml-postprocess.md, references/inference-runtimes.md |
| YAML/config-driven app | references/pipeline-construction.md, references/api-surface.md |
| Artifact folder/files, README, verification | references/artifact-contract.md |
| Grounding a Python app generation in known-good examples | references/example-retrieval.md |
generation-rules.md, example-retrieval.md, api-surface.md, pipeline-construction.md, source-sink-patterns.md, plugin-catalog.md, artifact-contract.md.generation-rules.md, example-retrieval.md, multimedia-pipeline-patterns.md, source-sink-patterns.md, plugin-catalog.md, artifact-contract.md.generation-rules.md, example-retrieval.md, ai-pipeline-patterns.md, ml-postprocess.md, inference-runtimes.md, plugin-catalog.md, artifact-contract.md.api-surface.md for callback forms and public wrapper/marker types.plugin-catalog.md or api-surface.md as appropriate.references/verify-python-app.sh verifies generated Python artifacts.Run it through the workflow in references/artifact-contract.md; do not treat script execution alone as a full contextual review.
references/generation-rules.md - common generation, clarification, style, placeholder, and comment rulesreferences/api-surface.md - public qimsdk imports, methods, wrappers, filters, lifecycle APIsreferences/sdk-architecture.md - qimsdk source layout and generation implicationsreferences/pipeline-construction.md - explicit and implicit construction patternsreferences/plugin-catalog.md - canonical plugin/property/module/runtime catalogreferences/model-catalog.md - known model-to-module/delegate/settings/results lookup tablereferences/source-sink-patterns.md - source/decode/sink patterns plus queue, tee, filters, mux/demux, links, and path utility rulesreferences/multimedia-pipeline-patterns.md - multimedia-only templates and constraintsreferences/ai-pipeline-patterns.md - AI/ML-bin/daisy-chain/overlay templatesreferences/ml-postprocess.md - built-in and custom Python postprocess guidancereferences/inference-runtimes.md - inference runtime and delegate property rulesreferences/artifact-contract.md - artifact layout, README contract, and verification workflowreferences/example-retrieval.md - retrieval-grounding: how to run rank_examples.py, screen ranked candidates for a genuine fit, and leverage a real matching file as the starting point (falling back to building fresh from the rules only when none fit).references/ai-pipeline-patterns.md (opens in a new tab)references/api-surface.md (opens in a new tab)references/artifact-contract.md (opens in a new tab)references/example-retrieval.md (opens in a new tab)references/generation-rules.md (opens in a new tab)references/inference-runtimes.md (opens in a new tab)references/ml-postprocess.md (opens in a new tab)references/model-catalog.md (opens in a new tab)references/multimedia-pipeline-patterns.md (opens in a new tab)references/pipeline-cache/gst-launch/1080p_avc_mp3_video_playback.sh (opens in a new tab)references/pipeline-cache/gst-launch/12stream_batch_object_detection.sh (opens in a new tab)references/pipeline-cache/gst-launch/16_stream_grid_playback.sh (opens in a new tab)references/pipeline-cache/gst-launch/32stream_image_classification.sh (opens in a new tab)references/pipeline-cache/gst-launch/5_stream_rtsp_object_detection_composite_rtsp_out.sh (opens in a new tab)references/pipeline-cache/gst-launch/6stream_hrnet_pose_qnn_cascade_compose_to_file.sh (opens in a new tab)references/pipeline-cache/gst-launch/8_stream_grid_playback.sh (opens in a new tab)references/pipeline-cache/gst-launch/ai_wall.sh (opens in a new tab)references/pipeline-cache/gst-launch/audio_classification_flac_file_decode.sh (opens in a new tab)references/pipeline-cache/gst-launch/detection_classification_daisy_chain.sh (opens in a new tab)references/pipeline-cache/gst-launch/face_detection.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
qimsdk, python-apps, multimedia-pipeline, ai-pipeline, gstreamer
Other plugins' skills for the same job
npx claudepluginhub qualcomm/qimsdk-agentic-skills --plugin qimsdk-agentic-skills4 skills in this plugin
/qimsdk-cpp-app-builderQIM SDK C++ app development using only APIs and patterns defined by this skill bundle. Use when building or updating C++ applications with qti::Pipeline, qti::Element, qti::AppSrc/AppSink, qti::CamSrc, qti::MLVConverter, qti::MLPostprocess, qti::MLVideo*Bin, stream filters, YAML pipeline config mode, and QIM SDK logging./qimsdk-deployDeploy, build, run, and retrieve QIM SDK GStreamer C apps, gst-launch pipelines, QIM SDK C++ apps, and Python qimsdk apps on Qualcomm Linux devices; also cross-compiles and installs IMSDK qtimlpostprocess post-process modules. Six modes: Mode A (gst-launch — push and run directly, no build), Mode B (Ubuntu on-device build — QIMSDK source tree on device), Mode C (host build — gstreamer-app-builder C sample app, build on a Linux workstation (x86_64 or aarch64, arch auto-detected) using the host SDK, deploy to QLI device), Mode P (Python qimsdk app — push main.py and run, no build), Mode D (host build — cpp-app-builder C++ SDK app, standalone build against the Yocto SDK on a Linux workstation (x86_64 or aarch64, arch auto-detected), deploy to QLI device), Mode M (post-process module — cross-compile an imsdk-postproc-<module>/ artifact to aarch64 with the plain g++-aarch64-linux-gnu cross-compiler, no SDK, then install it on a QLI device over SSH and verify it registers in gst-inspect-1.0 qtimlpostprocess's module= enum; triggers: 'cross-compile the postprocess module', 'build the module for aarch64', 'install the module on the device', 'is my module registered', 'gst-inspect does not list my module'). Returns structured result for eval scoring.