跳到正文
cccskills
免费在 GitHub 公开

harness-sdk-protocol

Use for reusable harness sdk protocol recipes in software and coding-agent work.

中文简介正在准备中。当前显示原文说明。

集成工具OpenAI
查看安装方法

包含的文件(1)

  • SKILL.md5.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Harness, SDK & wire protocol — recipes (generic tier)

On-demand recipes (3). Trigger→action heuristics; pull the relevant one when its situation arises.

1. Shadow-run an LLM controller and cap its call cadence before granting live control; verify every producing state calls the hook

generic · ⚠ session-derived, unverified

Before granting an LLM controller live authority in any agentic system, shadow-run its full decision loop (build context -> ask model -> validate -> log accept/reject -> compare to the existing deterministic baseline -> aggregate metrics) WITHOUT letting it take action, to confirm it picks legal/valid/safe choices. Add per-controller cadence control (fire the model only every N steps) FIRST: an unthrottled heuristic shadow produced 8,000+ decisions in one short run, and a real model on that path would issue thousands of API calls. NEGATIVE: 'wire the LLM in' can be a misnomer -- an action the LLM is supposed to own may still be decided deterministically (an executor translated intents into actions, but the controller never asked the LLM and made them itself). When delegating a decision class to an LLM, check EVERY state that can produce that action, not just the obvious entry point, and verify the hook actually fires with a trace; triage formatting glitches (malformed/concatenated output) separately from call success -- they are a prompt/sanitization bug distinct from whether the call worked. <sub>sources: codex:019e131a-1bb0-7400-b54a-f208202b291d, claude-code:aae25940-ade3-41bc-b817-517dc86ccebf, codex:019e14a5-e574-7770-953b-17019f2f5e74</sub>

2. Build one env-driven LLM provider abstraction; force structured output via per-kind tool definitions; use canonical OpenRouter model IDs

generic · native LLM client contract

Factor the LLM provider behind an interface early so models/providers swap without touching game logic (a monolithic ~4720-line bot was hard to evolve; its successor split into chat/llm/llm_dispatch/llm_provider/types and generalized a single OpenAI client into a multi-provider Anthropic Messages/OpenAI Chat one). Use the same native client boundary for advisor, analyst, and editor calls. Hosted clients read COWORLD_LLM_ENDPOINT and use placeholder credentials; local clients use OPENROUTER_API_KEY. Prefer provider-level structured output (register one output schema per call kind as a provider tool/function definition with tool_choice set to it, translating one Anthropic input_schema into the OpenAI function.parameters shape) over schema-in-prompt, keeping prompt-embedded hints only as fallback. Implement the native Messages tool-use loop as append-assistant-content -> execute tool calls -> append results as a user turn -> repeat to a max_rounds cap, returning token-usage totals for cost budgeting. Default the small game-control model to claude-haiku-4-5 (temp 0.2, max ~512 tokens, ~12s timeout), honoring fallback env vars COGAMES_LLM_MODEL/ANTHROPIC_SMALL_FAST_MODEL/ANTHROPIC_MODEL. Verify platform capability claims against docs/code before designing around an assumed limitation (an agent wrongly assumed LLMs couldn't run in the cogames tournament; API keys CAN be passed as runtime secrets so in-process LLM calls ARE supported). For vision-language calls a 1x1 PNG was rejected ('Could not process image') while 64x64 succeeded, and cache paid vision-inference on a content key (frame plus request) so reruns with a fresh run_id reuse prior labels -- spend-idempotency keys to inputs, not run identity. Use a native SDK wrapper when a compiled core needs HTTP inference; keep provider credentials outside hosted player code. <sub>sources: opencode:ses_219efd206ffe6azQSiSZsvnxX4, opencode:ses_21e58aef7ffeoJ7uZeDgGBCfIh, opencode:ses_21f89f53effe65xlVIKX1hvVv3, codex:019e13e1-e883-7fe0-93b4-54adeac75285 (+6)</sub>

3. Invoke Claude Code and Codex non-interactively from scripts

generic

To invoke Claude Code non-interactively, run claude -p "<prompt>" (processes the prompt, prints to stdout, exits); add --allowedTools "Read,Edit,Bash" to pre-approve tools (granular patterns like "Bash(git *)"), --add-dir <path> for access outside the cwd, --bare to skip hooks/plugins/CLAUDE.md/memory for deterministic side-effect-free runs, and --output-format json for structured output (result, session_id, usage, total_cost_usd); piped stdin is capped at 10MB. To invoke Codex non-interactively, use codex exec "<prompt>" (alias e): set the working dir with -C <dir>, write permissions with -s <mode> (read-only default / workspace-write / danger-full-access), --skip-git-repo-check (Codex requires a git repo by default), --ephemeral to avoid persisting sessions; the final message goes to stdout and progress to stderr, -o <file> writes the final message, --json gives a JSONL event stream. NEGATIVE: when Codex is authenticated via a ChatGPT account rather than an API key, model selection is limited to the account tier and requesting an unsupported model (e.g. o4-mini) returns 400; supplying CODEX_API_KEY unlocks the full roster. <sub>sources: players_checkouts/players/tools/cogbase/docs/cli_runners.md</sub>

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use for reusable ab methodology recipes in software and coding-agent work.

中文简介正在准备中。当前显示原文说明。

Metta-AI/coworld172026年10月14日 更新

Use for ab methodology recipes in scripted Coworld policy optimization.

中文简介正在准备中。当前显示原文说明。

Metta-AI/coworld172026年10月14日 更新

Use for ab methodology recipes when optimizing a Coworld player.

中文简介正在准备中。当前显示原文说明。

Metta-AI/coworld172026年10月14日 更新

Use for Crewrift-specific ab methodology recipes when optimizing a player.

中文简介正在准备中。当前显示原文说明。

Metta-AI/coworld172026年10月14日 更新

Use for agent workflow collab recipes in scripted Coworld policy optimization.

中文简介正在准备中。当前显示原文说明。

Metta-AI/coworld172026年10月14日 更新

Use for agent workflow collab recipes when optimizing a Coworld player.

中文简介正在准备中。当前显示原文说明。

Metta-AI/coworld172026年10月14日 更新

查看 Metta-AI 的全部技能

报告此技能的问题