write-goal
Turn the prompt supplied with this skill into a concise, auditable Codex Goal or explain why a Goal is not the right fit. Use when the user asks to draft, formulate, rewrite, tighten, or create a `/goal` from a plain-language task, especially for multi-step work that needs a durable objective, evidence-based completion, constraints, iteration policy, and a default adversarial review loop.
What this skill does
# Write Goal ## Overview Turn the user's request into a compact Codex Goal that can guide continued work until the evidence says it is done. Draft the goal; do not activate it unless the user explicitly asks you to start or set the Goal. ## Workflow 1. Extract the actual task from the prompt that invoked this skill. Ignore the skill mention itself. 2. Decide whether a Goal is appropriate. Use a Goal for durable, multi-step work with an auditable finish line. For one-line edits, simple explanations, or vague improvement requests without a checkable end state, say that a normal prompt is a better fit and offer the closest tightened prompt instead. 3. Draft one Goal that includes: - outcome: what must be true when finished - verification surface: tests, commands, artifacts, logs, benchmarks, source evidence, or review output that proves it - constraints: behavior, scope, public APIs, files, style, budget, or safety limits that must remain intact - boundaries: allowed repos, files, tools, data, and resources - iteration policy: how Codex should choose the next action after each result - blocked stop condition: when to stop and what evidence, attempted paths, blocker, and needed input to report 4. Keep it as short as the evidence contract allows. Prefer one compact paragraph. Do not list every component if the sentence already carries it. 5. Include the default adversarial review loop unless the user explicitly opts out. 6. If required details are missing, make conservative assumptions inline. Ask only when missing information would make the Goal unsafe or impossible to verify. ## Task Fit - Coding or refactoring: name the behavior or code state, the relevant tests or build commands, the scope boundary, and what must not regress. - Debugging or flaky tests: include reproduction evidence, focused verification, regression checks, and the point where missing evidence becomes a blocker. - Research or audits: require a claim inventory, evidence mapping, confidence labels, and a final report that separates confirmed, supported, blocked, and uncertain claims. - Docs or content: name the artifact, reader outcome, source-of-truth checks, build or link checks, and terminology constraints. - Vague requests: narrow the task with explicit assumptions if there is a plausible evidence surface. If there is not, return a tightened normal prompt instead of a Goal. - One-off tasks: do not force a Goal. Say it is better as a normal prompt and provide that prompt. ## Review Loop Use this default unless the user opts out: ```text Before completion, adversarially review the result against this Goal, classify findings by severity, and resolve all medium, high, and critical findings. After a review has no medium-or-above findings, run one more adversarial review to catch anything the prior review missed. Mark the Goal complete only after two consecutive adversarial reviews have no medium-or-above findings. If the follow-up review finds any medium-or-above issue, resolve it and restart the two-clean-review requirement. ``` Treat severity as impact on the Goal: - Critical or high: the objective is not met, evidence is false or missing, scope is unsafe, or the result likely regresses a stated constraint. - Medium: the result may pass superficially but leaves a meaningful gap in evidence, scope, maintainability, or user-facing quality. - Low: polish, wording, or optional improvements that do not block completion. ## Goal Shape Prefer this shape: ```text /goal <desired end state>, verified by <specific evidence>, while preserving <constraints>. Use <allowed inputs, tools, files, and boundaries>. Between iterations, <how to inspect results and choose the next best action>. Before completion, adversarially review the result against this Goal, classify findings by severity, and resolve all medium, high, and critical findings. After a clean review, run one more adversarial review; complete only after two consecutive reviews have no medium-or-above findings. If blocked or no defensible path remains, stop with the attempted paths, evidence gathered, unresolved findings, blocker, and next input needed. ``` Keep the final Goal narrow enough to audit but broad enough to let Codex choose the next action. Do not prescribe every implementation step unless the user already did. ## Output Return: 1. `Recommended Goal`: a single ready-to-use `/goal ...` block. 2. `Assumptions`: only if you filled gaps that matter. 3. `Why This Works`: only when useful or requested; one or two short bullets naming the evidence surface and review loop. If a Goal is not appropriate, return: 1. `Better As A Prompt`: a concise normal prompt. 2. `Why Not A Goal`: one sentence explaining the missing durable objective or verification surface. Keep the answer concise. The user came for the Goal, not a lecture about Goals. ## Examples User prompt: ```text Use $write-goal to turn this into a Goal: keep working on this flaky checkout test until it is fixed or we know exactly why it cannot be fixed. ``` Output: Recommended Goal: ```text /goal Make the flaky checkout test pass reliably on the current branch, verified by reproducing the failure when possible and then passing the focused checkout test repeatedly plus the relevant correctness suite, while preserving public checkout behavior and existing test coverage. Use the checkout code, related fixtures, test logs, and local test commands. Between iterations, inspect the latest failure evidence, make the smallest defensible change, rerun focused verification, and update the hypothesis. Before completion, adversarially review the result against this Goal, classify findings by severity, and resolve all medium, high, and critical findings. After a clean review, run one more adversarial review; complete only after two consecutive reviews have no medium-or-above findings. If the failure cannot be reproduced or no valid path remains, stop with attempted reproductions, evidence gathered, unresolved findings, blocker, and the next input needed. ``` User prompt: ```text Use $write-goal: improve the docs for Goals. ``` Output: Recommended Goal: ```text /goal Produce a clearer Goals documentation page that explains when to use Goals, the command lifecycle, and two realistic examples, verified by the local docs build and by checking that every referenced command matches current Codex behavior, while preserving existing terminology and avoiding unrelated documentation churn. Use the existing docs, current CLI behavior, and related tests or build commands. Between iterations, compare the page against the intended reader workflow, patch the highest-impact gap, and rerun relevant verification. Before completion, adversarially review the result against this Goal, classify findings by severity, and resolve all medium, high, and critical findings. After a clean review, run one more adversarial review; complete only after two consecutive reviews have no medium-or-above findings. If verification cannot run or command behavior cannot be confirmed, stop with attempted checks, evidence gathered, unresolved findings, blocker, and the next input needed. ``` User prompt: ```text Use $write-goal: explain this error message. ``` Output: Better As A Prompt: ```text Explain this error message in plain English, identify the likely cause, and suggest the next command or file to inspect. ``` Why Not A Goal: This is a one-off explanation request without a durable objective that needs continued work.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.