Agent skill

Pi Goal Writer

by Michaelliv in Michaelliv/pi-goal

Drafts and reviews /goal prompts for long-running autonomous agents, turning a vague request into a completion contract with outcome, evidence, constraints and a stop condition.

MITAuto-check passedAgent Workflows

Install Pi Goal Writer

skills CLI
$ npx skills add Michaelliv/pi-goal --skill pi-goal-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Michaelliv/pi-goal pi-goal-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Michaelliv/pi-goal.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pi-goal-writer .claude/skills/pi-goal-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pi-goal-writer
GitHub stars
228
Token cost
~1.7k tokens
SKILL.md length
640 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Drafts and reviews /goal prompts for long-running autonomous agents, turning a vague request into a completion contract with outcome, evidence, constraints and a stop condition.

  • Works in 6 steps: Outcome — what must be true when the… → Verification surface — tests, commands,… → Constraints — what must not regress or… → …
  • Writing a /goal prompt for a long-running autonomous agent
  • SKILL.md covers Purpose, Core rule, Workflow and Goal template, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

A goal differs from an ordinary prompt because the agent keeps using it to decide what to do next and whether it can honestly stop, so the skill insists a strong goal names six parts: the outcome that must be true when done, a verification surface such as tests, commands or a diff audit, constraints that must not regress, boundaries on which files or tools may be touched, an iteration policy for choosing the next action, and a blocked stop condition for when to halt honestly with evidence rather than drift. It refuses to produce a vague goal like make this better or finish the feature, turning the user's rough intent into something with auditable completion criteria instead.

The workflow defaults to writing a Pi-compatible /goal command, reusable in Codex Goal mode, and gathers context from the relevant repository, issue, test suite or PR before drafting rather than inventing a verification surface; it asks at most three clarifying questions, only when missing information would change the goal's contract. For high-stakes or ambiguous work it offers two versions, a narrower safer goal and a broader one that delegates more discovery, with a recommendation between them.

When your agent uses it

  • Writing a /goal prompt for a long-running autonomous agent
  • Reviewing or auditing an existing goal for missing success criteria
  • Turning a vague request like finish the feature into a completion contract

Example prompts

  • “Write a /goal command to get this flaky test suite green, with a clear stop condition.”
  • “Audit this goal I wrote and tell me what's missing from its six parts.”
  • “Draft two goal options for this refactor, one narrow and one broader.”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Outcome — what must be true when the work is done.
  2. Verification surface — tests, commands, benchmark output, report, artifact, diff audit, PR state, screenshots, logs, or other concrete…
  3. Constraints — what must not regress or be changed.
  4. Boundaries — files, directories, tools, systems, data sources, or permissions the agent may or may not use.
  5. Iteration policy — how the agent should choose the next action after each attempt.
  6. Blocked stop condition — when the agent should stop honestly, with evidence and the next needed input, instead of continuing blindly.

What it can do on your machine

Read from SKILL.md and the folder at commit 3f100be. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pi Goal Writer loads about 1.7k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 640 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Michaelliv/pi-goal at commit 3f100be, republished under its MIT licence (© Michaelliv). 640 words, ~1,716 tokens.

Download SKILL.mdSave it as .claude/skills/pi-goal-writer/SKILL.md (or your agent's skills folder).
name
pi-goal-writer
description
Drafts and reviews strong /goal objectives for Pi pi-goal and compatible goal-mode agents. Use when the user asks to write, improve, audit, or meta-prompt a long-running agent goal with clear success criteria, verification, constraints, iteration policy, and blocked stop conditions.

Pi Goal Writer

Purpose

Write /goal prompts that are fit for persistent autonomous work. A goal is not a bigger ordinary prompt; it is a completion contract. The agent will keep using it to decide what to do next and whether it can honestly stop, so the goal must define the desired end state, the evidence that proves it, the constraints that must remain true, and when to stop as blocked instead of drifting.

Use this skill for Pi pi-goal first. The same goal-writing principles also apply to Codex Goal mode and compatible /goal workflows.

Core rule

Never produce a vague goal such as “make this better,” “finish the feature,” or “improve the codebase.” Turn the user’s rough intent into a goal with auditable completion criteria.

A strong goal includes six parts:

  1. Outcome — what must be true when the work is done.
  2. Verification surface — tests, commands, benchmark output, report, artifact, diff audit, PR state, screenshots, logs, or other concrete evidence.
  3. Constraints — what must not regress or be changed.
  4. Boundaries — files, directories, tools, systems, data sources, or permissions the agent may or may not use.
  5. Iteration policy — how the agent should choose the next action after each attempt.
  6. Blocked stop condition — when the agent should stop honestly, with evidence and the next needed input, instead of continuing blindly.

Workflow

  1. Default to Pi pi-goal. Write a Pi-compatible /goal command unless the user explicitly asks for another harness. The goal body can usually be reused in Codex Goal mode; Pi also supports optional token budgets such as /goal --tokens 50k ....
  2. Gather context before drafting when the task depends on a repository, issue, test suite, benchmark, PR, design, or external documentation. Read the relevant files or sources instead of inventing the verification surface.
  3. Ask at most three clarifying questions only when missing information changes the goal contract. Prefer making safe assumptions explicit when the user is trying to move quickly.
  4. Draft the goal as a single pasteable command, then include a short rationale or checklist showing how the six parts are covered.
  5. For high-stakes or ambiguous work, provide two options: a narrower goal that is safer to execute and a broader goal that delegates more discovery to the agent. Recommend one.
Show full SKILL.md (262 more words)Show less

Goal template

Use this shape unless the user asks for a different format:

text
/goal <desired end state>, verified by <specific evidence>, while preserving <constraints>. Use <allowed inputs/tools/scope> and avoid <forbidden scope>. Between iterations, <how to choose the next best action and what to re-check>. If blocked or no defensible path remains, stop with <evidence gathered, attempted paths, blocker, and next input needed>.

For Pi token budgets:

text
/goal --tokens 50k <same goal contract>

Writing standards

Make the goal self-contained. It should survive context compaction and continuation turns. Include exact command names when known, but do not invent commands. Say “run the relevant project checks identified in AGENTS.md/package scripts” only when exact commands are unknown and the agent can inspect them.

Make completion evidence-based. The goal should require the agent to inspect real artifacts before declaring success: files changed, tests passed, benchmark numbers, rendered screenshots, logs, PR checks, or a written audit. Do not let “tests pass” be the only evidence unless the tests actually cover every requirement.

Bound the scope. Name excluded directories or behaviors when important, such as “do not rewrite CLI user-facing output,” “do not change public API behavior,” or “do not touch generated files except via the generator.”

Preserve honesty under uncertainty. If evidence may be unavailable, require a final report that separates confirmed findings, approximate/proxy evidence, blocked claims, and remaining uncertainty.

Prefer concrete stop language: “If blocked, stop with the exact blocker and what would unlock progress.” Avoid weak endings like “do your best.”

Review checklist

Before returning a goal, verify it answers:

  • Can the agent tell when it is done?
  • Can the user independently audit that completion claim?
  • Are regressions and forbidden approaches named?
  • Does the goal allow iteration without inviting unlimited drift?
  • Does it define what to do when tests, credentials, network, data, or product decisions block progress?
  • Is it pasteable as one /goal command?

Examples

Weak:

text
/goal improve logging

Strong:

text
/goal Implement structured runtime logging, verified by targeted logger tests, the full project check/type/test suite, and final audits showing no production console.* calls outside approved CLI/UI/logger-sink exceptions. Preserve existing operator-visible console behavior, avoid logging secrets or credentials, and keep the logger generic rather than error-only. Between iterations, inspect the diff and audit remaining catch paths before deciding the next change. If blocked, stop with the unverified requirement, evidence gathered, and the next input needed.

Weak:

text
/goal fix flaky checkout test

Strong:

text
/goal Diagnose and either fix or conclusively characterize the flaky checkout test, verified by a reliable local reproduction or an evidence-backed failure analysis plus the relevant test command passing when a fix is made. Preserve public checkout behavior and avoid broad timing hacks unless the evidence shows timing is the root cause. Between iterations, record the hypothesis tested, command output, and next most likely cause. If the flake cannot be reproduced or no safe fix remains, stop with attempted reproductions, logs, suspected causes, and the missing evidence needed.

Weak:

text
/goal reproduce this paper

Strong:

text
/goal Produce the strongest evidence-backed reproduction of the paper using available local resources, verified by a final claim-by-claim report and any generated artifacts or runnable checks. Attempt the headline results where feasible, label approximate reconstructions separately from exact reproductions, and do not overclaim missing seeds, checkpoints, datasets, or implementation details. Between iterations, map claims to available evidence and prioritize the highest-value verifiable claim. If exact reproduction is blocked, stop with confirmed claims, proxy evidence, blocked claims, and the specific missing materials.

© Michaelliv, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pi-goal-writer of Michaelliv/pi-goal.

Open the folder on GitHubat commit 3f100be

Compare with similar skills

Pi Goal Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pi Goal Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pi Goal Writer this skillMichaelliv/pi-goal228—~1.7kAutomated safety check: PassMIT
AutopilotYeachan-Heo/oh-my-claudecode40k—~4.4kAutomated safety check: PassMIT
PRP Loop: Autonomous PipelineWirasm/prp2.3k—~863Automated safety check: PassMIT
Ultragoal Multi-Goal LedgerYeachan-Heo/gajae-code2.9k—~8.4kAutomated safety check: PassMIT
Spektacular Plan Implementationjumppad-labs/jumppad263—~1.8kAutomated safety check: PassMPL-2.0
Goal Objective DrafterQwenLM/qwen-code28k—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Autopilot

    Yeachan-Heo/oh-my-claudecode

    Takes a short product idea through requirements, design, planning, parallel implementation, QA cycles and multi-reviewer validation to produce working code.

    40k GitHub stars~4.4k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Runs a detached, resumable loop that plans, implements, opens a PR, reviews and fixes a feature across headless CLI sessions until the review is clean.

    2.3k GitHub stars~863 tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Ultragoal Multi-Goal Ledger

    Yeachan-Heo/gajae-code

    Breaks a brief into ordered goals, keeps a durable ledger under .omc/ultragoal and prints handoff text so a Claude /goal run survives session restarts.

    2.9k GitHub stars~8.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Executes an approved plan step by step through the spektacular CLI, which acts as the state machine, producing code, tests and a changelog.

    263 GitHub stars~1.8k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Goal Objective Drafter

    QwenLM/qwen-code

    Turns a vague intention into a /goal objective with one outcome, numbered yes-or-no checks, guardrails, a budget and a block protocol, without starting the work.

    28k GitHub stars~3.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Handoff

    anombyte93/prd-taskmaster

    Phase 3 of the prd-taskmaster pipeline: smart mode selection and user handoff.

    605 GitHub stars~5k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

Categories

Questions about Pi Goal Writer

What does Pi Goal Writer do?

Drafts and reviews /goal prompts for long-running autonomous agents, turning a vague request into a completion contract with outcome, evidence, constraints and a stop condition. A goal differs from an ordinary prompt because the agent keeps using it to decide what to do next and whether it can honestly stop, so the skill insists a strong goal names six parts: the outcome that must be true when done, a verification surface such as tests, commands or a diff audit, constraints that must not regress, boundaries on which files or tools may be touched, an iteration policy for choosing the next action, and a blocked stop condition for when to halt honestly with evidence rather than drift. It refuses to produce a vague goal like make this better or finish the feature, turning the user's rough intent into something with auditable completion criteria instead.

When should I use Pi Goal Writer?

Pi Goal Writer fits situations like: writing a /goal prompt for a long-running autonomous agent; reviewing or auditing an existing goal for missing success criteria; turning a vague request like finish the feature into a completion contract.

How do I install Pi Goal Writer in Claude Code?

Run `npx skills add Michaelliv/pi-goal --skill pi-goal-writer -a claude-code`. Or copy the skill folder (skills/pi-goal-writer in Michaelliv/pi-goal) into .claude/skills/pi-goal-writer in your project. Claude Code loads it when a task matches its description.

How do I install Pi Goal Writer in Codex?

Run `npx skills add Michaelliv/pi-goal --skill pi-goal-writer -a codex`. Or copy the skill folder (skills/pi-goal-writer in Michaelliv/pi-goal) into .agents/skills/pi-goal-writer in your project. Codex loads it when a task matches its description.

Can I use Pi Goal Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Michaelliv/pi-goal --skill pi-goal-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pi-goal-writer, .gemini/skills/pi-goal-writer, .github/skills/pi-goal-writer and .opencode/skills/pi-goal-writer in your project.

What does Pi Goal Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: Pi Goal Writer is instructions for the agent only.

Does Pi Goal Writer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pi Goal Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pi Goal Writer use?

Pi Goal Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pi Goal Writer use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pi Goal Writer?

Skills that share tags, products or a category with Pi Goal Writer: Autopilot (Yeachan-Heo/oh-my-claudecode, 40k stars), PRP Loop: Autonomous Pipeline (Wirasm/prp, 2.3k stars), Ultragoal Multi-Goal Ledger (Yeachan-Heo/gajae-code, 2.9k stars) and Spektacular Plan Implementation (jumppad-labs/jumppad, 263 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pi Goal Writer?

Michaelliv (a GitHub user) maintains it in Michaelliv/pi-goal, which has 228 GitHub stars. The repository was last updated on June 21, 2026.

Source: Michaelliv/pi-goal on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.