Skip to content
Back to skills

Goal

ASecurity

Fix until a check command passes, with a fresh Claude context per attempt (port of pi's /goal). Runs `claude-goal`, which starts a new `claude -p` for each attempt and feeds it only the goal and the failure tail. Use when asked to "keep fixing until the tests pass", "loop until <command> passes", "/goal <check> :: <goal>", or "/goal-stop".

  • 6 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
toolsgobash

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add gbencke/dotfiles --skill goal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Goal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Goal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gbencke-goal/badge)](https://www.skillsdirectory.com/skills/gbencke-goal)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: goal
description: Fix until a check command passes, with a fresh Claude context per attempt (port of pi's /goal). Runs `claude-goal`, which starts a new `claude -p` for each attempt and feeds it only the goal and the failure tail. Use when asked to "keep fixing until the tests pass", "loop until <command> passes", "/goal <check> :: <goal>", or "/goal-stop".
---

# goal — fix until a check passes

Port of pi's goal-loop. Each attempt is a new `claude -p` process. A failed attempt passes on only the goal and the last 4000 characters of the check output, never its own reasoning.

## Start

Parse the arguments as `<check command> :: <goal>`. The goal is optional. Run from the repo root, in the background:

```bash
nohup claude-goal "<check command>" "<goal>" > .claude-goal.log 2>&1 &
```

Then tail `.claude-goal.log` with a timeout and report progress. Lines from the loop start with `[claude-goal]`.

- Do not fix the code yourself in this session. The loop does the work.
- Do not edit, skip, or weaken the check.

## Stop

`/goal-stop`: run `touch .claude-goal-stop` in the repo root. The loop exits after the current attempt.

## Settings (environment)

| Variable               | Default            | Meaning                                    |
| ---------------------- | ------------------ | ------------------------------------------ |
| `GOAL_MAX_ATTEMPTS`    | `8`                | Attempts before giving up                  |
| `GOAL_TAIL_CHARS`      | `4000`             | Characters of failure output passed on     |
| `GOAL_CHECK_TIMEOUT`   | `900`              | Seconds the check may run                  |
| `GOAL_PERMISSION_MODE` | (from settings)    | `--permission-mode` for each `claude -p`   |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.