一键导入
optimize-agentic-workflow
Analyze and reduce token consumption in agentic workflows — guardrail-specific entry points, measurement, and optimization techniques.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze and reduce token consumption in agentic workflows — guardrail-specific entry points, measurement, and optimization techniques.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | optimize-agentic-workflow |
| description | Analyze and reduce token consumption in agentic workflows — guardrail-specific entry points, measurement, and optimization techniques. |
Help users reduce the AI token usage and cost of GitHub Agentic Workflows in this repository.
Load these files from github/gh-aw (they are not available locally).
.github/aw/github-agentic-workflows.md.github/aw/token-optimization.md.github/aw/workflow-editing.md.github/aw/syntax.mdLoad these only when relevant:
.github/aw/experiments.md.github/aw/safe-outputs.mdgh aw audit <run-id> --json
gh aw audit <base-run-id> <optimized-run-id>
gh aw logs <workflow-name> --json
gh aw compile <workflow-name>
gh aw status
Ask for one of these inputs:
If the user gives a GitHub Actions run URL:
gh aw audit <run-id> --jsonagent_usage.aic, agent_usage.input_tokens, agent_usage.output_tokens, agent_usage.cache_read_tokensmax-ai-credits exceededThe workflow was stopped because it consumed more AI Credits than the configured per-run budget.
Priority checks:
token-usage.jsonl)max-daily-ai-credits exceededThe workflow is being blocked because its 24-hour AI Credits budget is exhausted.
Priority checks:
max-tool-denials exceededThe Copilot SDK hit the tool-denial threshold, indicating the prompt attempted actions outside the allowed tool policy.
Priority checks:
max-turns exceededThe agent ran out of time or turns before completing the task.
Priority checks:
max-turns or timeout-minutes be raised, or should the task be split?After measuring token usage, produce a prioritized plan:
gh aw audit <run-id> --json and summarize AI Credits and per-call token breakdowngh-proxy, cli-proxy, prompt trimmingexperiments: entry with metric: "aic" to measure the changePresent the plan clearly before making any edits. Confirm with the user before applying changes.
.github/workflows/<workflow-name>.mdgh aw compile <workflow-name>.lock.ymlConversational skill that interviews users to design new agentic workflows
Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
Implement secret-safe HTTP headers for MCP transport in gh-aw.
Review code that performs git or gh operations against repository checkouts in gh-aw, checking that the right credentials are available at the right time and that sparseness, shallowness and credential-free factors are properly considered.
Teach Copilot how to plan, address, and respond to pull request review feedback.
Query GitHub pull requests with jq filtering and reusable selectors.