The argument in one line.
You can use /goal to automatically optimize, audit, and maintain your agentic OS by delegating non-technical cleanup tasks like skill consolidation, rule contradiction detection, dormant project revival, and scheduled maintenance to Claude.
Read if. Skip if.
- A builder with an existing Claude Code OS or agentic workspace who has accumulated 20+ skills, rules, or agent files and wants to automatically consolidate without manual triage.
- Someone running multiple side projects or experiments in Claude Code who needs a systematic way to revive, categorize, and prioritize dormant work without starting from scratch.
- A developer who understands prompt engineering and agentic loops and wants to see /goal applied beyond typical automation tasks like code migration or web scraping.
- You've never built or deployed a Claude Code OS or agentic system — this assumes you already have a workspace with accumulated files, rules, and skills to optimize.
- You're looking for a general introduction to /goal or want to understand the mechanics in depth — this is a five-use-case walkthrough, not a technical deep dive on how /goal's dual-agent architecture works.
- Your workspace is already lean and well-organized — the core value here is cleanup, consolidation, and revival at scale, which won't apply if you maintain minimal, curated systems.
The full version, fast.
The /goal slash command in Claude Code and Codex runs an agent in a loop with a separate judge model verifying completion, and you can point it at your own agentic operating system instead of formulaic build tasks. The mechanism is simple: write an objective under 4,000 characters, optionally pair it with a rubric file for scoring criteria, and let the dual-agent loop iterate until the judge confirms terminal state. Five practical applications cover the lifecycle: clean bloated skill folders down to essentials, sharpen individual skills against your own rubric, revive dormant half-built projects, forge new skills by mining recurring patterns from session transcripts, and maintain the system on autopilot by chaining /loop with /goal so cleanup runs every thirty minutes against a maintenance log.
Chat with this breakdown.
Modern Creator members can chat with any breakdown — ask for the hook, quote a framework, find the exact transcript moment. Unlocks at T2: refer 3 friends + add your own API key.
Create a free account →Where the time goes.

01 · Hook + Problem framing
Reframes /goal as an OS maintenance tool. Lists the three familiar agentic OS problems: bloated skills, expanding CLAUDE.md, contradicting rules.

02 · What /goal is and how it works
Goal input (<=4000 chars), primary worker agent, judge on a different model checks terminal state. Excalidraw WORKER to JUDGE to DONE? diagram shown.

03 · Demo 1: CLEAN
47 skills + 7 rules in a sandbox folder. /goal audits, consolidates, archives. Result: 47 to 17 skills, 7 to 4 rules, 3 contradictions resolved. 2m 50s.

04 · Mid-roll CTA
Early adopters community pitch.

05 · Demo 2: SHARPEN
rubric.md with 5 criteria. /goal simulates thumbnail-prompt-builder, scores vs rubric, rewrites SKILL.md, logs to ITERATION_LOG.md. Key: write your own rubric or AI grades itself easy.

06 · Demo 3: REVIVE
22 projects folder. /goal checks git log, attempts to run each, fixes deps, rewrites README, logs verdict to ALIVE.md. 18 stubs archived, 4 kept. 2m 16s.

07 · Demo 4: FORGE
50 JSONL session transcripts. /goal finds 3 recurring patterns with no skill: Excalidraw 8x, content audit 7x, LinkedIn 6x. Creates all 3 SKILL.md + SMOKE_TEST.md files.

08 · Demo 5: MAINTAIN + three autonomous modes
/loop + /goal combo. Three autonomous trigger types explained. Live demo: cron created, drifted-skill archived, contradiction resolved, MAINTENANCE_LOG.md written, loop complete on turn 1.

09 · Wrap + CTAs
Prompts in description link 2. Community link 1. Claude Code Zero-to-Hero course upsell.
Lines worth screenshotting.
- The /goal command runs a judge agent from a separate language model alongside the primary agent — every iteration is reviewed by a built-in devil's advocate.
- Pointing /goal at your own workspace and asking it to optimize itself is the meta-use: the system improving the system that runs the system.
- A CLEAN goal reduced 47 skills to 17 and 7 rule files to 4 in under three minutes — archiving removals rather than deleting them for review.
- A SHARPEN goal with a pre-written rubric forces Claude to score its own skill output against your specific criteria before accepting the revision.
- If you let AI write its own evaluation criteria, it goes easier on itself — providing the rubric prevents this gaming of the goal loop.
- A REVIVE goal sent through 22 dormant projects, filtered out hello-world placeholder repos, and triaged which ones deserved resurrection.
- A FORGE goal reads all JSONL session transcript files and mines which prompting patterns are reusable enough to be codified as new skills.
- The /loop command combined with /goal creates a scheduled maintenance cycle — the OS cleans and sharpens itself on a recurring timer.
- A /goal for non-technical tasks — optimizing markdown files, triaging projects, cleaning rule contradictions — is just as valid as using it for code migration.
- Every time the primary agent thinks it has finished, the judge agent re-evaluates whether the terminal condition has actually been met.
- A goal that takes three minutes to complete and removes 30 redundant skills represents hours of manual cleanup work eliminated.
- Session transcripts stored as JSONL files are a raw archive of prompting intelligence — /goal can surface the patterns worth preserving before they are lost.
Your skills folder maintains itself now.
/goal is not a task runner — it is a quality loop you can point at your own system.
- Write rubric.md before running /goal on any content-generation skill. AI grades itself easy without it.
- Run CLEAN on ~/.claude/skills right now — if it has grown past ~20 skills, /goal can halve it in under 3 minutes.
- The FORGE pattern applies directly to JoeFlow: point /goal at ~/.claude/projects/**/*.jsonl and let it find which patterns deserve skills.
- The MAINTAIN + /loop combo is the unlock for MCN: scheduled health checks on skills and CLAUDE.md drift without manual review.
- The worker/judge architecture means you can trust destructive operations (archiving, rewriting) you would not trust a single-pass agent with.
Terms worth knowing.
- /goal
- A slash command in Claude Code and Codex that runs an agent in a loop against a stated objective, with a separate judge model verifying completion before exiting.
- Slash command
- A built-in shortcut typed with a leading slash that triggers a predefined workflow or behavior inside an AI coding tool like Claude Code or Codex.
- Codex
- OpenAI's coding agent product that runs tasks against a codebase from the command line, comparable to Claude Code.
- Claude Code
- Anthropic's command-line coding agent that reads, writes, and executes against a local codebase using natural-language instructions.
- Agentic OS
- A personal operating layer of skills, rules, and configuration files that an AI agent uses to act on your behalf across tasks.
- Skill
- A reusable, named instruction bundle that teaches an agent how to perform a specific task, stored as a markdown file the agent loads on demand.
- CLAUDE.md
- A markdown file Claude Code reads at session start that holds project or user instructions, conventions, and standing rules for the agent to follow.
- AGENT.md
- A markdown configuration file similar to CLAUDE.md used to give an AI agent persistent context, rules, and behavior guidelines.
- Judge model
- A separate language model that audits the primary agent's output against the stated goal, acting as a devil's advocate before the task is marked complete.
- Terminal state
- The point at which an agent loop decides its objective is satisfied and stops iterating.
- Objective function
- A clearly stated goal an agent optimizes toward, used here as the success criterion the /goal loop checks against each iteration.
- Rubric
- A predefined scoring guide listing criteria the agent must meet, used to evaluate outputs objectively instead of letting the model grade itself loosely.
- Sub-agent
- A secondary agent spawned by a primary agent to handle a focused subtask, such as simulating a skill's output or scoring it.
- Iteration log
- A running record of each loop pass an agent takes, capturing its reasoning, actions, and revisions across attempts at a goal.
- Hello world project
- A throwaway starter project with only minimal placeholder code, used as a stand-in for dormant or abandoned work with no real substance.
- JSONL
- A file format where each line is a separate JSON object, used by Claude Code to store full session transcripts for later parsing.
- Session transcript
- The complete back-and-forth log of a user-agent conversation saved to disk, including every prompt, response, and tool call.
- /loop
- A Claude Code slash command that re-runs a given task on a recurring interval, such as every thirty minutes, so it executes autonomously over time.
- Hooks
- Configurable triggers in Claude Code that automatically run a command on specific events, like session start, stop, or after a tool use.
- Cron job
- A scheduled task on a computer that runs a command automatically at fixed intervals, used here to keep a /goal routine firing on a timer.
Things they pointed at.
Lines you could clip.
“We're giving the agent a mirror. We're telling it to go through all of the assets to see how it could best optimize itself. The target of the goal is optimizing the very system trying to achieve the goal.”
“It will go easier on itself to try to increase the chances that it accomplishes the goal.”
“Way easier than having to remind yourself to do it every day.”
Word for word.
The bait, then the rug-pull.
Everyone has seen the build-me-a-snake-game demo. Mark Kashef opens by asking a different question: what if you pointed /goal at the system doing the building? Five live demos later, your skills folder, CLAUDE.md, and rules files have reorganised themselves — and you did not touch a single file.
Named ideas worth stealing.
The /goal Worker-Judge Loop
- Give goal (<=4000 chars)
- Primary agent executes
- Judge on different model checks condition
- NO loops back, YES exits to terminal state
Two different models in a loop: one does the work, one audits it. Runs until judge says condition is met.
The Five OS Maintenance Modes
- CLEAN: consolidate bloated skills/rules
- SHARPEN: iterate skill against a rubric
- REVIVE: resurrect dormant projects
- FORGE: mine transcripts for missing skills
- MAINTAIN: schedule recurring health checks
Complete taxonomy of what /goal can do to your agentic OS. Each mode has a distinct objective shape and a different folder as the target.
Three Autonomous Trigger Types
- /loop: fires on time interval
- /goal: fires when objective met
- hooks: fires on event or session end
Three ways Claude Code runs without you. Can be combined: /loop 30m /goal <prompt> runs a goal on a cron schedule.
Write Your Own Rubric Before Running /goal
If you let the AI define success criteria, it sets an easy bar. Define rubric.md yourself with specific pass/fail criteria per criterion. Goal only clears when YOUR criteria are met.
How they asked for the click.
“If you wanted access to the prompts that I showed you so you could use them or take derivatives of them for your own use case, I'll make them available to you in the second link in the description below.”
Dual CTA: prompts in description (high intent, immediate value) + community link (recurring engagement). Course upsell shown visually without hard pitch. Well-executed.







































































