[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75SV46ZB4GV83K51PW89ENK":3,"skill-same:01M75SV46ZB4GV83K51PW89ENK":64},{"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},"01M75SV46ZB4GV83K51PW89ENK","auto-label",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\u002Fauto-label\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"# 🏷️ Skill: Auto Label\n\n**ติดป้าย PR อัตโนมัติจาก conventional-commit type + path ที่แตะ — เพิ่มเท่านั้น ไม่ลบป้ายคนอื่น**\n\nLabels a pull request from two signals it already carries: the conventional-commit\ntype in the title, and the paths the diff touches. It only ever *adds* labels —\na human's label is never removed by a bot.\n\n---\n\n## Why it exists\n\n`new-crystalcastle` carries malformed-YAML PRs, orphaned JSX, and drafts. The\ncost of triage is not reading each PR — it is *routing* it: which of the 40\nlabels applies, so a reviewer can filter to `skills 🧠` or `security` and ignore\nthe rest. That decision is mechanical for the 80% of PRs that follow the repo's\nown commit convention, and it is the part worth automating.\n\nThis skill automates the mechanical part and refuses the judgement part. A PR\nthat matches no rule gets no label and no guessing.\n\n---\n\n## When to use it\n\n- A PR is opened or its title changes → classify and apply.\n- Backfilling labels across existing PRs → `--dry-run` first, always.\n- Auditing what *would* be labelled before turning the workflow on.\n\n## When **not** to use it\n\n- To decide mergeability, priority, or `ready-to-merge`. Labels here describe\n  *what changed*, never *whether it is good*.\n- To label issues. The rules read PR paths and commit types.\n\n---\n\n## The two signals\n\n**1. Title (conventional commit).** The repo already enforces this format, so it\nis free signal. `feat(docs): …` → `feature`, `docs`. `fix(skill:x): …` → `bugfix`,\n`skills 🧠`.\n\n**2. Changed paths.** `skills\u002F**` → `skills 🧠`. `**\u002Ftest_*.py` → `testing`.\n`security\u002F**` → `security`. `*.lock`, `requirements*.txt` → `dependencies`, `deps`.\n\nBoth signals combine. A `feat(security)` PR touching `security\u002Fcwe1321\u002F` gets\n`feature` + `security` — the intersection is the useful part.\n\n---\n\n## Rules\n\nThe rule table lives in `labels.json` and is data, not code. Each entry is\n`{match, labels}` where `match` is either `title` (a commit type) or `paths`\n(glob patterns). Edit the JSON to change behaviour; `classify.py` needs no edit.\n\nPrecedence is flat — every matching rule contributes. There is no first-match-wins\nbecause \"this PR is both docs and a skill\" is true, and one of it being dropped\nwould be the bug.\n\n---\n\n## Safety\n\nThree invariants the implementation holds:\n\n1. **Additive only.** `apply_labels()` calls the add endpoint. It never calls\n   remove, so a human's `ready-to-merge` survives a re-classification.\n2. **No labels on no match.** An unmatched PR is returned with an empty set and\n   the reason logged. Guessing a label is worse than an unlabelled PR.\n3. **Dry-run is the default.** `apply.py` prints what it would do unless\n   `--apply` is passed. Same convention as every other script in this repo.\n\n---\n\n## Files\n\n| File | Purpose |\n| --- | --- |\n| `SKILL.md` | This document |\n| `classify.py` | Pure function: `(title, paths) -> set[label]` |\n| `labels.json` | The rule table |\n| `apply.py` | CLI: fetch a PR, classify, optionally apply |\n| `tests\u002Ftest_classify.py` | Runnable tests, no network |\n\n---\n\n## Usage\n\n```bash\n# what labels would PR #293 get?\npython skills\u002Fauto-label\u002Fapply.py --repo ZyntroAI\u002Ffastapi-python-boilerplate --pr 293\n\n# actually apply them\npython skills\u002Fauto-label\u002Fapply.py --repo ZyntroAI\u002Ffastapi-python-boilerplate --pr 293 --apply\n\n# classify from raw inputs, no network\npython skills\u002Fauto-label\u002Fclassify.py \\\n  --title \"feat(docs): convert FIG_V4 into docs\u002Ffig\" \\\n  --path docs\u002Ffig\u002FREADME.md --path docs\u002Ffig\u002Fconfig\u002Froles.json\n```\n\n```python\nfrom classify import classify\nclassify(\"fix(skill:auto-label): handle missing path\", [\"skills\u002Fauto-label\u002Fclassify.py\"])\n# -> {\"bugfix\", \"skills 🧠\"}\n```\n\n---\n\n## Gotchas\n\n- **Label names carry emoji.** `skills 🧠` and `docs 📝` both exist *alongside*\n  plain `docs`. The rule table targets the exact string. Adding a label that\n  does not exist creates it silently — check `labels.json` against\n  `gh label list` if a label looks orphaned.\n- **`docs 📝` vs `docs`.** Both exist. The table uses plain `docs` for the\n  category and this is deliberate — see `labels.json` `_notes`.\n- **Squash-merge titles.** The title the bot reads is the PR title, which becomes\n  the squash subject. Fix the title before classifying, not after.\n- **Fork PRs.** Read-only by default; classification works, applying may not.\n",{},"main","c68ea5db21e36ef3f01986f87cf40276e64c2e9b","skills\u002Fauto-label",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 auto-label",{"tool":36,"command":37},"bunx","bunx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill auto-label",{"tool":39,"command":40},"pnpm","pnpm dlx skills add ZyntroAI\u002Ffastapi-python-boilerplate --skill auto-label","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fauto-label\u002FSKILL.md",true,[44,50,54,60],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"apply.py","SCRIPT","脚本",3476,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fauto-label\u002Fapply.py",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"classify.py",4115,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fauto-label\u002Fclassify.py",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"labels.json","REFERENCE","参考文档",2789,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fauto-label\u002Flabels.json",{"path":61,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":62,"sourceHtmlUrl":63},"tests\u002Ftest_classify.py",3480,"https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fauto-label\u002Ftests\u002Ftest_classify.py",[65,71,78,84,90,96],{"skillNo":66,"name":67,"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":68,"categories":69,"keywords":70,"publishedAt":18},"01M75SVXD72XFZWSX20BSWW622","workflow_dispatch","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_dispatch\u002FSkill.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"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":79,"name":80,"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":81,"categories":82,"keywords":83,"publishedAt":18},"01M75SVR5BQFH3MM78FWR8V10V","pr-triage-automove","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fpr-triage-automove\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"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":87,"categories":88,"keywords":89,"publishedAt":18},"01M75SVPAMK09RRZ56SPVRPJ2K","patch","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fpatch\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},"01M75SVKCB0EMDSY2Q76BGNNH5","git-patch-merge","https:\u002F\u002Fgithub.com\u002FZyntroAI\u002Ffastapi-python-boilerplate\u002Fblob\u002Fmain\u002Fskills\u002Fgit-patch-merge\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"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",[],[]]