# Sampling And Indexing

> Standardize video sampling and frame indexing so interval instructions and mask frames stay aligned with a valid key/index scheme.

- **Type:** Skill
- **Install:** `agentstack add skill-xuansenpa1-skillrevise-sampling-and-indexing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xuansenpa1](https://agentstack.voostack.com/s/xuansenpa1)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [xuansenpa1](https://github.com/xuansenpa1)
- **Source:** https://github.com/xuansenpa1/skillrevise/tree/main/data/skillsbench/tasks/dynamic-object-aware-egomotion/environment/skills/sampling-and-indexing
- **Website:** https://arxiv.org/abs/2606.01139

## Install

```sh
agentstack add skill-xuansenpa1-skillrevise-sampling-and-indexing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# When to use
- You need to decide a sampling stride/FPS and ensure *all downstream outputs* (interval instructions, per-frame artifacts, etc.) cover the same frame range with consistent indices.

# Core steps
- Read video metadata: frame count, fps, resolution.
- Choose a sampling strategy (e.g., every 10 frames or target ~10–15 fps) to produce `sample_ids`.
- Only produce instructions and masks for `sample_ids`; the max index must be `{end}"` (integers only). Decide (and document) whether `end` is inclusive or exclusive, and be consistent.

# Pseudocode
```python
import cv2
VIDEO_PATH = ""
cap=cv2.VideoCapture(VIDEO_PATH)
n=int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
fps=cap.get(cv2.CAP_PROP_FPS)
step=10  # example
sample_ids=list(range(0, n, step))
if sample_ids[-1] != n-1:
    sample_ids.append(n-1)
# Generate all downstream outputs only for sample_ids
```

# Self-check list
- [ ] `sample_ids` strictly increasing, all end`, no extra text.
- [ ] Any per-frame artifact store (e.g., NPZ) contains exactly the sampled frames and no extras.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [xuansenpa1](https://github.com/xuansenpa1)
- **Source:** [xuansenpa1/skillrevise](https://github.com/xuansenpa1/skillrevise)
- **License:** MIT
- **Homepage:** https://arxiv.org/abs/2606.01139

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-xuansenpa1-skillrevise-sampling-and-indexing
- Seller: https://agentstack.voostack.com/s/xuansenpa1
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
