Agent skill
using-camera-interface
Guide for using ataraxis-video-system to implement camera functionality in sl-experiment. Maps library architecture, public API, and integration patterns used in this codebase.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/camera-interface
SKILL.md
Camera Interface Usage Guide
When implementing camera functionality in sl-experiment, use the ataraxis-video-system library following the patterns established in this codebase.
See CAMERA_INTERFACE_GUIDE.md for complete API reference and integration patterns.
IMPORTANT: Verification Requirement
Before writing any camera code, you MUST verify the current state of the dependent libraries. The documentation in this skill may be outdated.
Step 0: Version Verification
Follow the Cross-Referenced Library Verification procedure in CLAUDE.md to ensure local copies
of ataraxis-video-system and sl-shared-assets are up to date with their GitHub repositories.
If version mismatches exist, ask the user how to proceed before continuing.
Content Verification
After version verification, perform the following content checks:
1. Verify ataraxis-video-system
- Read
README.mdin/home/cyberaxolotl/Desktop/GitHubRepos/ataraxis-video-system/for current usage instructions - Read examples in
/home/cyberaxolotl/Desktop/GitHubRepos/ataraxis-video-system/examples/for recommended patterns - Read
src/ataraxis_video_system/__init__.pyto confirm exported classes and functions - Read
src/ataraxis_video_system/video_system.pyto verifyVideoSystemconstructor parameters and methods - Check
pyproject.tomlin sl-experiment for the current version dependency
2. Verify sl-shared-assets
- Read
README.mdin/home/cyberaxolotl/Desktop/GitHubRepos/sl-shared-assets/for current conventions - Read
src/sl_shared_assets/data_classes/configuration_data.pyto confirm camera configuration patterns - Verify
AcquisitionSystemsenum members for existing systems - Check existing camera dataclasses (e.g.,
MesoscopeCameras) for current field conventions - Review
__init__.pyexports to understand public API
3. Verify sl-experiment binding patterns
- Read
src/sl_experiment/mesoscope_vr/binding_classes.pyto confirm currentVideoSystemsimplementation - Check for any new patterns or conventions introduced since this skill was written
If any discrepancies are found between this guide and the actual library state, follow the current library implementation rather than this documentation.
Decision Logic
Does the acquisition system already have a binding class?
│
├─ YES → Add camera wrapper to existing binding_classes.py
│
└─ NO → Create full binding hierarchy (see de-novo system guide)
Existing binding classes: src/sl_experiment/mesoscope_vr/binding_classes.py
Quick Reference
Core Import
from ataraxis_video_system import (
VideoSystem,
VideoEncoders,
CameraInterfaces,
OutputPixelFormats,
EncoderSpeedPresets,
)
VideoSystem Instantiation
camera = VideoSystem(
system_id=np.uint8(51),
data_logger=logger,
output_directory=output_path,
camera_interface=CameraInterfaces.HARVESTERS,
camera_index=camera_config.camera_index,
display_frame_rate=25,
video_encoder=VideoEncoders.H265,
gpu=0,
encoder_speed_preset=EncoderSpeedPresets(camera_config.preset),
output_pixel_format=OutputPixelFormats.YUV420,
quantization_parameter=camera_config.quantization,
)
Lifecycle Pattern
camera.start() # Begin frame acquisition
camera.start_frame_saving() # Begin recording to disk
# ... acquisition runs ...
camera.stop_frame_saving() # Stop recording
camera.stop() # Release resources
sl-shared-assets Requirements
Camera configuration must be defined in sl-shared-assets before sl-experiment implementation.
For existing systems: Add camera dataclass if not present For de-novo systems: Create full configuration hierarchy
Required Configuration Classes
# sl-shared-assets/src/sl_shared_assets/data_classes/configuration_data.py
@dataclass()
class YourSystemCameras:
camera_index: int = 0
camera_quantization: int = 20 # 0-51, lower = better
camera_preset: int = 7 # 0-5, maps to EncoderSpeedPresets
System Configuration Container
@dataclass()
class YourSystemConfiguration(YamlConfig):
cameras: YourSystemCameras = field(default_factory=YourSystemCameras)
# ... other components
Existing Integration
See src/sl_experiment/mesoscope_vr/binding_classes.py for the VideoSystems wrapper class that
manages face and body cameras in this codebase.
System ID Allocation
| ID Range | Purpose |
|---|---|
| 50-99 | Camera systems |
Current: 51 (face), 62 (body)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?