codex-prompt-engineering

📁 williamhallatt/cogworks 📅 4 days ago
4
总安装量
4
周安装量
#47880
全站排名
安装命令
npx skills add https://github.com/williamhallatt/cogworks --skill codex-prompt-engineering

Agent 安装分布

opencode 4
claude-code 4
github-copilot 4
codex 4
kimi-cli 4
gemini-cli 4

Skill 文档

Codex Prompt Engineering

Knowledge snapshot: 2026-02-20

Purpose

Use this skill to design or review prompts for Codex/GPT coding agents with focus on:

  • quality and reliability
  • token efficiency
  • correct tool usage
  • safe autonomy

Use When

  • Writing or revising system prompts for coding agents
  • Debugging weak agent behavior (stalling, verbosity, bad tool calls)
  • Calibrating reasoning_effort (none|low|medium|high|xhigh)
  • Defining tool orchestration and planning behaviors
  • Building evaluation loops for prompt iteration

Core Rules

  1. Calibrate reasoning effort
  • none or omit for trivial formatting/retrieval
  • medium default for interactive coding
  • high/xhigh for complex autonomous tasks
  1. Run end-to-end autonomously
  • gather context -> plan -> implement -> test -> refine
  • ask only for ambiguity, destructive actions, or major architecture trade-offs
  1. Use correct tool contracts
  • file edits: apply_patch
  • shell execution: exec_command
  • task tracking: update_plan with plan: [{step, status}]
  • batch independent calls with multi_tool_use.parallel
  1. Keep communication compact
  • tiny change: 2-5 sentences
  • medium change: <=6 bullets
  • large change: per-file summary + rationale
  1. Evaluate systematically
  • Analyze -> Measure -> Improve -> Repeat
  • keep graders and representative datasets
  1. Apply security basics
  • validate/sanitize untrusted inputs
  • defend against direct/indirect prompt injection
  • enforce least privilege for tools/data

Runtime Mapping Note

Some environments expose shell tools under different names. In this repository runtime:

  • use exec_command (not shell_command)
  • use update_plan schema: plan with step/status

File Guide

  • reference.md: compact canonical guidance and checklists
  • patterns.md: reusable patterns beyond prompt engineering
  • examples.md: concise before/after examples with correct contracts

Invocation

Use codex-prompt-engineering to review this prompt for quality and token efficiency.