{"skill":{"slug":"apprentice","displayName":"Apprentice","summary":"Watch-me-once workflow learning. Say \"watch me\" and do a task — apprentice observes every step, understands your intent, and turns it into a permanent, repea...","description":"---\nname: apprentice\nversion: \"1.0.0\"\ndescription: Watch-me-once workflow learning. Say \"watch me\" and do a task — apprentice observes every step, understands your intent, and turns it into a permanent, repeatable skill your agent can run forever. Programming by demonstration. No code. No specs. Just do it once. Triggers on \"watch me\", \"learn this\", \"remember how I do this\", \"apprentice mode\", \"teach you something\", \"run [workflow-name]\", \"what have you learned\", or \"replay [workflow-name]\".\nhomepage: https://github.com/Taha2053/apprentice\nmetadata:\n  clawdbot:\n    emoji: \"🎓\"\n    requires:\n      env: []\n    files:\n      - \"scripts/*\"\n      - \"workflows/*\"\n---\n\n# Apprentice — Watch Me Once. Do It Forever.\n\n> The entire history of computing: you describe what you want → the computer executes.\n> Apprentice flips it: you do what you want → the agent watches → it becomes a permanent skill.\n\nThis is **Programming by Demonstration** — a 30-year holy grail of human-computer interaction research. Every attempt failed because it required constrained environments or rigid formal specifications. LLM agents make it possible for the first time:\n\n- Watch what you actually do (not what you say you do)\n- Understand your intent, not just your actions\n- Generalize across contexts — knowing what's a variable vs. what's a constant\n- Turn it into a repeatable workflow your agent can run, refine, and chain forever\n\n---\n\n## External Endpoints\n\n| Endpoint | Purpose | Data Sent |\n|---|---|---|\n| None | Fully local | Nothing leaves your machine |\n\nApprentice records locally. All synthesis happens via your already-running LLM session. No external APIs.\n\n---\n\n## Security & Privacy\n\n- **Zero external calls.** Observation logs, workflow files, and all synthesis happen locally.\n- **No credentials accessed.** Apprentice observes what you tell it — it doesn't read system files or intercept your input at an OS level.\n- **You review before saving.** After observation, you see the synthesized workflow and approve it before it's saved as a permanent skill.\n- **Sandboxed execution.** Generated workflow run scripts are plain bash with full security manifest headers.\n\n> **Trust Statement:** Apprentice writes observation logs and workflow SKILL.md files locally. The only thing it sends to the LLM is your described observation + synthesis request, using your existing session. Nothing leaves your machine.\n\n---\n\n## Model Invocation Note\n\nApprentice is always user-initiated. It activates on \"watch me\" or equivalent phrases, and pauses until you say \"done\" or \"stop watching.\" Synthesis runs once per observation session, with your review before saving. Workflows execute only when explicitly invoked.\n\n---\n\n## How It Works\n\n### Step 1 — Start Observation\n```\n\"Watch me\"\n\"Apprentice mode on\"\n\"Learn this\"\n\"I'm going to show you how I do X\"\n```\nThe agent enters observation mode. It listens and records your actions.\n\n### Step 2 — Do the Task Naturally\nJust do what you normally do. Talk out loud if it helps — the agent hears everything:\n- Commands you run\n- Files you create, edit, or delete\n- Decisions you make and why\n- The order of steps\n- What changes between runs (variables) vs. what stays constant\n\nYou don't need to be formal. \"Now I update the README with the project name\" is enough.\n\n### Step 3 — Stop Observation\n```\n\"Done\"\n\"Stop watching\"\n\"That's it\"\n\"End observation\"\n```\n\n### Step 4 — Review the Synthesis\nApprentice shows you:\n- **What it understood** as the workflow name and purpose\n- **The steps** it identified, in order\n- **The variables** it detected (things that change each run)\n- **The constants** (things that stay the same)\n- **The generated workflow** as a readable, editable description\n\nYou approve, edit, or reject.\n\n### Step 5 — It's a Permanent Skill\nApproved workflows live in `apprentice/workflows/` as named SKILL.md files. Your agent can:\n```\n\"Run new-project-setup\"\n\"Do the weekly-report workflow with topic=AI agents\"\n\"What workflows have you learned?\"\n\"Replay morning-routine\"\n```\n\n---\n\n## Example: Learning a Workflow\n\n**User:**\n```\n\"Watch me set up a new project\"\n```\n\n**[User does the following, narrating out loud]:**\n```\nmkdir projects/client-dashboard\ncd projects/client-dashboard\ncp -r ~/templates/react-starter .\nsed -i 's/TEMPLATE_NAME/client-dashboard/g' README.md\ngit init\ngit remote add origin git@github.com:myorg/client-dashboard.git\necho \"Done — this is how I start every new project\"\n```\n\n**User:**\n```\n\"Done watching\"\n```\n\n**Apprentice responds:**\n```\n🎓 OBSERVATION COMPLETE — New Project Setup\n\nWhat I understood:\n  Purpose: Initialize a new project from template\n  Name: \"new-project-setup\"\n\nSteps I identified:\n  1. Create project directory with name [PROJECT_NAME]\n  2. Copy React starter template\n  3. Replace template placeholder with [PROJECT_NAME] in README\n  4. Initialize git repository\n  5. Add remote origin at [GIT_ORG]/[PROJECT_NAME]\n\nVariables (change each run):\n  • PROJECT_NAME — the new project's name\n  • GIT_ORG — your GitHub organization (default: myorg)\n\nConstants (same every time):\n  • Template source: ~/templates/react-starter\n  • README placeholder: TEMPLATE_NAME\n\nDoes this look right? [Accept] [Edit] [Reject]\n```\n\n**Next time:**\n```\n\"New project setup for analytics-redesign\"\n→ Agent runs all 5 steps automatically with PROJECT_NAME=analytics-redesign\n```\n\n---\n\n## Trigger Phrases\n\n**Start observation:**\n```\n\"Watch me\"\n\"Apprentice mode\"\n\"Learn this\"\n\"Remember how I do this\"\n\"I'll show you\"\n\"Teaching you something\"\n```\n\n**Stop observation:**\n```\n\"Done\"\n\"Stop watching\"\n\"That's it\"\n\"Got it?\"\n\"End lesson\"\n```\n\n**Run a workflow:**\n```\n\"Run [workflow-name]\"\n\"Do the [workflow-name] workflow\"\n\"[workflow-name] with [variable=value]\"\n\"Replay [workflow-name]\"\n```\n\n**Manage workflows:**\n```\n\"What have you learned?\"\n\"Show me my workflows\"\n\"Delete [workflow-name]\"\n\"Edit [workflow-name]\"\n\"When did you learn [workflow-name]?\"\n```\n\n---\n\n## What Makes a Good Observation\n\nThe more context you give, the better Apprentice understands:\n\n✅ **Talk out loud** — \"Now I'm going to update the config with the new API key\"\n✅ **Explain why** — \"I always do this before deploying because staging needs different env vars\"\n✅ **Name the variables** — \"The PROJECT_NAME here would change each time\"\n✅ **Mark the end** — \"And that's the whole workflow, every time\"\n\n❌ **Silent actions** — Apprentice can only learn what it can observe through your conversation\n❌ **GUI-only tasks** — Apprentice works with what you describe; it doesn't watch your screen\n\n---\n\n## Workflow Files\n\nEach learned workflow lives in `apprentice/workflows/<name>/`:\n\n```\napprentice/workflows/new-project-setup/\n├── SKILL.md          ← The learned workflow (OpenClaw-compatible)\n├── run.sh            ← Generated execution script\n└── observation.json  ← Raw observation log (editable)\n```\n\nThe generated `SKILL.md` is a full, valid OpenClaw skill. This means:\n- Other skills can call it\n- You can edit it manually to refine\n- You can publish it to ClawHub to share with others\n\n---\n\n## Chaining Learned Workflows\n\nOnce you have multiple workflows, Apprentice can chain them:\n\n```\n\"After running new-project-setup, also run notify-team\"\n→ Agent chains both workflows in sequence\n\n\"If the deploy workflow fails, run rollback-staging\"\n→ Conditional chaining with error handling\n```\n\n---\n\n## Workflow Library\n\nAfter a few weeks of use, your workflow library becomes a personal operating system — a library of **you**. Things like:\n\n- `morning-routine` — the first 15 minutes of your day\n- `new-project-setup` — how you start every project\n- `weekly-report` — how you compile and send the Friday summary\n- `client-onboarding` — every step you take when a new client joins\n- `deploy-staging` — your exact deployment sequence\n- `code-review-prep` — how you prepare before reviewing a PR\n\nNo two users' libraries will ever be the same. This is your agent, shaped by what only you do.\n\n---\n\n## File Structure\n\n```\napprentice/\n├── SKILL.md                         ← You are here\n├── README.md                        ← Install guide\n├── scripts/\n│   ├── observe.py                   ← Observation session manager\n│   ├── synthesize.py                ← Turns observation into workflow SKILL.md\n│   └── run.py                       ← Executes a named workflow\n└── workflows/                       ← Your learned workflow library\n    └── (empty on install, grows with you)\n```\n\n---\n\n## Philosophy\n\nEvery tool ever built asks: *What do you want?*\n\nApprentice asks: *Can I watch?*\n\nThe difference is everything. When you describe what you want, you lose nuance — the order matters, the edge cases matter, the \"I always do this first\" matters. When Apprentice watches, it captures all of it, exactly as you actually do it.\n\nYour agent doesn't get smarter by being trained on more data. It gets smarter by watching you.\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":1018,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1771599525679,"updatedAt":1779077199975},"latestVersion":{"version":"1.0.0","createdAt":1771599525679,"changelog":"Apprentice 1.0.0 — initial release: teach your agent new skills by simply doing a task once.\n\n- Observe your workflow via natural actions and narration (\"watch me\" triggers learning mode)\n- Synthesizes repeatable, editable workflows with variables and constants\n- Stores all data and learning fully locally—no external endpoints or data sent\n- Allows approval, editing, or rejection of generated skills before saving\n- Enables easy running, chaining, and management of learned workflows via simple commands","license":null},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"taha2053","userId":"s172pj5a8m7ytaw9ex4d7h5zsn83h4g6","displayName":"Almouthana Taha Khalfallah","image":"https://avatars.githubusercontent.com/u/89487941?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779943170759}}