[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EN1VVJN70XG1WM2M8534CW":3,"skill-same:01M7EN1VVJN70XG1WM2M8534CW":47},{"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":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EN1VVJN70XG1WM2M8534CW","fmri-analysis",null,"fMRI data analysis — preprocessing, GLM modeling, and group-level inference for task and resting-state studies.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-fmri-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: fmri-analysis\ndescription: fMRI data analysis — preprocessing, GLM modeling, and group-level inference for task and resting-state studies.\ncategory: scientific\n---\n\n## Overview\n\nfmri-analysis covers the standard fMRI pipeline: preprocessing (motion correction, distortion\ncorrection, normalization, smoothing), first-level modeling with the general linear model (GLM),\nand group-level inference. It also covers the quality-control culture that fMRI requires — head\nmotion alone can manufacture \"activations,\" and the field's replication history demands conservative\nstatistics.\n\nThe focus is task fMRI with the GLM; resting-state connectivity gets its own coverage in\nresting-state-fmri, and preprocessing details live in mri-preprocessing.\n\n## When to use\n\n- Designing a task fMRI experiment: block vs event-related designs, jittering, trial timing,\n  run length.\n- First-level GLM: building design matrices, HRF convolution, contrasts.\n- Group analysis: one-sample\u002Ftwo-sample t-tests, mixed-effects (FLAME), covariates.\n- Multiple-comparisons correction: cluster correction, FWE, FDR, TFCE, permutation (randomise).\n- ROI analysis: anatomical vs functional ROIs, percent signal change extraction.\n- MVPA\u002Fdecoding: searchlight and ROI-based multivariate pattern analysis.\n- Reporting: what parameters, thresholds, and QC metrics a methods section needs.\n\n## Core concepts\n\n- **BOLD is indirect.** The signal reflects blood oxygenation, not spikes — delayed ~4-6 s,\n  sluggish, and confounded by vasculature, motion, and physiology. Effect sizes are small (often\n  \u003C1% signal change); design accordingly.\n- **The hemodynamic response function.** Model neural events convolved with a canonical HRF\n  (double-gamma). Add temporal\u002Fdispersion derivatives to absorb HRF variability. Misspecified\n  timing (wrong onsets, unmodeled durations) is the commonest GLM error.\n- **Design efficiency.** Block designs maximize detection power; event-related designs (with\n  jittered ISIs) allow estimating the HRF shape and separating close events. Efficiency depends on\n  the contrast — optimize the design for the contrast you care about.\n- **Nuisance regressors.** Six motion parameters plus derivatives, CSF\u002Fwhite-matter signals\n  (CompCor), physiological regressors (RETROICOR) when available, and spike regressors for\n  high-motion volumes. Motion correlates with task in many paradigms — unmodeled, it becomes\n  \"activation.\"\n- **Preprocessing order matters.** Slice-timing → motion correction → distortion correction\n  (fieldmaps\u002FTOPUP) → coregistration → normalization → smoothing. Each step's errors propagate;\n  check registrations visually for every subject.\n- **Smoothing trade-off.** 6-8 mm FWHM boosts SNR for univariate GLM but blurs fine patterns —\n  skip or minimize smoothing for MVPA. Match smoothing to the analysis, not to habit.\n- **Multiple comparisons.** ~100k+ voxels tested. Valid options: voxel-wise FWE, cluster-level\n  correction with proper cluster-forming thresholds (p\u003C0.001, not p\u003C0.01 — see Eklund et al.),\n  TFCE, or permutation testing. Uncorrected p\u003C0.001 with k>10 is not a correction.\n- **Circular analysis.** Defining ROIs from the same contrast you then test inflates everything.\n  Use independent localizers, anatomical atlases, or split-half data.\n\n## Practical workflow\n\n1. **Design.** Choose block vs event-related for the question; jitter ISIs; keep runs \u003C10 min to\n   limit motion; pilot the timing outside the scanner.\n2. **QC raw data.** Check motion (framewise displacement; flag runs with mean FD >0.5 mm or many\n   spikes), coverage, ghosting, and signal dropout (orbitofrontal\u002Ftemporal regions).\n3. **Preprocess.** fMRIPrep is the recommended default — it handles the boilerplate reproducibly.\n   Visually verify coregistration and normalization for every subject.\n4. **First-level GLM.** Build the design matrix with correct onsets\u002Fdurations, HRF convolution,\n   nuisance regressors, and high-pass filtering (cutoff ~1\u002F128 Hz or matched to design). Check\n   design orthogonality and efficiency; inspect residual maps.\n5. **Contrasts.** Task > baseline, condition A > B, parametric modulators. Keep contrasts few and\n   preregistered; exploratory whole-brain contrasts get full correction.\n6. **Group analysis.** Mixed-effects model (subjects as random effects), covariates for age\u002Fsex\u002F\n   motion, proper multiple-comparisons correction. Report peak coordinates, cluster sizes, and\n   effect sizes — not just \"significant blobs.\"\n7. **Report.** Preprocessing pipeline + versions, motion exclusion criteria, first-level model\n   details, group model, correction method with thresholds, and unthresholded maps (NeuroVault).\n\nExample (nilearn sketch):\n```python\nfrom nilearn.glm.first_level import FirstLevelModel\nfm = FirstLevelModel(t_r=2.0, hrf_model=\"spm\", drift_model=\"cosine\",\n                     smoothing_fwhm=6, mask_img=mask)\nfm.fit(run_imgs, events=events_df, confounds=confounds_df)\nz_map = fm.compute_contrast(\"task-baseline\", output_type=\"z_score\")\n```\n\n## Common pitfalls\n\n- Cluster correction with lenient cluster-forming thresholds (the Eklund problem).\n- Motion-task correlation passed off as activation (check motion regressors' correlation with design).\n- Double-dipping ROIs: selecting voxels by the effect you then quantify.\n- Interpreting BOLD as direct neural activity or as \"the brain lighting up.\"\n- Reverse inference: \"amygdala active, therefore fear\" — regions do many things.\n- Smoothing before MVPA, destroying the patterns you want to decode.\n- Small samples (n\u003C20) with flexible analyses — the replication-crisis recipe.\n","## Overview\n\nfmri-analysis covers the standard fMRI pipeline: preprocessing (motion correction, distortion\ncorrection, normalization, smoothing), first-level modeling with the general linear model (GLM),\nand group-level inference. It also covers the quality-control culture that fMRI requires — head\nmotion alone can manufacture \"activations,\" and the field's replication history demands conservative\nstatistics.\n\nThe focus is task fMRI with the GLM; resting-state connectivity gets its own coverage in\nresting-state-fmri, and preprocessing details live in mri-preprocessing.\n\n## When to use\n\n- Designing a task fMRI experiment: block vs event-related designs, jittering, trial timing,\n  run length.\n- First-level GLM: building design matrices, HRF convolution, contrasts.\n- Group analysis: one-sample\u002Ftwo-sample t-tests, mixed-effects (FLAME), covariates.\n- Multiple-comparisons correction: cluster correction, FWE, FDR, TFCE, permutation (randomise).\n- ROI analysis: anatomical vs functional ROIs, percent signal change extraction.\n- MVPA\u002Fdecoding: searchlight and ROI-based multivariate pattern analysis.\n- Reporting: what parameters, thresholds, and QC metrics a methods section needs.\n\n## Core concepts\n\n- **BOLD is indirect.** The signal reflects blood oxygenation, not spikes — delayed ~4-6 s,\n  sluggish, and confounded by vasculature, motion, and physiology. Effect sizes are small (often\n  \u003C1% signal change); design accordingly.\n- **The hemodynamic response function.** Model neural events convolved with a canonical HRF\n  (double-gamma). Add temporal\u002Fdispersion derivatives to absorb HRF variability. Misspecified\n  timing (wrong onsets, unmodeled durations) is the commonest GLM error.\n- **Design efficiency.** Block designs maximize detection power; event-related designs (with\n  jittered ISIs) allow estimating the HRF shape and separating close events. Efficiency depends on\n  the contrast — optimize the design for the contrast you care about.\n- **Nuisance regressors.** Six motion parameters plus derivatives, CSF\u002Fwhite-matter signals\n  (CompCor), physiological regressors (RETROICOR) when available, and spike regressors for\n  high-motion volumes. Motion correlates with task in many paradigms — unmodeled, it becomes\n  \"activation.\"\n- **Preprocessing order matters.** Slice-timing → motion correction → distortion correction\n  (fieldmaps\u002FTOPUP) → coregistration → normalization → smoothing. Each step's errors propagate;\n  check registrations visually for every subject.\n- **Smoothing trade-off.** 6-8 mm FWHM boosts SNR for univariate GLM but blurs fine patterns —\n  skip or minimize smoothing for MVPA. Match smoothing to the analysis, not to habit.\n- **Multiple comparisons.** ~100k+ voxels tested. Valid options: voxel-wise FWE, cluster-level\n  correction with proper cluster-forming thresholds (p\u003C0.001, not p\u003C0.01 — see Eklund et al.),\n  TFCE, or permutation testing. Uncorrected p\u003C0.001 with k>10 is not a correction.\n- **Circular analysis.** Defining ROIs from the same contrast you then test inflates everything.\n  Use independent localizers, anatomical atlases, or split-half data.\n\n## Practical workflow\n\n1. **Design.** Choose block vs event-related for the question; jitter ISIs; keep runs \u003C10 min to\n   limit motion; pilot the timing outside the scanner.\n2. **QC raw data.** Check motion (framewise displacement; flag runs with mean FD >0.5 mm or many\n   spikes), coverage, ghosting, and signal dropout (orbitofrontal\u002Ftemporal regions).\n3. **Preprocess.** fMRIPrep is the recommended default — it handles the boilerplate reproducibly.\n   Visually verify coregistration and normalization for every subject.\n4. **First-level GLM.** Build the design matrix with correct onsets\u002Fdurations, HRF convolution,\n   nuisance regressors, and high-pass filtering (cutoff ~1\u002F128 Hz or matched to design). Check\n   design orthogonality and efficiency; inspect residual maps.\n5. **Contrasts.** Task > baseline, condition A > B, parametric modulators. Keep contrasts few and\n   preregistered; exploratory whole-brain contrasts get full correction.\n6. **Group analysis.** Mixed-effects model (subjects as random effects), covariates for age\u002Fsex\u002F\n   motion, proper multiple-comparisons correction. Report peak coordinates, cluster sizes, and\n   effect sizes — not just \"significant blobs.\"\n7. **Report.** Preprocessing pipeline + versions, motion exclusion criteria, first-level model\n   details, group model, correction method with thresholds, and unthresholded maps (NeuroVault).\n\nExample (nilearn sketch):\n```python\nfrom nilearn.glm.first_level import FirstLevelModel\nfm = FirstLevelModel(t_r=2.0, hrf_model=\"spm\", drift_model=\"cosine\",\n                     smoothing_fwhm=6, mask_img=mask)\nfm.fit(run_imgs, events=events_df, confounds=confounds_df)\nz_map = fm.compute_contrast(\"task-baseline\", output_type=\"z_score\")\n```\n\n## Common pitfalls\n\n- Cluster correction with lenient cluster-forming thresholds (the Eklund problem).\n- Motion-task correlation passed off as activation (check motion regressors' correlation with design).\n- Double-dipping ROIs: selecting voxels by the effect you then quantify.\n- Interpreting BOLD as direct neural activity or as \"the brain lighting up.\"\n- Reverse inference: \"amygdala active, therefore fear\" — regions do many things.\n- Smoothing before MVPA, destroying the patterns you want to decode.\n- Small samples (n\u003C20) with flexible analyses — the replication-crisis recipe.\n",{"name":5,"category":24,"description":7},"scientific","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-fmri-analysis",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill fmri-analysis",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill fmri-analysis",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill fmri-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-fmri-analysis\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"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},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]