executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
lov-list-videos用增量缓存扫描指定目录或全局(主目录与外接卷),秒级列出全部视频文件及大小、 修改时间,可选 ffprobe 补时长、分辨率与编码。Use when 用户说“列出所有视频” “找视频文件”“哪些视频最大”或 “list all video files”。
Independent GitHub snapshot · Automated classification · Original documentation governs
把一个目录或整台电脑里的视频文件列成一份可排序、可过滤的清单。核心是一个共享的
增量目录缓存:第一次扫描完整遍历,之后每次只对目录做 stat,未变化的目录直接复
用缓存,所以重复运行的成本接近“目录数 × 一次 stat”,与文件总数无关。
lov-search-filelov-video-momentslov-media-creator / lov-media-preprocessorlov-migrate-camera-mediaEvery generated Skill is connected to the shared user-profile/v1 contract in
skill.yaml. Read the shared user, brand, workspace, preferences, and this
Skill's skills.<skill_id> namespace at the start of every run. Keep the source
portable: resolved personal values belong in the shared profile, never here.
When the user directly states a durable preference or brand fact, persist it
through scripts/profile_store.py and report the saved profile path. Put
Skill-specific values under records.<field>; use brand.<field> or
user.<field> for shared values. Do not persist inferred secrets or credentials.
See references/user-profile.md for the complete contract.
本 Skill 读取的长期记录(都可选):
| 记录 | 含义 |
|---|---|
records.default_scope | 不带参数时的默认范围:current(默认)或 global |
records.global_roots | --global 使用的根目录列表;缺省为主目录加 /Volumes 下的外接卷 |
records.extra_excludes | 追加跳过的目录名或路径后缀 |
records.extra_extensions | 追加识别的视频扩展名 |
records.default_format | 默认输出:table、json、paths、csv |
records.default_sort | 默认排序:mtime、size、path、name、duration |
缓存文件与 Profile 同住:<profile 目录>/lov-list-videos/cache.json,默认即
~/.lovstudio/skills/lov-list-videos/cache.json。LOV_LIST_VIDEOS_CACHE 或
--cache 可以覆盖。缓存是可再生的派生数据,删掉只会让下一次变成全量扫描。
Read references/skill-composition.md before deciding whether to invoke or
extend any adjacent capability. The record distinguishes optional upstream and
downstream handoffs from embedded Kit modules. Do not silently depend on a
sibling Skill that is not shipped with this source.
You MUST follow these steps in order.
SKILL_DIR if the environment provides it.scripts/list_videos.py、scripts/profile_store.py、
references/cache-design.md、references/skill-composition.md 均存在。When running scripts manually:
export SKILL_DIR="/path/to/lov-list-videos"
Resolve context.profile on every invocation. The precedence is current request,
project context, Skill-specific profile records, shared preferences, shared
brand/user profile, then safe defaults. A direct user statement about a durable
preference or brand fact should be saved with scripts/profile_store.py record
using --confirm, followed by a concise saved-path report.
--global;什么都没说时扫当前工作目录,并在结果里写明扫的是哪里。--format json;
只要路径列表给 --format paths。--sort、
--since、--min-size、--ext,不要先全量输出再人工筛。--probe;它会调用 ffprobe,结果也会缓存。references/skill-composition.md。本 Skill 只负责“有哪些视频、在哪、
多大、多新”,下游的抽帧、剪辑、迁移各有归属,不要在这里顺手做。lov-search-file。python3 "$SKILL_DIR/scripts/list_videos.py"
python3 "$SKILL_DIR/scripts/list_videos.py" ~/Movies ~/Downloads
python3 "$SKILL_DIR/scripts/list_videos.py" --global --sort size --limit 30
# 最近 7 天、大于 200M、只看 mp4/mov,输出 JSON 给后续处理
python3 "$SKILL_DIR/scripts/list_videos.py" --global \
--since 7d --min-size 200M --ext mp4 mov --format json
# 补时长/分辨率/编码,按时长排序(自动启用 --probe)
python3 "$SKILL_DIR/scripts/list_videos.py" ~/Movies --sort duration
缓存控制。怀疑缓存过期用 --full 强制重新列目录;不想留痕用 --no-cache;
--clear-cache 删除缓存文件。扫描设置(扩展名集合、是否含隐藏目录)改变时
脚本会自动重新列目录,不需要手动清缓存。
默认跳过 node_modules、Library/Caches 等噪音目录、.app/.photoslibrary
等包目录、隐藏目录和外接卷上的 ._ 副本文件。用户明确要扫这些位置时加
--no-default-excludes 或 --hidden;只想多跳过某些目录用 --exclude。
用户说出长期偏好时写回 Profile,例如“以后默认全盘扫”:
python3 "$SKILL_DIR/scripts/profile_store.py" record \
--skill-id lov-list-videos \
--path records.default_scope \
--value '"global"' \
--confirm
scanned/reused 比例、错误数与
缓存路径。第二次运行 reused 应接近目录总数;不是就说明有大量目录变化或
设置改变,向用户说明。--format json 路径。errors 不为零时说明是权限拒绝或读取失败,并指出受影响的根目录;macOS 上
~/Library 部分子目录需要“完全磁盘访问”权限,这属于用户系统设置,不要绕过。skill-card.yaml, cases/cases.json, and pricing-card.yaml as the
standard trust bundle for this Skill.--probe 与 --sort duration 需要references/skill-composition.md