[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C1Q93SY6JST822S0JBJEY7":3,"skill-same:01M7C1Q93SY6JST822S0JBJEY7":43},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7C1Q93SY6JST822S0JBJEY7","sampling-and-indexing",null,"linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fdynamic-object-aware-egomotion\u002Frepaired_skill\u002Fsampling-and-indexing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# Sampling And Index-Domain Alignment\n\n## Purpose\nStandardize video sampling while explicitly separating sampled-frame indices from source-video frame indices, so interval instructions and per-frame artifacts align with the verifier-expected index domain and any task-specified sampling rate.\n\n## When to Use\nUse when a task requires sampling a video at a specified rate (for example, 5 fps) and producing downstream artifacts (JSON intervals, masks, frame arrays) that must be indexed consistently and validated against a schema\u002Fcontract.\n\n## Procedure\n- 1) Discover inputs and requirements (do not assume):\n- Locate the video input(s) and the required outputs from the task instructions (paths, formats, naming).\n- Extract source metadata with an available tool (preferred: ffprobe; fallback: OpenCV): total frames N (or duration), source fps src_fps, and duration.\n- Determine whether the task specifies required_fps (or a stride). If required_fps is specified, treat it as mandatory.\n- 2) Define and name the two index spaces up front:\n- sample_i: integer index into the sampled sequence, range [0, S-1].\n- src_frame: integer index into the original video frames, range [0, N-1] (if N known).\n- Decide a deterministic mapping rule from sample_i to src_frame (or to timestamp), and write it down as part of your run notes (for example: sample at uniform times t = k\u002Frequired_fps; convert to src_frame via a single rounding rule; clamp to valid range; then deduplicate while preserving order).\n- 3) Generate the sampling mapping (mandatory when required_fps is given):\n- If required_fps is given:\n- Compute sample times across the full duration using that rate.\n- Convert each sample time to a src_frame using your chosen rounding rule and clamp to [0, N-1] when N is known.\n- If required_fps is not given:\n- Choose a strategy based on discovered src_fps and task goals; record the chosen policy explicitly.\n- Create an ordered mapping array\u002Fmap: map_sample_to_src where len(map_sample_to_src) = S and each entry is a src_frame (or equivalent source locator).\n- Checkpoint: assert mapping is strictly increasing (or non-decreasing only if you explicitly allow and then remove duplicates), and all mapped src_frame values are within bounds when N is known.\n- 4) Produce downstream artifacts strictly in sample_i space:\n- All interval keys in JSON must use sample_i endpoints only, not src_frame.\n- Key format must be exactly \"start->end\" where start and end are base-10 integers.\n- Use a single, consistent interval convention: end is exclusive (recommended) so each interval covers sample_i in [start, end).\n- Any per-frame artifact store (NPZ\u002Farrays\u002Fimages) must contain exactly S frames in sample_i order (frame 0 corresponds to sample_i=0, etc.).\n- If any consumer needs src_frame, include it as separate data (for example, a sidecar mapping JSON) rather than overloading interval keys.\n- 5) Post-write contract validation (before claiming completion):\n- Reload written artifacts from disk.\n- Infer S from the per-frame artifact store length (or from mapping length), and validate:\n- Interval key schema: every key matches \"digits->digits\"; parsed start\u002Fend are integers.\n- Domain: for all intervals, 0 \u003C= start \u003C end \u003C= S.\n- Coverage: max(end) equals S (when full coverage is required) and there are no references to indices >= S.\n- Per-frame store length equals S exactly.\n- Mapping validity: map_sample_to_src length equals S; values monotone; values within [0, N-1] when N known.\n- If any check fails: stop, identify whether the error is (a) wrong index domain, (b) wrong S, (c) wrong sampling cadence, or (d) tool\u002Fmetadata issue; then regenerate mapping and downstream artifacts accordingly.\n\n## Constraints \u002F Pitfalls\n- Never mix index domains: JSON interval endpoints must be sample_i unless the task explicitly says otherwise; do not use src_frame numbers as interval keys.\n- If required_fps (or stride) is specified by the task, sampling is not a free choice. Enforce it and validate cadence via the mapping; do not silently substitute a \"reasonable\" fps\u002Fstep.\n- Do not take irreversible actions (overwriting outputs) until discovery is complete and you have a validated mapping; always run the post-write reload-and-assert checks.\n- If the preferred metadata tool is missing or returns unknown values, use a fallback tool and, if duration\u002FN cannot be reliably determined, require clarification or constrain behavior (for example, sample based on decoded frames and stop at end-of-stream) and document that choice.",{},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fdynamic-object-aware-egomotion\u002Frepaired_skill\u002Fsampling-and-indexing",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill sampling-and-indexing",{"tool":35,"command":36},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill sampling-and-indexing",{"tool":38,"command":39},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill sampling-and-indexing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fdynamic-object-aware-egomotion\u002Frepaired_skill\u002Fsampling-and-indexing\u002FSKILL.md",true,[],[44,51,58,65,70,75],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":66,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":71,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":76,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]