[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C24EXP8XWTXYJW0KQ8VTHB":3,"skill-same:01M7C24EXP8XWTXYJW0KQ8VTHB":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},"01M7C24EXP8XWTXYJW0KQ8VTHB","seisbench-model-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_run\u002Finputs\u002Fskills\u002Fseisbench-model-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# SeisBench NPZ-to-Picks Pipeline (Annotate to Discrete P\u002FS Indices)\n\n## Purpose\nProvide a reusable, verifier-oriented workflow to load waveform data from NPZ-like arrays, run a SeisBench pretrained picking model, extract discrete P and S picks using explicit peak\u002Fthreshold rules, and write a validated prediction table (typically CSV) with pick indices (or times if required).\n\n## When to Use\nUse this skill when the task requires converting waveform arrays (commonly NPZ\u002FNumPy) into discrete seismic phase picks (P and\u002For S) using SeisBench pretrained models, and the deliverable is a machine-readable table of picks per record. Do not use if the task is about training models, non-picking tasks (magnitude, localization), or if the task specifies a different framework\u002Foutput format that cannot be produced by a simple pick-index table.\n\n## Procedure\n- Step 0: Confirm the observable contract (before coding)\n- Read the task prompt for: required output file path\u002Fname, required columns, whether picks are sample indices vs seconds, whether multiple picks per trace are allowed, and how missing picks must be encoded.\n- If a sample submission or evaluation script is present, inspect it to extract exact schema and units. If not present, treat schema as ambiguous and keep output flexible but validated.\n- Step 1: Discover the input layout (execution anchor)\n- List available input files and choose one representative NPZ to inspect.\n- Load it and enumerate keys, shapes, and dtypes. Identify:\n- The waveform array key(s) and expected shape convention (for example: [n_samples], [n_channels, n_samples], [n_traces, n_samples], etc.).\n- Any metadata fields (sampling rate, start time, station\u002Fchannel ids, record ids).\n- Decision point:\n- If sampling rate is not present in data\u002Fmetadata, stop and search for it in accompanying docs\u002Fconfig; do not assume a fixed rate.\n- Step 2: Validate and normalize waveforms (no irreversible actions)\n- For each record\u002Ftrace to be picked:\n- Assert finite values (no NaN\u002FInf). If present, replace with zeros or interpolate only if the task allows; otherwise drop the record and log.\n- Detrend\u002Fdemean each trace (at minimum remove mean).\n- Detect extreme scaling issues: if max(abs(x)) is extremely small relative to float precision, scale by a constant factor only after confirming it improves numerical stability (keep the factor recorded for debugging).\n- Checkpoint evidence:\n- Log per-record n_samples, sampling_rate, and amplitude summary (min\u002Fmax\u002Fstd) after preprocessing.\n- Step 3: Build an ObsPy Stream with correct stats (grounded in discovery)\n- Convert each waveform to one or more ObsPy Trace objects with:\n- stats.sampling_rate from discovered metadata,\n- stats.starttime if available (otherwise a consistent placeholder is acceptable only if outputs are indices, not absolute times),\n- stats.network\u002Fstation\u002Flocation\u002Fchannel when present (or stable placeholders if grouping is not required).\n- Decision point:\n- If the model expects a specific sampling rate, either resample explicitly (and log method) or reject the record; do not silently rely on implicit resampling unless verified in this environment.\n- Step 4: Load and run a pretrained SeisBench picking model (discover, then act)\n- Import seisbench.models and list available pretrained variants for the intended model class (for example PhaseNet or EQTransformer).\n- Load a pretrained weights set only after confirming it is available; if download fails (offline\u002Fno cache), fall back to:\n- another available pretrained variant, or\n- a local cached model path if the environment provides one,\n- otherwise fail fast with a clear error.\n- Run model.annotate(stream) to get continuous probability traces (preferred for explicit peak finding).\n- Checkpoint evidence:\n- Confirm annotation stream exists and has expected components (P and S probability traces or model-specific labels).\n- Confirm annotation trace lengths align with the input time base (or record any fixed offset\u002Fstride if present).\n- Step 5: Convert probabilities to discrete picks (explicit decision rules)\n- For each phase probability series (P and S):\n- Smooth lightly only if needed (and deterministic), then find candidate peaks using:\n- a threshold (relative, such as a fraction of that trace max, and\u002For absolute, if supported by task calibration),\n- a minimum peak distance in samples derived from sampling_rate and a minimum separation in seconds.\n- Select picks using a rule that matches the task requirement:\n- If exactly one pick per phase is required: choose the highest peak above threshold.\n- If multiple picks allowed: output all peaks above threshold with ordering by time.\n- Enforce phase ordering only as a soft constraint:\n- If both P and S exist and S must be after P, filter S candidates to those after the chosen P; if none remain, either mark S missing or keep best S depending on task instructions.\n- Always output pick locations in the required unit:\n- If sample indices: convert from time to integer sample index via round((t - t0) * sampling_rate) using the same t0 used for stream construction.\n- If seconds: output relative seconds from record start unless absolute time is explicitly required.\n- Hard bounds check:\n- Clamp is not allowed; instead, treat out-of-range picks as invalid and set them to missing, and log the count.\n- Step 6: Write outputs and validate schema (execution anchor)\n- Write the table to the required path\u002Ffilename.\n- Immediately reload the written file and assert:\n- Row count matches number of input records required by the prompt.\n- Required columns exist and types are parseable.\n- For each record, any non-missing pick index is an integer and satisfies 0 \u003C= idx \u003C n_samples for that record.\n- If any assertion fails, do not submit; instead, fix the upstream mapping (units, indexing, row ordering, missing encoding) and re-run.\n\n## Constraints \u002F Pitfalls\n- Do not hard-code sampling rate, NPZ keys, waveform shape conventions, output column names, or output file paths unless they are explicitly verified from the task prompt or discovered artifacts (for example sample submission). Always discover first.\n- Avoid brittle pick heuristics like global argmax without thresholds\u002Fpeak separation and without validating alignment\u002Funits; such heuristics often produce plausible-looking outputs that fail the verifier.",{},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_run\u002Finputs\u002Fskills\u002Fseisbench-model-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 seisbench-model-api",{"tool":35,"command":36},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill seisbench-model-api",{"tool":38,"command":39},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill seisbench-model-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillrevise\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_run\u002Finputs\u002Fskills\u002Fseisbench-model-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",[],[]]