Skip to content
Back to skills

Opal Offline Segment Protocol

ASecurity

Prepare fixed-horizon offline state-action segments for OPAL primitive discovery and downstream latent relabeling.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
businesspythonbash

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill opal_offline_segment_protocol --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Opal Offline Segment Protocol?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Opal Offline Segment Protocol
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-opal-offline-segment-protocol/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-opal-offline-segment-protocol)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: opal_offline_segment_protocol
description: Prepare fixed-horizon offline state-action segments for OPAL primitive discovery and downstream latent relabeling.
---

# OPAL Offline Segment Protocol

## When To Use
Use this skill when an OPAL-style recovery needs to transform offline trajectories into fixed-horizon primitive-learning segments. Do not use it to train the primitive model or decide high-level latent actions.

## Inputs
- JSON trajectories with `states`, `actions`, and optional `rewards`.
- Primitive horizon `c` greater than zero.
- A segmentation mode; the bundled script implements deterministic non-overlapping windows.

## Outputs
- Segment records with `trajectory_id`, `start`, `horizon`, `states`, `actions`, `initial_state`, and optional reward summaries.
- A summary containing segment count and dropped short tails.

## Workflow
1. Validate that each trajectory has enough actions and states.
2. Slice non-overlapping windows of length `c`.
3. Preserve the first state as `s0` for the OPAL prior.
4. Keep reward metadata separate from primitive segment content.
5. Report dropped tails rather than padding silently.

## Validation
Run:

```bash
python tests/test_segment_protocol.py
```

## Limitations
The script is intentionally small and deterministic. It does not implement overlapping windows, padding, D4RL loading, or neural preprocessing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.