[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD75TK3B8JGNRB7J6XRN5P":3,"skill-same:01M6AD75TK3B8JGNRB7J6XRN5P":82},{"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":23,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6AD75TK3B8JGNRB7J6XRN5P","optimize-agentic-workflow",null,"Analyze and reduce token consumption in agentic workflows — guardrail-specific entry points, measurement, and optimization techniques.","github\u002Fgh-aw","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3VCZ4WKQSFSRTPN7N9DN",5636,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Foptimize-agentic-workflow\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"agentic","agentic workflow","workflow","optimize agentic workflow","optimize","workflows","agentic workflows","Optimization","analyze","token","guardrail","measurement","techniques","reduce","entry","2026-11-10 10:12:30",false,"---\nname: optimize-agentic-workflow\ndescription: Analyze and reduce token consumption in agentic workflows — guardrail-specific entry points, measurement, and optimization techniques.\n---\n\n# Agentic Workflow Token Optimizer\n\nHelp users reduce the AI token usage and cost of GitHub Agentic Workflows in this repository.\n\n## Load These References First\n\nLoad these files from `github\u002Fgh-aw` (they are not available locally).\n\n- `.github\u002Faw\u002Fgithub-agentic-workflows.md`\n- `.github\u002Faw\u002Ftoken-optimization.md`\n- `.github\u002Faw\u002Fworkflow-editing.md`\n- `.github\u002Faw\u002Fsyntax.md`\n\nLoad these only when relevant:\n\n- `.github\u002Faw\u002Fexperiments.md`\n- `.github\u002Faw\u002Fsafe-outputs.md`\n\n## Available Commands\n\n```bash\ngh aw audit \u003Crun-id> --json\ngh aw audit \u003Cbase-run-id> \u003Coptimized-run-id>\ngh aw logs \u003Cworkflow-name> --json\ngh aw compile \u003Cworkflow-name>\ngh aw status\n```\n\n## Start the Conversation\n\nAsk for one of these inputs:\n\n- a workflow run URL (or run ID) to analyze\n- a workflow name to review the source\n- the guardrail that was exceeded (max-ai-credits, max-daily-ai-credits, max-tool-denials, max-turns \u002F timeout)\n\n## Fast Path: Run URL Provided\n\nIf the user gives a GitHub Actions run URL:\n\n1. Extract the run ID\n2. Run `gh aw audit \u003Crun-id> --json`\n3. Inspect `agent_usage.aic`, `agent_usage.input_tokens`, `agent_usage.output_tokens`, `agent_usage.cache_read_tokens`\n4. Identify the most expensive phases before asking additional questions\n\n## Guardrail-Specific Entry Points\n\n### `max-ai-credits` exceeded\n\nThe workflow was stopped because it consumed more AI Credits than the configured per-run budget.\n\nPriority checks:\n1. Which tool calls dominated token usage? (`token-usage.jsonl`)\n2. Is the prompt front-loading large payloads that could be fetched on demand?\n3. Are there repetitive extraction steps that sub-agents could handle cheaply?\n4. Does the frontier model handle tasks that a small model could do?\n\n### `max-daily-ai-credits` exceeded\n\nThe workflow is being blocked because its 24-hour AI Credits budget is exhausted.\n\nPriority checks:\n1. What is the run cadence? (scheduled too frequently?)\n2. Does the workflow use cheap triage before escalating to the frontier model?\n3. Is batching or caching applicable to reduce run frequency?\n4. Are there noop early-exits for events that do not require agent action?\n\n### `max-tool-denials` exceeded\n\nThe Copilot SDK hit the tool-denial threshold, indicating the prompt attempted actions outside the allowed tool policy.\n\nPriority checks:\n1. What tool was repeatedly denied? (last denied reason in the failure issue)\n2. Is the tool missing from the workflow's permissions\u002Ffirewall config?\n3. Can the prompt be revised to avoid the denied operation entirely?\n4. Would a DataOps pre-step satisfy the data need without a tool call?\n\n### Timeout \u002F `max-turns` exceeded\n\nThe agent ran out of time or turns before completing the task.\n\nPriority checks:\n1. Is the task decomposable into smaller, faster sub-tasks?\n2. Are there long-running tool calls that could be replaced with DataOps pre-steps?\n3. Is the prompt asking the agent to do too much in one run?\n4. Can `max-turns` or `timeout-minutes` be raised, or should the task be split?\n\n## Optimization Analysis Plan\n\nAfter measuring token usage, produce a prioritized plan:\n\n1. **Measure** — run `gh aw audit \u003Crun-id> --json` and summarize AI Credits and per-call token breakdown\n2. **Diagnose the harness** — classify failures across context assembly, tool interaction, generation control, orchestration, memory management, and output processing\n3. **Identify top cost drivers** — list the three most expensive phases\u002Ftool calls\n4. **Apply quick wins first** — DataOps pre-steps, `gh-proxy`, `cli-proxy`, prompt trimming\n5. **Sub-agent delegation** — identify repetitive per-item loops suitable for small-model workers\n6. **Reuse execution experience** — preserve compact task features, configuration deltas, outcomes, costs, and diagnoses in `cache-memory` when cross-run reuse is useful; apply relevant recurring patterns to similar cases\n7. **Prompt caching** — verify stable instructions and reusable experience appear before dynamic content\n8. **Experiment correctness first** — add an `experiments:` entry, compare output quality first, and use `metric: \"aic\"` to choose among equivalent-quality variants\n9. **Validate quality** — confirm the optimized run produces equivalent safe outputs\n\nPresent the plan clearly before making any edits. Confirm with the user before applying changes.\n\n## Editing Workflow\n\n1. Edit `.github\u002Fworkflows\u002F\u003Cworkflow-name>.md`\n2. Recompile: `gh aw compile \u003Cworkflow-name>`\n3. Commit both the source and the generated `.lock.yml`\n4. Report the estimated savings and link to the PR or commit\n","# Agentic Workflow Token Optimizer\n\nHelp users reduce the AI token usage and cost of GitHub Agentic Workflows in this repository.\n\n## Load These References First\n\nLoad these files from `github\u002Fgh-aw` (they are not available locally).\n\n- `.github\u002Faw\u002Fgithub-agentic-workflows.md`\n- `.github\u002Faw\u002Ftoken-optimization.md`\n- `.github\u002Faw\u002Fworkflow-editing.md`\n- `.github\u002Faw\u002Fsyntax.md`\n\nLoad these only when relevant:\n\n- `.github\u002Faw\u002Fexperiments.md`\n- `.github\u002Faw\u002Fsafe-outputs.md`\n\n## Available Commands\n\n```bash\ngh aw audit \u003Crun-id> --json\ngh aw audit \u003Cbase-run-id> \u003Coptimized-run-id>\ngh aw logs \u003Cworkflow-name> --json\ngh aw compile \u003Cworkflow-name>\ngh aw status\n```\n\n## Start the Conversation\n\nAsk for one of these inputs:\n\n- a workflow run URL (or run ID) to analyze\n- a workflow name to review the source\n- the guardrail that was exceeded (max-ai-credits, max-daily-ai-credits, max-tool-denials, max-turns \u002F timeout)\n\n## Fast Path: Run URL Provided\n\nIf the user gives a GitHub Actions run URL:\n\n1. Extract the run ID\n2. Run `gh aw audit \u003Crun-id> --json`\n3. Inspect `agent_usage.aic`, `agent_usage.input_tokens`, `agent_usage.output_tokens`, `agent_usage.cache_read_tokens`\n4. Identify the most expensive phases before asking additional questions\n\n## Guardrail-Specific Entry Points\n\n### `max-ai-credits` exceeded\n\nThe workflow was stopped because it consumed more AI Credits than the configured per-run budget.\n\nPriority checks:\n1. Which tool calls dominated token usage? (`token-usage.jsonl`)\n2. Is the prompt front-loading large payloads that could be fetched on demand?\n3. Are there repetitive extraction steps that sub-agents could handle cheaply?\n4. Does the frontier model handle tasks that a small model could do?\n\n### `max-daily-ai-credits` exceeded\n\nThe workflow is being blocked because its 24-hour AI Credits budget is exhausted.\n\nPriority checks:\n1. What is the run cadence? (scheduled too frequently?)\n2. Does the workflow use cheap triage before escalating to the frontier model?\n3. Is batching or caching applicable to reduce run frequency?\n4. Are there noop early-exits for events that do not require agent action?\n\n### `max-tool-denials` exceeded\n\nThe Copilot SDK hit the tool-denial threshold, indicating the prompt attempted actions outside the allowed tool policy.\n\nPriority checks:\n1. What tool was repeatedly denied? (last denied reason in the failure issue)\n2. Is the tool missing from the workflow's permissions\u002Ffirewall config?\n3. Can the prompt be revised to avoid the denied operation entirely?\n4. Would a DataOps pre-step satisfy the data need without a tool call?\n\n### Timeout \u002F `max-turns` exceeded\n\nThe agent ran out of time or turns before completing the task.\n\nPriority checks:\n1. Is the task decomposable into smaller, faster sub-tasks?\n2. Are there long-running tool calls that could be replaced with DataOps pre-steps?\n3. Is the prompt asking the agent to do too much in one run?\n4. Can `max-turns` or `timeout-minutes` be raised, or should the task be split?\n\n## Optimization Analysis Plan\n\nAfter measuring token usage, produce a prioritized plan:\n\n1. **Measure** — run `gh aw audit \u003Crun-id> --json` and summarize AI Credits and per-call token breakdown\n2. **Diagnose the harness** — classify failures across context assembly, tool interaction, generation control, orchestration, memory management, and output processing\n3. **Identify top cost drivers** — list the three most expensive phases\u002Ftool calls\n4. **Apply quick wins first** — DataOps pre-steps, `gh-proxy`, `cli-proxy`, prompt trimming\n5. **Sub-agent delegation** — identify repetitive per-item loops suitable for small-model workers\n6. **Reuse execution experience** — preserve compact task features, configuration deltas, outcomes, costs, and diagnoses in `cache-memory` when cross-run reuse is useful; apply relevant recurring patterns to similar cases\n7. **Prompt caching** — verify stable instructions and reusable experience appear before dynamic content\n8. **Experiment correctness first** — add an `experiments:` entry, compare output quality first, and use `metric: \"aic\"` to choose among equivalent-quality variants\n9. **Validate quality** — confirm the optimized run produces equivalent safe outputs\n\nPresent the plan clearly before making any edits. Confirm with the user before applying changes.\n\n## Editing Workflow\n\n1. Edit `.github\u002Fworkflows\u002F\u003Cworkflow-name>.md`\n2. Recompile: `gh aw compile \u003Cworkflow-name>`\n3. Commit both the source and the generated `.lock.yml`\n4. Report the estimated savings and link to the PR or commit\n",{"name":5,"description":7},"main","8541229759617347888641eba917d3b0ad66a984",".github\u002Fskills\u002Foptimize-agentic-workflow",626,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw","https:\u002F\u002Fgh.io\u002Fgh-aw","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 06:45:15",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add github\u002Fgh-aw --skill optimize-agentic-workflow",{"tool":60,"command":61},"bunx","bunx skills add github\u002Fgh-aw --skill optimize-agentic-workflow",{"tool":63,"command":64},"pnpm","pnpm dlx skills add github\u002Fgh-aw --skill optimize-agentic-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Foptimize-agentic-workflow\u002FSKILL.md",true,[68,74,78],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fdescribe_pr_final_answer.md","REFERENCE","参考文档",421,"https:\u002F\u002Fgithub.com\u002Ffeniix\u002Fdotfiles\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fvisual-pr\u002Freferences\u002Fdescribe_pr_final_answer.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fpr_description_template.md",1979,"https:\u002F\u002Fgithub.com\u002Ffeniix\u002Fdotfiles\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fvisual-pr\u002Freferences\u002Fpr_description_template.md",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fshow-me.md",3039,"https:\u002F\u002Fgithub.com\u002Ffeniix\u002Fdotfiles\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fvisual-pr\u002Freferences\u002Fshow-me.md",[83,91,99,121,139,164],{"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":90},"01M7DQYVZ9W9DDXKQ9452SNP8J","cracktro","Edit, preview, and verify the standalone interactive talk deck in docs\u002Fpublic\u002Fcracktro (slides, SVG diagrams, transitions, WebAudio sound).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcracktro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M7612HQ4378TK8QZ5HPAF4KR","create-connector","Create or extend a declaration-only third-party connector, with narrow reads, separate safe outputs, optional protected triggers, and offline conformance evidence.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcreate-connector\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":109,"publishedAt":39},"01M6ADC942STTXHFV410J4DH0X","GitHub Agentic Workflows","GitHub Agentic Workflows (`gh-aw`) is a GitHub CLI extension for writing Agentic Workflows in markdown and compiling them to GitHub Actions.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002FSKILL.md",[105,108],{"categoryNo":106,"categoryName":107,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[9,110,30,29,24,111,112,113,114,115,116,117,118,119,120],"github agentic workflows","extension","markdown","github cli","cli","gh","for","compiling","writing","github actions","actions",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":39},"01M6ADC6ZXSA46N9XD6VNAP1MS","windows-compatibility","Cross-platform path handling and command patterns","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fwindows-compatibility\u002FSKILL.md",[],[128,129,130,131,132,133,134,135,136,137,138],"windows","windows compatibility","compatibility","command","git","bugs","platform","high","patterns","cross-platform","path",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":39},"01M6ADC44957SVQF96R5YY247P","versioning-policy","Semver versioning rules for Squad SDK and CLI — prevents prerelease version incidents","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fversioning-policy\u002FSKILL.md",[],[146,147,148,149,150,114,151,152,153,154,155,156,157,158,116,159,160,161,162,163],"versioning","policy","versioning policy","gate","implementation","workspace","pr","sdk","release","ci","npm","semver","squad","incident","incidents","Rules","version","resolution",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":174,"publishedAt":39},"01M6ADC1PHMEAEVR87F8PDR89X","tiered-memory","Three-tier agent memory model (hot\u002Fcold\u002Fwiki) for context reduction per spawn","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Ftiered-memory\u002FSKILL.md",[170,173],{"categoryNo":171,"categoryName":172,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[175,176,177,178,179,180,181,182,183,184,185,186,187,116,188,189],"tiered memory","memory","performance","design","agent memory","proposal","cold","model","wiki","spawn","memory-management","context","three","runtime","management"]