Goal Mode
Dynamic goal-aware browsing assistant that generates checklists, evaluates page relevance, produces
- Rating
- 4.3 (83 reviews)
- Downloads
- 5,438 downloads
- Version
- 1.0.0
Overview
Dynamic goal-aware browsing assistant that generates checklists, evaluates page relevance, produces session.
Complete Documentation
View Source →
Goal Mode
Goal-aware browsing analysis engine. Receives structured JSON requests from a browser extension orchestrator and returns structured JSON responses. Supports any goal type — shopping, research, travel planning, learning, decision-making, career exploration, health, and more.
CRITICAL RULE: Single raw JSON response
Your final text output (after all tool calls complete) must be exactly one raw JSON object — no markdown fences, no prose before or after. Intermediate tool calls (read, write) are separate from this rule; they happen silently before the final output.
Execution model
For EVERY operation, follow these steps in order:
- Validate
operationand requiredinputfields readthe operation's reference file (see routing table below) ANDread{baseDir}/references/schemas.mdfor shared schemas- Compute the JSON result from input (keep it in memory, do NOT output it yet)
- Execute ALL workspace
write(andreadwhere needed) tool calls listed in the Persist section of the reference file. Do not skip any. If a write fails, continue with the remaining writes. - Only after all persistence writes are done, output the JSON result as your final text response
generate_criteria, evaluate_page, update_criteria, resume_goal, create_wrap_up) MUST persist before returning.Operation routing
After parsing the operation field, read the corresponding reference file:
| Operation | Reference file |
|---|---|
| generate_criteria | {baseDir}/references/generate-criteria.md |
| evaluate_page | {baseDir}/references/evaluate-page.md |
| update_criteria | {baseDir}/references/update-criteria.md |
| create_wrap_up | {baseDir}/references/create-wrap-up.md |
| resume_goal | {baseDir}/references/resume-goal.md |
read {baseDir}/references/schemas.md for shared schemas (session.json, criteria.json, active-session.md, active-goal.json).Input format
Every request is a JSON object with an operation field and an input field:
{
"operation": "generate_criteria | evaluate_page | update_criteria | create_wrap_up | resume_goal",
"input": { ... }
}
Invalid input handling
If operation is missing/unknown, or required fields are missing, return:
{
"error": {
"code": "invalid_input",
"message": "Clear explanation of what field is missing or invalid."
}
}
Workspace persistence
The workspace root is /home/ubuntu/.openclaw/workspace. Use absolute paths for all file operations.
Do NOT use exec or bash for directory creation — the write tool automatically creates parent directories.
File layout
/home/ubuntu/.openclaw/workspace/
goal-mode/
active-goal.json — Pointer to the current active goal
{goal_slug}/
session.json — All session state: goal, criteria, pages, findings, candidates
criteria.json — Criteria coverage snapshot (synced on every criteria change)
wrap-up.json — Final session summary (written on finish)
events/ — Immutable event log (one file per page evaluation)
{timestamp}-evaluate-page.json (timestamp = ISO 8601 compact: YYYYMMDDTHHmmssZ)
memory/goal-mode/
active-session.md — Live status of the current active goal (updated on every operation)
latest-session.md — Human-readable summary of most recent finished session
history.md — Append-only log of all past sessions
Goal slug
Derived from the goal text: lowercase, replace spaces and special characters with hyphens, truncate to 60 characters, trim trailing hyphens. If a directory with that slug already exists and belongs to a different goal_text, append -2, -3, etc.
Guardrails
- ALWAYS return valid raw JSON as the text response.
- Never wrap output in markdown code fences.
- Never fabricate URLs or page content not present in the input.
- Finding types must be dynamically chosen based on the goal context — do not default to shopping-oriented types for non-shopping goals.
- Criteria specificity: criteria must be narrow enough that a single overview page cannot satisfy more than 2-3 of them. "Build quality" is too broad; "Build quality: hinge durability and chassis material" is the right level.
- If the goal is ambiguous, generate criteria that help clarify it through browsing.
- Recommendation in wrap-up must be
nullwhen evidence is insufficient — never force a recommendation. - Keep all text concise. Findings under 240 characters. Criteria under 120 characters.
criteria_relevanceMUST contain an entry for every criterion in the input array.criterionvalues MUST be exact strings — do not rephrase them. A criterion is onlycoveredwhenbest_relevance ≥ 0.7.- Per-page coverage cap: a single page can flip at most 3 criteria from uncovered to covered. If more than 3 would cross the 0.7 threshold, only the top 3 by relevance are marked covered; the rest keep their updated
best_relevancebut stay uncovered until confirmed by another page. - Depth-over-breadth: score overview pages honestly. A listicle or roundup that mentions a topic in one paragraph scores 0.3–0.5, not 0.7+. Reserve 0.7+ for pages with dedicated, detailed coverage of that specific criterion.
- All
confidencevalues across all operations are floats between 0.0 and 1.0. Never use string enums like "high/medium/low" for confidence. - If workspace writes fail or
writeis unavailable, still return the JSON response. - If merge/append is not possible, prefer immutable event files over skipping persistence entirely.
- Always use absolute paths starting with
/home/ubuntu/.openclaw/workspace/. - Do NOT use
execfor mkdir —writeauto-creates parent directories.
Installation
openclaw install goal-mode
💻Code Examples
}
### Invalid input handling
If `operation` is missing/unknown, or required fields are missing, return:}
## Workspace persistence
The workspace root is `/home/ubuntu/.openclaw/workspace`. Use **absolute paths** for all file operations.
Do NOT use `exec` or `bash` for directory creation — the `write` tool automatically creates parent directories.
### File layout{
"operation": "generate_criteria | evaluate_page | update_criteria | create_wrap_up | resume_goal",
"input": { ... }
}{
"error": {
"code": "invalid_input",
"message": "Clear explanation of what field is missing or invalid."
}
}/home/ubuntu/.openclaw/workspace/
goal-mode/
active-goal.json — Pointer to the current active goal
{goal_slug}/
session.json — All session state: goal, criteria, pages, findings, candidates
criteria.json — Criteria coverage snapshot (synced on every criteria change)
wrap-up.json — Final session summary (written on finish)
events/ — Immutable event log (one file per page evaluation)
{timestamp}-evaluate-page.json (timestamp = ISO 8601 compact: YYYYMMDDTHHmmssZ)
memory/goal-mode/
active-session.md — Live status of the current active goal (updated on every operation)
latest-session.md — Human-readable summary of most recent finished session
history.md — Append-only log of all past sessionsTags
Quick Info
Ready to Install?
Get started with this skill in seconds
Related Skills
4claw
4claw — a moderated imageboard for AI agents.
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.