skills/professional/picar-x-behavior/SKILL.md
Build composable robot behaviors for SunFounder Picar-X. Use when creating autonomous driving behaviors, sensor-reactive patterns, and behavior trees for the Picar-X robot platform. Do NOT use when the platform is not a SunFounder Picar-X without first adapting the API references; Do NOT use when the goal is general robotics outside the Picar-X hardware profile.
npx skillsauth add michaelalber/ai-toolkit picar-x-behaviorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"The world is its own best model. The trick is to sense it appropriately and often enough." -- Rodney Brooks, Intelligence Without Representation
This skill builds composable, safe robot behaviors for the SunFounder Picar-X. Behaviors are small, testable units of reactive control that combine into complex autonomous systems through well-defined composition patterns — priority, sequence, and parallel. Each behavior senses and acts independently; safety is enforced at the driver layer, not just the behavior layer; and nothing reaches real motors before it passes static tests with mocked hardware.
Non-Negotiable Constraints:
Full principle table, the pre-flight safety checklist, per-phase detail, discipline rules,
anti-patterns, and error recovery live in references/conventions.md.
DEFINE Name + one-sentence goal; sensor inputs; actuator outputs; safety constraints; sense-act loop.
IMPLEMENT Behavior subclass: setup()/update()/teardown(); bounds checks in update(); teardown()
always stops motors + centers servos; log reads/writes.
TEST_STATIC Mock all hardware; test update() command mapping, boundary conditions, teardown stop,
and safety-limit enforcement. All pytest pass before proceeding.
TEST_DYNAMIC Complete the pre-flight safety checklist (conventions.md). Speed 10-15; bounded run
(5-10s); observe + log; raise speed gradually only after clean runs.
COMPOSE Priority order (highest = safety); wire a behavior tree / priority selector
(patterns in behavior-composition.md); static-test first; verify suppression; low-speed dynamic test.
DEPLOY Operational speed limits; production watchdog timeouts; logging; monitor the first run
with operator present; iterate on tuning.
Exit criteria: a verified emergency-stop behavior wired at highest priority; each behavior passes
static tests with mocked hardware before any hardware run; dynamic tests started at ≤ 15 speed and
ramped only after clean runs; composed system suppresses lower priorities correctly; watchdog
timeouts configured. Driver API in references/picar-x-api.md.
<picar-behavior-state>
step: DEFINE | IMPLEMENT | TEST_STATIC | TEST_DYNAMIC | COMPOSE | DEPLOY
behavior_name: [e.g., "obstacle_avoidance", "line_following", "object_tracking"]
safety_constraints: [e.g., "max_speed=30, emergency_stop=enabled, min_distance=25cm"]
control_loop_hz: [number, e.g., 20]
last_action: [what was just done]
next_action: [what should happen next]
blockers: [any issues]
</picar-behavior-state>
references/output-templates.md.references/behavior-composition.md.references/picar-x-api.md.references/conventions.md.| Skill | Relationship |
|-------|-------------|
| sensor-integration | Build and calibrate sensor pipelines (ultrasonic filtering, grayscale normalization, camera capture); feed processed data into behaviors. |
| edge-cv-pipeline | Build CV pipelines (object/lane/sign detection) on the Pi; vision behaviors consume their outputs. |
| tdd / tdd-agent | Apply TDD when implementing behavior classes — failing tests for sensor-to-actuator logic before implementation, especially for static tests with mocked hardware. |
| jetson-deploy | If offloading heavy CV inference to a Jetson, use it for deployment; the Picar-X reads inference results over the network. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.