AGENT SKILL

duck

Configure Duck AI pre-commit guardrails for a repository. Use when adding or tuning duck.yaml rules, choosing OpenAI-compatible/Claude/Codex providers, or helping an agent avoid committing sloppy generated code.

License 许可
MIT
最近更新
2026-05-20
Stars
★ 0
Forks
0

01 前言 Front Matter

name
duck
description
Configure Duck AI pre-commit guardrails for a repository. Use when adding or tuning duck.yaml rules, choosing OpenAI-compatible/Claude/Codex providers, or helping an agent avoid committing sloppy generated code.

02 资源文件 3

03 SKILL.md 正文

Duck

Duck is an AI pre-commit hook. It checks the staged git diff against plain-language rules in duck.yaml and blocks commits on high-confidence failures. This skill is intentionally small and compatible with the skills.sh directory format.

When configuring Duck

  1. Keep duck.yaml small.
  2. Write rules as concrete fail conditions.
  3. Prefer provider.type: claude or provider.type: codex when the user's machine already has those CLIs authenticated.
  4. Prefer provider.type: openai-compatible for API endpoints, hosted GPUs, OpenAI-compatible gateways, or CI.
  5. Never put API keys in duck.yaml; use apiKeyEnv and .env.

Example configs

See:

  • scripts/openai-compatible.yaml
  • scripts/claude.yaml
  • scripts/codex.yaml

Validate

After changing Duck config, run:

git add .
duck check

Expected output is either duck: pass with one [pass] per rule, or duck: fail with file/line reasons.

04 同仓库更多 Skills