[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BWN34KPWN6BTRFNSZ18WVA":3,"skill-same:01M7BWN34KPWN6BTRFNSZ18WVA":51},{"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},"01M7BWN34KPWN6BTRFNSZ18WVA","ac-branch-pi-model",null,"AC branch pi-model power flow equations (P\u002FQ and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign\u002Funits issues in AC power flow.","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\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fenergy-ac-optimal-power-flow-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fac-branch-pi-model\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ac-branch-pi-model\ndescription: \"AC branch pi-model power flow equations (P\u002FQ and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign\u002Funits issues in AC power flow.\"\n---\n\n# AC Branch Pi-Model + Transformer Handling\n\nImplement the exact branch power flow equations in `acopf-math-model.md` using MATPOWER branch data:\n\n```\n[F_BUS, T_BUS, BR_R, BR_X, BR_B, RATE_A, RATE_B, RATE_C, TAP, SHIFT, BR_STATUS, ANGMIN, ANGMAX]\n```\n\n## Quick start\n\n- Use `scripts\u002Fbranch_flows.py` to compute per-unit branch flows.\n- Treat the results as **power leaving** the “from” bus and **power leaving** the “to” bus (i.e., compute both directions explicitly).\n\nExample:\n\n```python\nimport json\nimport numpy as np\n\nfrom scripts.branch_flows import compute_branch_flows_pu, build_bus_id_to_idx\n\ndata = json.load(open(\"\u002Froot\u002Fnetwork.json\"))\nbaseMVA = float(data[\"baseMVA\"])\nbuses = np.array(data[\"bus\"], dtype=float)\nbranches = np.array(data[\"branch\"], dtype=float)\n\nbus_id_to_idx = build_bus_id_to_idx(buses)\n\nVm = buses[:, 7]  # initial guess VM\nVa = np.deg2rad(buses[:, 8])  # initial guess VA\n\nbr = branches[0]\nP_ij, Q_ij, P_ji, Q_ji = compute_branch_flows_pu(Vm, Va, br, bus_id_to_idx)\n\nS_ij_MVA = (P_ij**2 + Q_ij**2) ** 0.5 * baseMVA\nS_ji_MVA = (P_ji**2 + Q_ji**2) ** 0.5 * baseMVA\nprint(S_ij_MVA, S_ji_MVA)\n```\n\n## Model details (match the task formulation)\n\n### Per-unit conventions\n\n- Work in per-unit internally.\n- Convert with `baseMVA`:\n  - \\(P_{pu} = P_{MW} \u002F baseMVA\\)\n  - \\(Q_{pu} = Q_{MVAr} \u002F baseMVA\\)\n  - \\(|S|_{MVA} = |S|_{pu} \\cdot baseMVA\\)\n\n### Transformer handling (MATPOWER TAP + SHIFT)\n\n- Use \\(T_{ij} = tap \\cdot e^{j \\cdot shift}\\).\n- **Implementation shortcut (real tap + phase shift):**\n  - If `abs(TAP) \u003C 1e-12`, treat `tap = 1.0` (no transformer).\n  - Convert `SHIFT` from degrees to radians.\n  - Use the angle shift by modifying the angle difference:\n    - \\(\\delta_{ij} = \\theta_i - \\theta_j - shift\\)\n    - \\(\\delta_{ji} = \\theta_j - \\theta_i + shift\\)\n\n### Series admittance\n\nGiven `BR_R = r`, `BR_X = x`:\n\n- If `r == 0 and x == 0`, set `g = 0`, `b = 0` (avoid divide-by-zero).\n- Else:\n  - \\(y = 1\u002F(r + jx) = g + jb\\)\n  - \\(g = r\u002F(r^2 + x^2)\\)\n  - \\(b = -x\u002F(r^2 + x^2)\\)\n\n### Line charging susceptance\n\n- `BR_B` is the **total** line charging susceptance \\(b_c\\) (per unit).\n- Each end gets \\(b_c\u002F2\\) in the standard pi model.\n\n## Power flow equations (use these exactly)\n\nLet:\n- \\(V_i = |V_i| e^{j\\theta_i}\\), \\(V_j = |V_j| e^{j\\theta_j}\\)\n- `tap` is real, `shift` is radians\n- `inv_t = 1\u002Ftap`, `inv_t2 = inv_t^2`\n\nThen the real\u002Freactive power flow from i→j is:\n\n- \\(P_{ij} = g |V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ij} + b\\sin\\delta_{ij})\\)\n- \\(Q_{ij} = -(b + b_c\u002F2)|V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ij} - b\\cos\\delta_{ij})\\)\n\nAnd from j→i is:\n\n- \\(P_{ji} = g |V_j|^2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ji} + b\\sin\\delta_{ji})\\)\n- \\(Q_{ji} = -(b + b_c\u002F2)|V_j|^2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ji} - b\\cos\\delta_{ji})\\)\n\nCompute apparent power:\n\n- \\(|S_{ij}| = \\sqrt{P_{ij}^2 + Q_{ij}^2}\\)\n- \\(|S_{ji}| = \\sqrt{P_{ji}^2 + Q_{ji}^2}\\)\n\n## Common uses\n\n### Enforce MVA limits (rateA)\n\n- `RATE_A` is an MVA limit (may be 0 meaning “no limit”).\n- Enforce in both directions:\n  - \\(|S_{ij}| \\le RATE_A\\)\n  - \\(|S_{ji}| \\le RATE_A\\)\n\n### Compute branch loading %\n\nFor reporting “most loaded branches”:\n\n- `loading_pct = 100 * max(|S_ij|, |S_ji|) \u002F RATE_A` if `RATE_A > 0`, else 0.\n\n### Aggregate bus injections for nodal balance\n\nTo build the branch flow sum for each bus \\(i\\):\n\n- Add \\(P_{ij}, Q_{ij}\\) to bus i\n- Add \\(P_{ji}, Q_{ji}\\) to bus j\n\nThis yields arrays `P_out[i]`, `Q_out[i]` such that the nodal balance can be written as:\n\n- \\(P^g - P^d - G^s|V|^2 = P_{out}\\)\n- \\(Q^g - Q^d + B^s|V|^2 = Q_{out}\\)\n\n## Sanity checks (fast debug)\n\n- With `SHIFT=0` and `TAP=1`, if \\(V_i = V_j\\) and \\(\\theta_i=\\theta_j\\), then \\(P_{ij}\\approx 0\\) and \\(P_{ji}\\approx 0\\) (lossless only if r=0).\n- For a pure transformer (`r=x=0`) you should not get meaningful flows; treat as `g=b=0` (no series element).\n","# AC Branch Pi-Model + Transformer Handling\n\nImplement the exact branch power flow equations in `acopf-math-model.md` using MATPOWER branch data:\n\n```\n[F_BUS, T_BUS, BR_R, BR_X, BR_B, RATE_A, RATE_B, RATE_C, TAP, SHIFT, BR_STATUS, ANGMIN, ANGMAX]\n```\n\n## Quick start\n\n- Use `scripts\u002Fbranch_flows.py` to compute per-unit branch flows.\n- Treat the results as **power leaving** the “from” bus and **power leaving** the “to” bus (i.e., compute both directions explicitly).\n\nExample:\n\n```python\nimport json\nimport numpy as np\n\nfrom scripts.branch_flows import compute_branch_flows_pu, build_bus_id_to_idx\n\ndata = json.load(open(\"\u002Froot\u002Fnetwork.json\"))\nbaseMVA = float(data[\"baseMVA\"])\nbuses = np.array(data[\"bus\"], dtype=float)\nbranches = np.array(data[\"branch\"], dtype=float)\n\nbus_id_to_idx = build_bus_id_to_idx(buses)\n\nVm = buses[:, 7]  # initial guess VM\nVa = np.deg2rad(buses[:, 8])  # initial guess VA\n\nbr = branches[0]\nP_ij, Q_ij, P_ji, Q_ji = compute_branch_flows_pu(Vm, Va, br, bus_id_to_idx)\n\nS_ij_MVA = (P_ij**2 + Q_ij**2) ** 0.5 * baseMVA\nS_ji_MVA = (P_ji**2 + Q_ji**2) ** 0.5 * baseMVA\nprint(S_ij_MVA, S_ji_MVA)\n```\n\n## Model details (match the task formulation)\n\n### Per-unit conventions\n\n- Work in per-unit internally.\n- Convert with `baseMVA`:\n  - \\(P_{pu} = P_{MW} \u002F baseMVA\\)\n  - \\(Q_{pu} = Q_{MVAr} \u002F baseMVA\\)\n  - \\(|S|_{MVA} = |S|_{pu} \\cdot baseMVA\\)\n\n### Transformer handling (MATPOWER TAP + SHIFT)\n\n- Use \\(T_{ij} = tap \\cdot e^{j \\cdot shift}\\).\n- **Implementation shortcut (real tap + phase shift):**\n  - If `abs(TAP) \u003C 1e-12`, treat `tap = 1.0` (no transformer).\n  - Convert `SHIFT` from degrees to radians.\n  - Use the angle shift by modifying the angle difference:\n    - \\(\\delta_{ij} = \\theta_i - \\theta_j - shift\\)\n    - \\(\\delta_{ji} = \\theta_j - \\theta_i + shift\\)\n\n### Series admittance\n\nGiven `BR_R = r`, `BR_X = x`:\n\n- If `r == 0 and x == 0`, set `g = 0`, `b = 0` (avoid divide-by-zero).\n- Else:\n  - \\(y = 1\u002F(r + jx) = g + jb\\)\n  - \\(g = r\u002F(r^2 + x^2)\\)\n  - \\(b = -x\u002F(r^2 + x^2)\\)\n\n### Line charging susceptance\n\n- `BR_B` is the **total** line charging susceptance \\(b_c\\) (per unit).\n- Each end gets \\(b_c\u002F2\\) in the standard pi model.\n\n## Power flow equations (use these exactly)\n\nLet:\n- \\(V_i = |V_i| e^{j\\theta_i}\\), \\(V_j = |V_j| e^{j\\theta_j}\\)\n- `tap` is real, `shift` is radians\n- `inv_t = 1\u002Ftap`, `inv_t2 = inv_t^2`\n\nThen the real\u002Freactive power flow from i→j is:\n\n- \\(P_{ij} = g |V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ij} + b\\sin\\delta_{ij})\\)\n- \\(Q_{ij} = -(b + b_c\u002F2)|V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ij} - b\\cos\\delta_{ij})\\)\n\nAnd from j→i is:\n\n- \\(P_{ji} = g |V_j|^2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ji} + b\\sin\\delta_{ji})\\)\n- \\(Q_{ji} = -(b + b_c\u002F2)|V_j|^2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ji} - b\\cos\\delta_{ji})\\)\n\nCompute apparent power:\n\n- \\(|S_{ij}| = \\sqrt{P_{ij}^2 + Q_{ij}^2}\\)\n- \\(|S_{ji}| = \\sqrt{P_{ji}^2 + Q_{ji}^2}\\)\n\n## Common uses\n\n### Enforce MVA limits (rateA)\n\n- `RATE_A` is an MVA limit (may be 0 meaning “no limit”).\n- Enforce in both directions:\n  - \\(|S_{ij}| \\le RATE_A\\)\n  - \\(|S_{ji}| \\le RATE_A\\)\n\n### Compute branch loading %\n\nFor reporting “most loaded branches”:\n\n- `loading_pct = 100 * max(|S_ij|, |S_ji|) \u002F RATE_A` if `RATE_A > 0`, else 0.\n\n### Aggregate bus injections for nodal balance\n\nTo build the branch flow sum for each bus \\(i\\):\n\n- Add \\(P_{ij}, Q_{ij}\\) to bus i\n- Add \\(P_{ji}, Q_{ji}\\) to bus j\n\nThis yields arrays `P_out[i]`, `Q_out[i]` such that the nodal balance can be written as:\n\n- \\(P^g - P^d - G^s|V|^2 = P_{out}\\)\n- \\(Q^g - Q^d + B^s|V|^2 = Q_{out}\\)\n\n## Sanity checks (fast debug)\n\n- With `SHIFT=0` and `TAP=1`, if \\(V_i = V_j\\) and \\(\\theta_i=\\theta_j\\), then \\(P_{ij}\\approx 0\\) and \\(P_{ji}\\approx 0\\) (lossless only if r=0).\n- For a pure transformer (`r=x=0`) you should not get meaningful flows; treat as `g=b=0` (no series element).\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fenergy-ac-optimal-power-flow-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fac-branch-pi-model",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 ac-branch-pi-model",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill ac-branch-pi-model",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill ac-branch-pi-model","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fenergy-ac-optimal-power-flow-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fac-branch-pi-model\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"scripts\u002Fbranch_flows.py","SCRIPT","脚本",2420,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fenergy-ac-optimal-power-flow-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fac-branch-pi-model\u002Fscripts\u002Fbranch_flows.py",[52,59,66,73,78,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"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":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"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":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"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":74,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"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":79,"name":61,"nameZh":6,"description":62,"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},"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":84,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"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",[],[]]