[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75SVD60HF5VNF62CE7YXP1Y":3,"skill-same:01M75SVD60HF5VNF62CE7YXP1Y":76},{"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":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M75SVD60HF5VNF62CE7YXP1Y","ci-workflow-authoring",null,"ZyntroAI\u002Ffastapi-python-boilerplate","ZyntroAI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F312382677?v=4","01M75SQSYX5NMYH6AGGAS67D2B","Zyntro​ Media","01M75SQSZHW30DBXDX3TAYJ92F",1,"MIT","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"# 🧰 Skill: CI Workflow Authoring\n\n**เขียน GitHub Actions workflow สำหรับ repo นี้ให้รันได้จริงตั้งแต่ครั้งแรก**\n\nEverything here is checked against the repo as it stands, not written from a\ntemplate. The six failure modes below are ones that actually occurred in this\nrepository's workflows — each one produces a job that is *green-looking but\nnever ran*, which is the worst kind of CI bug.\n\n---\n\n## The six ways a workflow silently fails here\n\n| # | Failure | What you see | Why |\n| - | ------- | ------------ | --- |\n| 1 | Not valid YAML | The workflow never appears in the Actions tab at all | Two documents pasted together (`preservedjobs:`), a heredoc, or an unquoted `:` in a string |\n| 2 | Action not SHA-pinned | `Set up job` fails: *Unable to resolve action …* | Org policy requires a full 40-char commit SHA; `@v4` is rejected |\n| 3 | SHA that does not exist | Same message, different cause | The SHA was invented or copied from another action's repo |\n| 4 | Script or target missing | Job fails after checkout | `scripts\u002Fx.py`, `make ci`, `.\u002Fcharts` referenced but absent |\n| 5 | Exit code read too late | `if [ $? -eq 0 ]` reports the **echo's** success | `$?` must be captured on the next line |\n| 6 | `if: failure()` on a green-`needs` chain | Rollback\u002Fnotify steps never fire | `needs: merge-queue` means the post-merge job does not run unless that job succeeded |\n\nRule 6 catches people constantly. A rollback step guarded by `if: failure()`\ninside a job that only starts when its dependency *succeeded* can never roll\nback the thing that failed.\n\n---\n\n## Hard rules for this repository\n\n1. **SHA-pin every `uses:`.** Resolve and verify against the API first:\n   ```bash\n   gh api repos\u002Factions\u002Fcheckout\u002Fcommits\u002Fv5 --jq .sha\n   ```\n   Then confirm the SHA belongs to *that* action's repo — a SHA from the wrong\n   repo returns 422 and the job dies at setup.\n2. **Quote any string containing `:`.** `foo: bar` inside a `run:` gets parsed as\n   a mapping. Prefer a quoted single line or a `|` literal block.\n3. **Check the artifact exists before referencing it.** `scripts\u002Fpr_triage_automove.py`\n   is not in this repo; the automove entry point is\n   `skills\u002Fpr-triage-automove\u002Fautomove.py`.\n4. **Check Make targets before calling them.** This Makefile has\n   `setup install test lint format check run clean` — **there is no `ci` and no\n   `smoke-test`**.\n5. **Never `git push origin HEAD:main` from a `pull_request` job.** On a fork the\n   token is read-only and the run dies; on a same-repo branch it bypasses review.\n   Use `gh pr merge --auto` and let the platform do the gating.\n6. **Report-only by default.** A workflow whose default path mutates the tree will\n   surprise the first reviewer who meets it. Gate writes behind an explicit\n   opt-in (a repository variable or a label).\n7. **Verify writes landed.** This environment can reset files mid-task; re-read a\n   file after writing it and before running the gate.\n\n---\n\n## The linter\n\n```bash\npython skills\u002Fci-workflow-authoring\u002Flint.py .github\u002Fworkflows\u002F*.yml\npython skills\u002Fci-workflow-authoring\u002Flint.py path\u002Fto\u002Fanything.yml\n```\n\nChecks the layers an LLM-authored workflow actually fails at: YAML parse, required\ntop-level keys, per-job `runs-on`\u002F`steps`\u002F`uses-or-run`, SHA pinning, concatenated\ndocuments, hardcoded credentials.\n\nExit `1` if anything failed, so it drops straight into CI.\n\n### Running it against this repo today\n\n```\nFAIL .github\u002Fworkflows\u002Fci.yml            not SHA-pinned: actions\u002Fcheckout@v4 …\nFAIL .github\u002Fworkflows\u002Ftest-suite.yml    not SHA-pinned: …\n```\n\nEvery failing workflow in this repo fails for reason **#2 or #3** — a tag pin or\nan unresolvable SHA — which is why every PR currently shows red checks regardless\nof its diff.\n\n---\n\n## Examples\n\n`examples\u002F` holds three corrected workflows, each annotated at the points where\nthe pasted version broke:\n\n- **`pr-triage-automove.yml`** — runs the real `skills\u002Fpr-triage-automove\u002Fautomove.py`,\n  report-only, SHA-pinned, and it does **not** claim success when nothing was\n  checked.\n- **`merge-queue.yml`** — uses `gh pr merge --auto` instead of pushing to `main`,\n  and reads check conclusions from the API rather than from `$?`.\n- **`post-merge.yml`** — deploys the chart that exists (`helm\u002Foauth-app`), reads\n  `$?` on the right line, checks the secret is present, and rolls back by revision.\n\n---\n\n## Before you commit a workflow\n\n```bash\n# 1. does it parse, and is every action pinned?\npython skills\u002Fci-workflow-authoring\u002Flint.py \u003Cfile>.yml\n\n# 2. do the things it runs actually exist?\ngrep -nE \"^[a-z-]+:\" Makefile                 # targets\nls scripts\u002F skills\u002F                           # scripts\nls helm\u002F charts\u002F                              # charts\n\n# 3. do the SHAs resolve?  (lint.py only checks that a pin LOOKS like a SHA)\npython skills\u002Fci-workflow-authoring\u002Fverify-pins.py .github\u002Fworkflows\u002F*.yml\n```\n\nStep 3 is the one that matters most, and the one `lint.py` cannot do. A\nfabricated 40-hex string satisfies every pattern check and still fails at\n`Set up job` with \"Unable to find version\", so a green lint is not evidence the\npins are real. `verify-pins.py` asks GitHub whether each commit exists in **that\naction's own repository** and exits non-zero if any does not.\n\nIt uses the HTML commit endpoint rather than the REST API, because the anonymous\nAPI allows 60 requests\u002Fhour — enough to exhaust halfway through a repository of\nany size. Two details it handles:\n\n- **subdirectory actions** (`owner\u002Frepo\u002Fsubdir@sha`) are looked up against\n  `owner\u002Frepo`; querying the three-segment path 404s even for a real commit\n- **a network error is reported as unverifiable, not as fake** — an unreachable\n  GitHub is not evidence about a SHA\n\nIf a check cannot run in your environment (no `workflows` permission to push),\nsay so in the PR — do not report it as passing.\n",{},"main","c68ea5db21e36ef3f01986f87cf40276e64c2e9b","skills\u002Fci-workflow-authoring",0,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate","https:\u002F\u002Fzyntroai.github.io\u002Ffastapi-python-boilerplate\u002F","https:\u002F\u002Fgithub.com\u002FZyntroAI","2026-11-02 02:14:54",{"source":7,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill ci-workflow-authoring",{"tool":36,"command":37},"bunx","bunx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill ci-workflow-authoring",{"tool":39,"command":40},"pnpm","pnpm dlx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill ci-workflow-authoring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002FSKILL.md",true,[44,50,54,58,64,68,72],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"examples\u002Fmerge-queue.yml","REFERENCE","参考文档",4102,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Fexamples\u002Fmerge-queue.yml",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"examples\u002Fpost-merge.yml",2969,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Fexamples\u002Fpost-merge.yml",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"examples\u002Fpr-triage-automove.yml",4200,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Fexamples\u002Fpr-triage-automove.yml",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"lint.py","SCRIPT","脚本",3854,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Flint.py",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"tests\u002Ftest_lint.py",5307,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Ftests\u002Ftest_lint.py",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"tests\u002Ftest_verify_pins.py",4601,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Ftests\u002Ftest_verify_pins.py",{"path":73,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":74,"sourceHtmlUrl":75},"verify-pins.py",4870,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fci-workflow-authoring\u002Fverify-pins.py",[77,83,90,96,102,108],{"skillNo":78,"name":79,"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":80,"categories":81,"keywords":82,"publishedAt":18},"01M75SVXD72XFZWSX20BSWW622","workflow_dispatch","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_dispatch\u002FSkill.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M75SVVF3FBTNHKFWAF8H6ZD2","research","Multi-source research & knowledge synthesis with cross-validation, provenance graph, confidence score","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"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":93,"categories":94,"keywords":95,"publishedAt":18},"01M75SVR5BQFH3MM78FWR8V10V","pr-triage-automove","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fpr-triage-automove\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"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":99,"categories":100,"keywords":101,"publishedAt":18},"01M75SVPAMK09RRZ56SPVRPJ2K","patch","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fpatch\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"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":105,"categories":106,"keywords":107,"publishedAt":18},"01M75SVKCB0EMDSY2Q76BGNNH5","git-patch-merge","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fgit-patch-merge\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":18},"01M75SVH67JHCKQ632D6HE5ZHZ","fetching","Low-level async HTTP\u002FGraphQL fetch — SSRF-safe, retry, cache, provenance","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Ffetching\u002FSKILL.md",[],[]]