[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FC0JHT6K54H9SREG495SQJ":3,"skill-same:01M7FC0JHT6K54H9SREG495SQJ":48},{"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":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7FC0JHT6K54H9SREG495SQJ","triage-ci",null,"Diagnose a failing CI run by finding the first real failure rather than the last log line, classifying it as defect, flake, infrastructure, or config drift, and fixing the cause without disabling the check. Use when asked to fix the build, fix CI, find out why CI is failing, look at a failing run, or work out what is actually wrong with a red build, and when a pipeline or GitHub Actions run fails, a CI log needs reading, or tests pass locally but fail only in CI.","tounsils\u002Fclaude-code-skills","tounsils","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F44228841?v=4","01M7FBZBPTTP3RAHJ0V3NH6AXN","Ilyes Tounsi","01M7FBZBQDYG7RKSEHJ384475F",1,"MIT","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriage-ci\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: triage-ci\ndescription: Diagnose a failing CI run by finding the first real failure rather than the last log line, classifying it as defect, flake, infrastructure, or config drift, and fixing the cause without disabling the check. Use when asked to fix the build, fix CI, find out why CI is failing, look at a failing run, or work out what is actually wrong with a red build, and when a pipeline or GitHub Actions run fails, a CI log needs reading, or tests pass locally but fail only in CI.\n---\n\n# Triage a red build\n\nTwo mistakes account for most wasted time here: reading the last error instead of the first, and making the build green instead of making it correct.\n\n## Get the run and the logs\n\n```bash\ngh run list --limit 10\ngh run view \u003Crun-id>\ngh run view \u003Crun-id> --log-failed          # the failing steps only\ngh run view --job \u003Cjob-id> --log           # one job in full\n```\n\nWithout `gh`, ask for the raw log rather than working from a screenshot of the summary. The summary names the step; the cause is usually 200 lines above it.\n\nAlso get the context that decides whether this is new:\n\n```bash\ngh run list --branch main --limit 10        # is the base branch green?\ngit log --oneline -5\n```\n\nA red base branch means the failure is probably not yours. Say so before investigating the diff.\n\n## Find the first real failure\n\nScroll up, not down. CI logs end with the cascade, and the cascade is noisy: a compile error produces 40 downstream test failures, a failed install produces a missing-module error in every step, a disk-full condition produces whatever happened to need disk next.\n\nWork from the top of the failing step:\n\n- The first non-zero exit code.\n- The first stack trace, as opposed to the last one.\n- The first \"cannot find\", \"undefined\", \"connection refused\", or \"permission denied\".\n\nThen ask whether everything after it is explained by it. If a build step failed, the 40 test failures are one finding, not 41.\n\nFor a parallel matrix, compare the legs. One leg failing out of six points at that leg's difference (a runtime version, an OS, a shard boundary). All six failing points at the change.\n\n## Classify before fixing\n\nThe fix depends entirely on the class, and these are distinguishable.\n\n| Class | Signal | Fix |\n| --- | --- | --- |\n| Real defect | Fails deterministically, and fails locally with the same command | Fix the code |\n| Flake | Passes on re-run with no change, or fails in some matrix legs only | Fix the test's shared state, clock, or ordering assumption |\n| Infrastructure | Network timeout, registry 5xx, runner out of disk or memory, image pull failure | Retry is legitimate; report it so a pattern is visible |\n| Config drift | A tool, action, runtime, or dependency resolved to a new version | Pin it, then upgrade deliberately |\n| Cache poisoning | Fails only with a warm cache, passes on a cleared one | Fix the cache key so it covers what changed |\n| Environment gap | Passes locally, fails in CI, same command | Find the difference: env var, secret, timezone, locale, case sensitivity, available service |\n\nDo not re-run to see if it passes as a first move. A re-run that goes green has destroyed the evidence and told you only that the failure is not fully deterministic.\n\n## Reproduce with the CI command verbatim\n\nThe most common reason \"it passes locally\" is that local and CI are not running the same command.\n\nCopy the command out of the workflow file, with its environment and its flags, and run that:\n\n```bash\nrg -n 'run:|env:|NODE_ENV|CI:' .github\u002Fworkflows\u002F*.yml\nCI=true npm test -- --runInBand            # whatever the workflow actually does\n```\n\n`CI=true` alone changes behavior in many test runners: no watch mode, no interactive prompts, different snapshot handling, stricter warnings. A test suite that runs in a random order locally and a fixed order in CI (or the reverse) will hide ordering bugs on one side.\n\nCheck the other usual differences: Node or Python version, timezone (CI is typically UTC), locale, filesystem case sensitivity, whether a database or cache service is actually running, and whether a secret is present.\n\n## Fix a flake properly\n\nA flake is a defect in the test, or a real race in the code that the test is surfacing. Treat it as a bug with a known reproduction rate.\n\nGet the rate first, so you can prove the fix:\n\n```bash\nfor i in $(seq 50); do npx vitest run -t 'the flaky test' || echo \"FAIL $i\"; done\npytest -k test_name --count 50            # pytest-repeat\n```\n\nThen look for the three causes, in this order:\n\n1. **Shared state between tests**: a module-level variable, a database row not rolled back, a temporary file, a singleton, a mocked global not restored. Confirm by running the test alone (it passes) and then after its neighbor (it fails).\n2. **Real time**: a fixed sleep instead of a wait-for-condition, a timeout tuned to a fast machine, a date boundary, an assertion on a duration. Replace sleeps with a condition poll and inject the clock.\n3. **Concurrency and ordering**: two operations that usually complete in the convenient order, an unawaited promise, an assertion before a queue drains.\n\n**Do not add a retry to a flaky test.** A retry converts a visible intermittent failure into an invisible one, and if the flake reflects a real race, the race is still in production. If you must add one to unblock a release, say so explicitly, record the reproduction rate, and leave the issue open.\n\n## Things that are not fixes\n\nEach of these makes the build green and the problem worse. If you choose one knowingly, say so in plain words and leave the reason in the code.\n\n- Skipping or deleting the test that caught it.\n- `continue-on-error` on the failing step.\n- Lowering a coverage threshold to match current coverage.\n- Adding a blanket retry at the job level.\n- Widening a version range so the resolver picks something that happens to work.\n- Increasing a timeout without explaining why the new value is right.\n\nA skipped test is a failing test nobody can see. If the suite now has skips that it did not have before, that is the headline of your report, not a footnote.\n\n## Report\n\n- **Run**: link to it, and whether the base branch is green.\n- **First real failure**: step, file and line, and the message. Say which of the other failures it explains.\n- **Class**: from the table, with the evidence that distinguishes it from the neighboring class.\n- **Local reproduction**: the exact command, and whether it reproduced.\n- **Fix**: what changed and why it addresses the cause.\n- **Verification**: pass, fail, and skip counts. For a flake, the failure rate over N runs before and after.\n- **Left open**: anything you worked around rather than fixed, named as a workaround.\n","# Triage a red build\n\nTwo mistakes account for most wasted time here: reading the last error instead of the first, and making the build green instead of making it correct.\n\n## Get the run and the logs\n\n```bash\ngh run list --limit 10\ngh run view \u003Crun-id>\ngh run view \u003Crun-id> --log-failed          # the failing steps only\ngh run view --job \u003Cjob-id> --log           # one job in full\n```\n\nWithout `gh`, ask for the raw log rather than working from a screenshot of the summary. The summary names the step; the cause is usually 200 lines above it.\n\nAlso get the context that decides whether this is new:\n\n```bash\ngh run list --branch main --limit 10        # is the base branch green?\ngit log --oneline -5\n```\n\nA red base branch means the failure is probably not yours. Say so before investigating the diff.\n\n## Find the first real failure\n\nScroll up, not down. CI logs end with the cascade, and the cascade is noisy: a compile error produces 40 downstream test failures, a failed install produces a missing-module error in every step, a disk-full condition produces whatever happened to need disk next.\n\nWork from the top of the failing step:\n\n- The first non-zero exit code.\n- The first stack trace, as opposed to the last one.\n- The first \"cannot find\", \"undefined\", \"connection refused\", or \"permission denied\".\n\nThen ask whether everything after it is explained by it. If a build step failed, the 40 test failures are one finding, not 41.\n\nFor a parallel matrix, compare the legs. One leg failing out of six points at that leg's difference (a runtime version, an OS, a shard boundary). All six failing points at the change.\n\n## Classify before fixing\n\nThe fix depends entirely on the class, and these are distinguishable.\n\n| Class | Signal | Fix |\n| --- | --- | --- |\n| Real defect | Fails deterministically, and fails locally with the same command | Fix the code |\n| Flake | Passes on re-run with no change, or fails in some matrix legs only | Fix the test's shared state, clock, or ordering assumption |\n| Infrastructure | Network timeout, registry 5xx, runner out of disk or memory, image pull failure | Retry is legitimate; report it so a pattern is visible |\n| Config drift | A tool, action, runtime, or dependency resolved to a new version | Pin it, then upgrade deliberately |\n| Cache poisoning | Fails only with a warm cache, passes on a cleared one | Fix the cache key so it covers what changed |\n| Environment gap | Passes locally, fails in CI, same command | Find the difference: env var, secret, timezone, locale, case sensitivity, available service |\n\nDo not re-run to see if it passes as a first move. A re-run that goes green has destroyed the evidence and told you only that the failure is not fully deterministic.\n\n## Reproduce with the CI command verbatim\n\nThe most common reason \"it passes locally\" is that local and CI are not running the same command.\n\nCopy the command out of the workflow file, with its environment and its flags, and run that:\n\n```bash\nrg -n 'run:|env:|NODE_ENV|CI:' .github\u002Fworkflows\u002F*.yml\nCI=true npm test -- --runInBand            # whatever the workflow actually does\n```\n\n`CI=true` alone changes behavior in many test runners: no watch mode, no interactive prompts, different snapshot handling, stricter warnings. A test suite that runs in a random order locally and a fixed order in CI (or the reverse) will hide ordering bugs on one side.\n\nCheck the other usual differences: Node or Python version, timezone (CI is typically UTC), locale, filesystem case sensitivity, whether a database or cache service is actually running, and whether a secret is present.\n\n## Fix a flake properly\n\nA flake is a defect in the test, or a real race in the code that the test is surfacing. Treat it as a bug with a known reproduction rate.\n\nGet the rate first, so you can prove the fix:\n\n```bash\nfor i in $(seq 50); do npx vitest run -t 'the flaky test' || echo \"FAIL $i\"; done\npytest -k test_name --count 50            # pytest-repeat\n```\n\nThen look for the three causes, in this order:\n\n1. **Shared state between tests**: a module-level variable, a database row not rolled back, a temporary file, a singleton, a mocked global not restored. Confirm by running the test alone (it passes) and then after its neighbor (it fails).\n2. **Real time**: a fixed sleep instead of a wait-for-condition, a timeout tuned to a fast machine, a date boundary, an assertion on a duration. Replace sleeps with a condition poll and inject the clock.\n3. **Concurrency and ordering**: two operations that usually complete in the convenient order, an unawaited promise, an assertion before a queue drains.\n\n**Do not add a retry to a flaky test.** A retry converts a visible intermittent failure into an invisible one, and if the flake reflects a real race, the race is still in production. If you must add one to unblock a release, say so explicitly, record the reproduction rate, and leave the issue open.\n\n## Things that are not fixes\n\nEach of these makes the build green and the problem worse. If you choose one knowingly, say so in plain words and leave the reason in the code.\n\n- Skipping or deleting the test that caught it.\n- `continue-on-error` on the failing step.\n- Lowering a coverage threshold to match current coverage.\n- Adding a blanket retry at the job level.\n- Widening a version range so the resolver picks something that happens to work.\n- Increasing a timeout without explaining why the new value is right.\n\nA skipped test is a failing test nobody can see. If the suite now has skips that it did not have before, that is the headline of your report, not a footnote.\n\n## Report\n\n- **Run**: link to it, and whether the base branch is green.\n- **First real failure**: step, file and line, and the message. Say which of the other failures it explains.\n- **Class**: from the table, with the evidence that distinguishes it from the neighboring class.\n- **Local reproduction**: the exact command, and whether it reproduced.\n- **Fix**: what changed and why it addresses the cause.\n- **Verification**: pass, fail, and skip counts. For a flake, the failure rate over N runs before and after.\n- **Left open**: anything you worked around rather than fixed, named as a workaround.\n",{"name":5,"description":7},"main","807b57c9eb35842569bb3732ff8831ca7e6a3d57","skills\u002Ftriage-ci",0,"https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills#readme","https:\u002F\u002Fgithub.com\u002Ftounsils","https:\u002F\u002Fwww.tn76.com","I ship products as remote MCP servers, then stay on as fractional CTO. Typed tools, grounded answers, eval-gated releases. 20 years in production.","2026-10-22 03:33:35",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add tounsils\u002Fclaude-code-skills --skill triage-ci",{"tool":40,"command":41},"bunx","bunx skills add tounsils\u002Fclaude-code-skills --skill triage-ci",{"tool":43,"command":44},"pnpm","pnpm dlx skills add tounsils\u002Fclaude-code-skills --skill triage-ci","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriage-ci\u002FSKILL.md",true,[],[49,56,63,70,77,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7FC0CZ5H5C5KKJJRJ67QEMN","test-gaps","Find the untested branches that matter, write tests that can actually fail, and report pass, fail, and skip counts honestly. Use when asked to add tests, write tests for this, improve coverage, find test gaps, check what is untested, or when a change needs test coverage before it ships.","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftest-gaps\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7FC09K4NJXCB6E6QPXG5KWR","ship-pr","Turn a finished change into a commit message and pull request derived from the actual diff, with a pre-submit checklist covering auth gates, secrets, migrations, and breaking changes. Use when asked to commit this, write a commit message, open a PR, raise a pull request, write the PR description, or get this ready to push.","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Fship-pr\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},"01M7FC04XYBN0VP139DKXN8S3Q","root-cause","Debug by reproducing first, isolating the mechanism, then fixing the cause rather than the symptom, and keeping the reproduction as a regression test. Use when asked to debug this, fix this bug, find out why something happens, investigate a failure, or work out what is going wrong, and when a test fails intermittently or flakily, behavior differs between environments, or someone proposes raising a timeout, adding a retry, or skipping a test to make a problem go away.","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Froot-cause\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},"01M7FC002BQMJ6BHA49NB3J8FM","review-diff","Review uncommitted or branch-local changes for defects, ranked by severity, with a concrete failure scenario behind every finding. Use when asked to review code, review a diff, review my changes, check this before I commit, look over this branch, or do a pre-PR pass. Reviews the change, not the whole repository.","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Freview-diff\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7FBZWP0GPT81VC136VKQ183","restructure","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Frestructure\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7FBZPQF5KQ3J5M6YWYT5J1T","perf-hunt","Find and fix the real performance bottleneck by measuring first, attacking the dominant cost, then re-measuring, with every constant derived from a number rather than guessed. Use when asked to make this faster, speed this up, optimize this, profile this, reduce latency, or fix something slow, and when an endpoint, query, page, build, or test run takes too long or memory grows without bound.","https:\u002F\u002Fgithub.com\u002Ftounsils\u002Fclaude-code-skills\u002Fblob\u002Fmain\u002Fskills\u002Fperf-hunt\u002FSKILL.md",[],[]]