[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C24NQBA6Y2FE8Z3EMK9VFG":3,"skill-same:01M7C24NQBA6Y2FE8Z3EMK9VFG":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},"01M7C24NQBA6Y2FE8Z3EMK9VFG","obspy-data-api",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\u002Fseismic-phase-picking\u002Frepaired_skill\u002Fobspy-data-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# NPZ Waveform Phase Picking to Verifier-Aligned CSV\n\n## Purpose\nProvide a reusable, discovery-first workflow to generate seismic phase picks (for example P and S) from NPZ waveform inputs using an available picker (prefer SeisBench when installed), convert picks to sample indices aligned to the original waveform, and write a verifier-ready CSV with post-write schema checks.\n\n## When to Use\nUse when a task provides waveform data in NPZ (or similarly structured arrays) and requires producing a CSV of phase picks (often as sample indices, optionally with times and scores). Do not use for ObsPy file-format tutorials, event catalogs, or station metadata handling unless the task explicitly requires those.\n\n## Procedure\n- Step 1: Discover requirements and environment before any heavy compute or writes.\n- Identify the required output path from the task instructions. If not explicitly given, stop and request\u002Flocate it (for example, search the working directory for a required filename pattern); do not silently choose a new path.\n- Check tool availability: in Python, attempt imports in this order and record which path is usable:\n- `seisbench` (preferred for pretrained pickers)\n- `obspy` (only for wrapping arrays into Trace\u002FStream if needed)\n- pure NumPy\u002FSciPy fallback (peak-picking on provided probabilities, if any)\n- Execution anchor (evidence): print versions for imported libs and the resolved output path.\n- Step 2: Load NPZ and validate input schema (discovery-first).\n- Load with `numpy.load(..., allow_pickle=True)` and list keys.\n- Determine the waveform array key by inspection (common candidates: `data`, `X`, `waveform`, `waveforms`). Do not assume a fixed key until verified.\n- Determine sampling metadata:\n- Prefer `dt` if present; else `sampling_rate`\u002F`fs`; else infer from a time vector if present; else fail with a clear request.\n- Validate invariants needed for picking:\n- Waveform must be numeric, finite (no all-NaN), and have a clear time axis.\n- Determine shape convention by inspection: (n_samples, n_channels) vs (n_channels, n_samples) vs batched. Normalize to a single 2D array (n_channels, n_samples) for downstream processing.\n- Determine channel names if present (common keys: `channels`, `channel_names`). If missing, create placeholders but mark that channel semantics are unknown.\n- Checkpoint: print a concise input report: keys, normalized shape, n_samples, n_channels, dt, derived sampling_rate, and channel labels.\n- Step 3: Preprocess conservatively and run picker using the best available method.\n- Preprocessing (only if needed for the chosen model):\n- Detrend \u002F demean per channel.\n- Optional normalization to unit variance per channel, but do not clip or resample unless the model requires it and you have verified the model expectation.\n- Picker decision:\n- If SeisBench is available: select an appropriate pretrained picker model available in the environment (discover by listing model registry \u002F attempting common pickers). Do not hard-code a single model name without checking availability.\n- If a model requires a specific sampling rate, prefer resampling only after validating the target rate and recording the mapping back to original indices.\n- If SeisBench is not available: if probability traces are already provided in the NPZ, peak-pick those; otherwise fail with a clear message that a picker\u002Fmodel is missing.\n- Run inference to obtain pick times or per-sample probabilities for phases.\n- Checkpoint: store raw outputs (times\u002Fprobabilities and any metadata such as starttime\u002Fblinding).\n- Step 4: Align model outputs to the original waveform index space (no silent offsets).\n- Compute alignment facts:\n- `npts_in = n_samples_original`.\n- Determine `npts_out` for each output series (probabilities\u002Fannotations).\n- If `npts_out != npts_in`, infer whether this is due to model blinding\u002Fcropping\u002Fpadding:\n- Look for explicit metadata (for example, starttime offset, valid window start\u002Fend, or known model \"blind\" seconds) exposed by the library.\n- If metadata is missing, do not guess a constant. Instead, compute candidate offsets by comparing known features (for example, cross-correlate an energy envelope with output peaks) only if justified; otherwise stop and surface ambiguity.\n- Convert to indices:\n- If you have pick times: `idx = round((t_pick - t0_original) * sampling_rate)` with any validated offset applied.\n- If you have probabilities: choose peaks per phase with a configurable threshold and minimum separation; convert peak sample positions to original indices using the validated mapping.\n- Execution anchor (evidence): print an alignment report and assert bounds:\n- Report `npts_in`, `npts_out`, inferred offset in seconds and samples (or \"none\"), and min\u002Fmax pick index per phase.\n- Assert every emitted pick index is an integer and in `[0, npts_in - 1]`. If the assertion fails, do not write the final CSV; instead, revisit alignment or lower-level outputs.\n- Step 5: Build the results table and write CSV to the required path, then reload and validate.\n- Determine the required CSV schema from the task. If not explicitly specified, derive a minimal schema that is consistent and self-describing, and clearly document it in logs; however, prefer the task-declared schema whenever available.\n- Populate rows with at least:\n- a stable record identifier (for example, file id or trace id) if the task indicates multiple records\n- phase label (for example, \"P\", \"S\")\n- pick index (integer sample index in the original waveform)\n- optional: pick time (seconds) and score\u002Fprobability\n- Write CSV with a standard dialect (comma-separated, header row, UTF-8 is fine but content must be printable ASCII where possible).\n- Execution anchor (evidence): reload and validate the written CSV:\n- Confirm the file exists and is readable at the exact required path.\n- Reload with `csv`\u002F`pandas` and assert: required columns exist, pick index column parses to integers, and all indices are within bounds.\n- Print a final summary: path, row count, column names.\n\n## Constraints \u002F Pitfalls\n- Do not assume NPZ keys, waveform axis order, channel naming, model name, sampling rate, or a fixed offset\u002Fblinding constant. Always discover and validate; if alignment cannot be proven, stop rather than emitting likely-wrong indices.\n- Do not write outputs to an arbitrary path. Use only the task-specified output path; if it is missing or unwritable, diagnose permissions\u002Fmounts and fail clearly instead of silently redirecting.",{},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_skill\u002Fobspy-data-api",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 obspy-data-api",{"tool":35,"command":36},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill obspy-data-api",{"tool":38,"command":39},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill obspy-data-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_skill\u002Fobspy-data-api\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",[],[]]