[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C3SX8BA2726SJEH7SC9TJQ":3,"skill-same:01M7C3SX8BA2726SJEH7SC9TJQ":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7C3SX8BA2726SJEH7SC9TJQ","skilltta-task-guidance",null,"Task-specific operational guidance synthesized at test time from retrieved training examples.","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\u002Fskilltta-synthesis-opus47-tatumass-failed15-20260923\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_run\u002Finputs\u002Fskills\u002Fskilltta-task-guidance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: skilltta-task-guidance\ndescription: Task-specific operational guidance synthesized at test time from retrieved training examples.\n---\n\n# SKILL.md\n\n## When to use\nUse this skill when the target task requires **seismic phase picking** — identifying P-wave and S-wave arrival sample indices in multi-channel waveform traces stored as `.npz` files — and writing per-pick rows to a CSV. The binding contract requires:\n- Reading every trace file in the provided input directory.\n- Producing a CSV with exactly the columns `file_name`, `phase` (\"P\" or \"S\"), and `pick_idx` (integer sample index).\n- Allowing zero, one, or multiple picks of each phase per file.\n- Being graded by F1 with a tolerance defined in seconds (convert to samples using each file's `dt`).\n- Meeting minimum F1 thresholds for P and S separately.\n\nBefore acting, gather:\n- One sample file's keys, `data.shape`, `channels` order, `dt`, and dtype.\n- The sampling rate (`1\u002Fdt`) and derived tolerance in samples (`round(tolerance_seconds \u002F dt)`).\n- Whether channel order is consistent (commonly E, N, Z with Z being vertical, best for P).\n- Presence of GPU \u002F installed packages (`seisbench`, `torch`, `obspy`, `scipy`).\n\n## Possible Failure Modes\n- **Rolling your own STA\u002FLTA picker**: classical detectors typically miss the F1 thresholds needed here. Prefer a pretrained deep learning picker (e.g., SeisBench models like PhaseNet, EQTransformer) if available.\n- **Wrong channel order \u002F orientation**: passing channels in the wrong order to a model expecting ZNE vs ENZ severely degrades picks. Always reorder using the file's `channels` field to match the model's expected component order.\n- **Ignoring per-file `dt`**: assuming a fixed sampling rate (e.g., 100 Hz) when files vary breaks the tolerance conversion and any model resampling requirement. Resample to the model's native rate (often 100 Hz) if needed, then map picks back to original indices.\n- **Not preprocessing**: forgetting to detrend, demean, or bandpass filter (typically ~1–45 Hz) hurts SNR and picking quality.\n- **Outputting probabilities instead of discrete picks**: the CSV needs integer sample indices from peak detection on the model's P\u002FS probability curves, with a sensible threshold (e.g., 0.3 for P, 0.3 for S) and minimum inter-peak distance.\n- **Emitting one row per file with both P and S columns**: the schema is one row per pick; a file with 1 P and 2 S picks yields 3 rows. Files with no picks contribute zero rows (this is allowed).\n- **Index off-by-one after resampling**: when the model runs at a different sample rate, scale peak indices back: `orig_idx = round(peak_idx * dt_model \u002F dt_file)`.\n- **Missing files or crashes on one bad trace** aborting the whole run: wrap per-file processing in try\u002Fexcept and continue.\n- **Writing floats or numpy types** to `pick_idx`: cast to plain Python `int`.\n- **Copying constants from unrelated retrieved examples** (FFT, z-score, employee CSV code): these are unrelated tasks; do not treat their code as template.\n\n## Possible procedures\n1. **Inspect data**: load one `.npz`, print keys, `data.shape` (expect `(12000, 3)` or transpose), `channels`, `dt`. Decide whether to transpose to `(3, N)` since most models want channels-first.\n2. **Choose a picker**:\n   - Preferred: `seisbench.models.PhaseNet.from_pretrained(\"stead\"|\"instance\"|\"original\")` or `EQTransformer`. These are trained specifically for P\u002FS picking and easily clear the required F1.\n   - Fallback: build an ObsPy `Stream` with proper `stats` (sampling_rate, channel codes) and call `model.classify(stream)` or `model.annotate(stream)`.\n3. **Preprocess**:\n   - Detrend, demean each channel.\n   - Bandpass filter roughly 1–45 Hz (respect Nyquist).\n   - Normalize per-trace (mean 0, std 1 or max-abs).\n   - Resample to the model's expected rate if different from `1\u002Fdt`.\n4. **Run inference** to get per-sample P and S probability curves aligned to the input length.\n5. **Peak-pick** with `scipy.signal.find_peaks` using a probability threshold (start ~0.3) and `distance` corresponding to a physically reasonable refractory period (e.g., 1 s). Consider separate thresholds per phase; tune to trade precision vs recall for F1.\n6. **Map indices back** to the original file's sample grid if resampling was used.\n7. **Emit rows** `(file_name, phase, int(pick_idx))` and write CSV with a header. Sort or leave as-is — order is not evaluated, only rows.\n8. **Recovery**: if a model isn't installed, `pip install seisbench` (which pulls torch\u002Fobspy). If offline, fall back to a tuned characteristic-function picker (kurtosis, AIC, or STA\u002FLTA on Z for P and horizontals for S), but expect lower F1 — tune thresholds on a few files where you can sanity-check picks visually.\n\n## Verification Checklist\n- [ ] Confirmed `data.shape`, `channels` ordering, and `dt` on at least one file; reordered channels to match the model's expected components.\n- [ ] Tolerance in samples computed per-file from `dt` (`round(0.1 \u002F dt)`), not hardcoded.\n- [ ] Preprocessing (detrend, filter, normalize, optional resample) applied consistently.\n- [ ] Picker outputs discrete integer indices; probability threshold and minimum peak distance chosen to balance precision\u002Frecall for F1.\n- [ ] CSV at the required output path has exactly the columns `file_name`, `phase`, `pick_idx` with header; `phase` values are only `\"P\"` or `\"S\"`; `pick_idx` is a Python `int` within `[0, n_samples-1]`.\n- [ ] Files with zero picks contribute zero rows; files with multiple picks contribute multiple rows (schema allows this).\n- [ ] All input files iterated; per-file exceptions caught so one failure doesn't drop the rest.\n- [ ] Spot-checked a few picks: P pick precedes S pick, both within the trace length, and roughly aligned with an amplitude\u002Fenergy rise on the appropriate components (Z for P, horizontals for S).\n- [ ] Did not copy code or constants from unrelated retrieved examples (FFT, z-score, employee CSV).\n- [ ] Did not overwrite or delete unrelated files under `\u002Froot\u002F`.\n","# SKILL.md\n\n## When to use\nUse this skill when the target task requires **seismic phase picking** — identifying P-wave and S-wave arrival sample indices in multi-channel waveform traces stored as `.npz` files — and writing per-pick rows to a CSV. The binding contract requires:\n- Reading every trace file in the provided input directory.\n- Producing a CSV with exactly the columns `file_name`, `phase` (\"P\" or \"S\"), and `pick_idx` (integer sample index).\n- Allowing zero, one, or multiple picks of each phase per file.\n- Being graded by F1 with a tolerance defined in seconds (convert to samples using each file's `dt`).\n- Meeting minimum F1 thresholds for P and S separately.\n\nBefore acting, gather:\n- One sample file's keys, `data.shape`, `channels` order, `dt`, and dtype.\n- The sampling rate (`1\u002Fdt`) and derived tolerance in samples (`round(tolerance_seconds \u002F dt)`).\n- Whether channel order is consistent (commonly E, N, Z with Z being vertical, best for P).\n- Presence of GPU \u002F installed packages (`seisbench`, `torch`, `obspy`, `scipy`).\n\n## Possible Failure Modes\n- **Rolling your own STA\u002FLTA picker**: classical detectors typically miss the F1 thresholds needed here. Prefer a pretrained deep learning picker (e.g., SeisBench models like PhaseNet, EQTransformer) if available.\n- **Wrong channel order \u002F orientation**: passing channels in the wrong order to a model expecting ZNE vs ENZ severely degrades picks. Always reorder using the file's `channels` field to match the model's expected component order.\n- **Ignoring per-file `dt`**: assuming a fixed sampling rate (e.g., 100 Hz) when files vary breaks the tolerance conversion and any model resampling requirement. Resample to the model's native rate (often 100 Hz) if needed, then map picks back to original indices.\n- **Not preprocessing**: forgetting to detrend, demean, or bandpass filter (typically ~1–45 Hz) hurts SNR and picking quality.\n- **Outputting probabilities instead of discrete picks**: the CSV needs integer sample indices from peak detection on the model's P\u002FS probability curves, with a sensible threshold (e.g., 0.3 for P, 0.3 for S) and minimum inter-peak distance.\n- **Emitting one row per file with both P and S columns**: the schema is one row per pick; a file with 1 P and 2 S picks yields 3 rows. Files with no picks contribute zero rows (this is allowed).\n- **Index off-by-one after resampling**: when the model runs at a different sample rate, scale peak indices back: `orig_idx = round(peak_idx * dt_model \u002F dt_file)`.\n- **Missing files or crashes on one bad trace** aborting the whole run: wrap per-file processing in try\u002Fexcept and continue.\n- **Writing floats or numpy types** to `pick_idx`: cast to plain Python `int`.\n- **Copying constants from unrelated retrieved examples** (FFT, z-score, employee CSV code): these are unrelated tasks; do not treat their code as template.\n\n## Possible procedures\n1. **Inspect data**: load one `.npz`, print keys, `data.shape` (expect `(12000, 3)` or transpose), `channels`, `dt`. Decide whether to transpose to `(3, N)` since most models want channels-first.\n2. **Choose a picker**:\n   - Preferred: `seisbench.models.PhaseNet.from_pretrained(\"stead\"|\"instance\"|\"original\")` or `EQTransformer`. These are trained specifically for P\u002FS picking and easily clear the required F1.\n   - Fallback: build an ObsPy `Stream` with proper `stats` (sampling_rate, channel codes) and call `model.classify(stream)` or `model.annotate(stream)`.\n3. **Preprocess**:\n   - Detrend, demean each channel.\n   - Bandpass filter roughly 1–45 Hz (respect Nyquist).\n   - Normalize per-trace (mean 0, std 1 or max-abs).\n   - Resample to the model's expected rate if different from `1\u002Fdt`.\n4. **Run inference** to get per-sample P and S probability curves aligned to the input length.\n5. **Peak-pick** with `scipy.signal.find_peaks` using a probability threshold (start ~0.3) and `distance` corresponding to a physically reasonable refractory period (e.g., 1 s). Consider separate thresholds per phase; tune to trade precision vs recall for F1.\n6. **Map indices back** to the original file's sample grid if resampling was used.\n7. **Emit rows** `(file_name, phase, int(pick_idx))` and write CSV with a header. Sort or leave as-is — order is not evaluated, only rows.\n8. **Recovery**: if a model isn't installed, `pip install seisbench` (which pulls torch\u002Fobspy). If offline, fall back to a tuned characteristic-function picker (kurtosis, AIC, or STA\u002FLTA on Z for P and horizontals for S), but expect lower F1 — tune thresholds on a few files where you can sanity-check picks visually.\n\n## Verification Checklist\n- [ ] Confirmed `data.shape`, `channels` ordering, and `dt` on at least one file; reordered channels to match the model's expected components.\n- [ ] Tolerance in samples computed per-file from `dt` (`round(0.1 \u002F dt)`), not hardcoded.\n- [ ] Preprocessing (detrend, filter, normalize, optional resample) applied consistently.\n- [ ] Picker outputs discrete integer indices; probability threshold and minimum peak distance chosen to balance precision\u002Frecall for F1.\n- [ ] CSV at the required output path has exactly the columns `file_name`, `phase`, `pick_idx` with header; `phase` values are only `\"P\"` or `\"S\"`; `pick_idx` is a Python `int` within `[0, n_samples-1]`.\n- [ ] Files with zero picks contribute zero rows; files with multiple picks contribute multiple rows (schema allows this).\n- [ ] All input files iterated; per-file exceptions caught so one failure doesn't drop the rest.\n- [ ] Spot-checked a few picks: P pick precedes S pick, both within the trace length, and roughly aligned with an amplitude\u002Fenergy rise on the appropriate components (Z for P, horizontals for S).\n- [ ] Did not copy code or constants from unrelated retrieved examples (FFT, z-score, employee CSV).\n- [ ] Did not overwrite or delete unrelated files under `\u002Froot\u002F`.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002Fskilltta-synthesis-opus47-tatumass-failed15-20260923\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_run\u002Finputs\u002Fskills\u002Fskilltta-task-guidance",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill skilltta-task-guidance",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill skilltta-task-guidance",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill skilltta-task-guidance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002Fskilltta-synthesis-opus47-tatumass-failed15-20260923\u002Ftasks\u002Fseismic-phase-picking\u002Frepaired_run\u002Finputs\u002Fskills\u002Fskilltta-task-guidance\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"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":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"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":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"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":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"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":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"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":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"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",[],[]]