Building Tools and Skills

W22026

Hero video: the first 10 seconds of the demo
Hero video: the first 10 seconds of the demo

01 Objective

This week I wanted to build an agent that solves a problem of my own: an agent that helps me learn how to code, and in this case, how to build an agent.

Going through the tutorial notebook, I often got stuck on lines of code I didn't understand, like what **request does. Each time I took a screenshot, pasted it into a chat with Claude, asked, read a long answer, and went back to the notebook. So I thought: why not build an agent that shortens all of this to one key press and a spoken question, and answers on the fly without breaking my learning flow?

I wanted this agent, which I named Glance, to be a teacher, not a doer. It explains, quizzes and annotates, but it does not do tasks for me, such as opening apps or running code. It should remember what I asked, skip what I already know, bring an older concept back a day later, and ask me to say each explanation back in one sentence, so that learning happens in rounds. I hope to combine it later with the agent I made last week, which connects the dots between my notes.

Inspiration

The launch of Jev1 has been popular on social media, with people building impressive things with it234. One example is x.com/instantricecook5, where Andy Gao built voice-controlled computer use for his Mac with TypeSafe AI's Jev, and it is remarkably fast.

Fig. 1 Andy Gao, voice-controlled computer use for the Mac with Jev, demo video on X.

I then found a project called macbrow67 that does something similar: "Talk to your Mac. Say a command and it runs as AppleScript; say a web task and it drives your Chrome. Routing takes about 300 ms because a System One model chooses instead of generating."

Fig. 2 The macbrow README on GitHub, with its demo video and pipeline.
Fig. 2 The macbrow README on GitHub, with its demo video and pipeline.

02 Technical overview and flow

Glance has three main components: the Eye, the Brain and the Mouth.

In one sentence: Glance sees your screen, passes what it sees through an LLM, and talks you through your question about a piece of code you don't understand.

I separated Jev and Claude to manage context. Claude does only the reasoning. Jev is a model that chooses from fixed options, and it handles the easier part: which parts of the screen Claude needs to know about. That way Claude does not have to read and analyze the whole screen itself.

The most important tool is look_at_screen. It gives the agent the ability to see what I see, which extends what the agent can perceive and reason about.

ComponentGoalJobStackContext
The Eye (senses + attention)Sees and hears what I'm doing, then focuses on the part I meanCaptures the screen when I press the key, OCRs it, reads my selection and the app I'm in, records my question; then decides which line I'm pointing at and what kind of question it isSwift app8 (ScreenCaptureKit, Apple Vision OCR, Accessibility API, AVAudioEngine) · ElevenLabs Scribe v29 (speech → text) · Jev (TypeSafe System One: chooses the line, the question type and whether docs are needed, and which Claude model to use)Mac + cloud
The BrainThinks about the question and plans how to teach itRoutes each question, then runs a smolagents agent loop that calls tools, recalls what I've learned, loads the teacher skill and checks official docsPython (glance serve) · smolagents CodeAgent10 · Claude Haiku 4.5 (Sonnet for hard questions) · tools look_at_screen, study_log, load_skill · Context7 MCP11 · 7 skillsMac (Python) + cloud (Claude, Context7)
The MouthTeaches back, briefly and naturallyTurns the answer into 2–3 teacher-style sentences with one follow-up question, speaks it, shows the same text in the pill and highlights the code on screencode-teacher skill (answer format) · ElevenLabs Flash v2.5 (text → speech) · SwiftUI pill + highlight overlayMac + cloud

Does Jev actually earn its place? On 29 labelled test screens, Jev found the line I meant in 20 of 22 cases (91%), against 16 of 22 (73%) for plain fuzzy text matching, and it classified the kind of question correctly in 11 of 15 (73% vs 60%). Each judgment takes about 0.2 s and costs about $0.0001, so Glance can highlight the line and say "Looking at…" before Claude has written anything. Claude's 2–3 agent steps still take most of the time (about 8 s), so Jev mainly buys accuracy and instant feedback, not total speed. (runs/examples/evals/)

2.1 The whole system

An example workflow run:

Fig. 3 The Eye hears and sees, the Brain (inside the dashed line) routes, thinks and uses tools, and the Mouth answers. Boundaries: secrets are redacted before anything leaves my Mac, the front door refuses anything that would act on my Mac, the tools can only read (plus one note in the study log), and a budget stops a question at $0.05 and the day at $1.
Fig. 3 The Eye hears and sees, the Brain (inside the dashed line) routes, thinks and uses tools, and the Mouth answers. Boundaries: secrets are redacted before anything leaves my Mac, the front door refuses anything that would act on my Mac, the tools can only read (plus one note in the study log), and a budget stops a question at $0.05 and the day at $1.

2.2 Agent type

I chose a CodeAgent: one code block can call several tools and branch on their results.

AspectToolCallingAgentCodeAgent (Glance)
One action isone JSON tool calla block of Python that can call several tools
Model turns per questionabout 52 to 3
Risklow: it can only call the toolsthe model's code runs, so every tool stays read-only

2.3 Tools

ToolWhy it existsWhy this format
look_at_screenOne call replaces screenshot, OCR, line search and triage (one Jev request)Fixed keys plus one next instruction; plain-text targets, no line numbers
study_logMemory across sessions: skip what I know, spaced recall, my own past wordsTwo actions in one tool; the agent's only write
load_skillsmolagents has no built-in skills supportText, or ERROR: plus the valid names
Context7 query_docs, resolve_library_idCurrent docs instead of model memoryDescriptions trimmed from about 2,000 characters; docs capped at 2,000

look_at_screen and study_log are my own designs, not copies of standard tools: one wraps a small classifier model around my screen snapshot, the other models my learning over time. Every look_at_screen result carries exactly one next instruction, and that is how a tool result changes what the agent does next:

look_at_screen resultnext tells the agent to
found, docs neededcall query_docs for that library
foundexplain now
ambiguouslist the candidate lines and ask which one
not found near the mouselook again across the whole window
not found anywhereanswer generally and say it was not on screen
a concept or off-topic questionanswer directly

Context7 is the one MCP server. It connects once at start-up over streamable HTTP12, and only 2 of its tools are loaded. ElevenLabs is deliberately not an agent tool: the brain calls it around the agent for speech in (Scribe v2, with on-screen identifiers as keyterms) and speech out.

2.4 Skills

I then wrote two best-practice skills for my agent, based on this week's tutorials and examples.

agent-safety-and-responsibility.skill

Agent skill1.9 KB

agent-tool-design.skill

Agent skill2.0 KB

Glance has 7 skills in total. Each is a SKILL.md file13: only its name and description sit in the prompt, and the full text loads when a question needs it.

SkillWhen Glance uses it
code-teacherevery answer: the teacher voice and the short answer format (always preloaded)
explain-screen-code"what does this line do?"
debug-screen-errora traceback or error message is on screen
teach-me"teach me dataclasses": one idea, taught in the code on screen (adapted from Matt Pocock's teach skill14)
echo-past-selfa concept comes back, so Glance hands me my own earlier words
agent-tool-design (mine)questions about designing agent tools
agent-safety-and-responsibility (mine)safety questions, or when I ask Glance to act outside teaching
skills/explain-screen-code/SKILL.md (shortened)---
name: explain-screen-code
description: Use this skill when the learner asks what code on their screen does,
  means or returns, or why it is written that way ...
---
1. Locate before explaining. Follow look_at_screen's next field.
2. Quote the exact target line first.
3. Gist: one sentence on what the line does at runtime.
4. Parts: 2-5 bullets, labelled by purpose, using the learner's own names.
5. Docs, only when next says so. Never send the learner's code as the query.
6. Adapt depth with study_log: skip what they already asked about.
7. Check: one optional predict or what-if question.
9. Record, then answer, in the same code block.

2.5 Action space

TierWhat runsExamples
1. Commandsplain code, no AIsave a note (only inside notes/), say that again, stop
2. The agentClaude with my toolslook_at_screen, study_log, load_skill, Context7 query_docs, final_answer
3. Refusednothing, just a polite noopen apps or docs, copy, run, click, type, send, delete, move, rename

Anything uncertain falls toward the agent, never toward an action. The agent's only write is one line in the study log.


03 Code and an example run

Fig. 4 Example run (runs/examples/05-app-headless-docs-chain), drawn from its trace.jsonl: with the mouse on the client.messages.create line in the week-2 Colab I asked "What does this line do?"; look_at_screen found the line and returned next: call query_docs, so the agent's second step was a Context7 docs lookup.
Fig. 4 Example run (runs/examples/05-app-headless-docs-chain), drawn from its trace.jsonl: with the mouse on the client.messages.create line in the week-2 Colab I asked "What does this line do?"; look_at_screen found the line and returned next: call query_docs, so the agent's second step was a Context7 docs lookup.

What the agent saw after step 1, and the code it wrote:

found
Call query_docs(libraryId='/anthropics/anthropic-sdk-python', query=look['docs_query']) unless you already did; print at most 1500 chars, then explain.
explain_line
docs = query_docs(libraryId='/anthropics/anthropic-sdk-python', query='messages.create response')
print(docs[:1500])
Run at a glanceValue
Tools, in orderlook_at_screen, study_log, load_skill, query_docs, study_log, final_answer
Time10.4 s: 8.2 s for 3 Haiku calls, 2.2 s for Context7
Model17,573 tokens in (11,098 read from cache), 564 out, $0.012

Other runs in runs/examples/:

FolderWhat it shows
02-window-rescan-debugnothing found near the mouse, so the agent searched the whole window and found the bug's cause in the printed output
03-user-model-seen-beforestudy_log recognized a repeat question, so the answer skipped the basics
04-follow-up-cacheda follow-up: 4 s and $0.003, mostly read from the prompt cache
07-app-voice-scribe-bilingualScribe heard my mixed Chinese and English question; Apple's dictation heard only "Terminal"
Demo video of Glance
Demo video of Glance

Fig. 5 Demo video of Glance.


04 Reflection

At first I used Apple's built-in dictation instead of a dedicated speech model such as ElevenLabs Scribe or the on-device MacParakeet.15 Apple's dictation was so poor that it misheard even plain English words. ElevenLabs is much better. (For example, Apple's dictation heard "status of class" for dataclass, "dynamic match" for DynamicMacAgent, and only "Terminal" for a whole mixed Chinese and English question, while ElevenLabs Scribe transcribed "client.messages.create" exactly in 850 ms, run 07.)

If I did it again, I would settle the overall architecture first: what starts the agent, what stops it, and what counts as success.

What I iterated on most was the answer itself and its length: how should the agent continue the conversation, and when should it end it? I wanted it either to ask a follow-up question or to offer to explain further. I used Matt Pocock's "teach" skill14 to refine the design of the persona of this teacher.

I am still not satisfied with its speed. I would also like it to scroll up and down to understand the whole context, beyond a single screenshot. It could even take screenshots before I ask, anticipating my question. That might be compute-heavy; another option is a session that I start, during which Glance stays active.

It all comes back to context: how well is the answer grounded in what I am actually asking about?

Following my agent-tool-design skill (Appendix A)1617, Glance keeps a small consolidated toolset (look_at_screen hides the screenshot, OCR, line search and the Jev call behind one question-shaped tool), returns short results with one next instruction, and turns errors into data the agent can act on. It still breaks one rule: the model writes the concept label for study_log, a decision deterministic code could make, and every agent step re-sends generic few-shot examples.

The numbers from the runs:

  • 13 live questions: median 7.2 s and $0.007 each; Claude's 2–3 steps take about 8 s of a question.
  • Jev found the right line in 20 of 22 labelled cases (91%), plain fuzzy matching in 16 of 22 (73%); ~0.2 s and ~$0.0001 per judgment.
  • Apple dictation heard "status of class" for dataclass, "dynamic match" for DynamicMacAgent, "Terminal" for a whole mixed Chinese/English question; ElevenLabs Scribe transcribed "client.messages.create" exactly in 850 ms.
  • Iterations tonight: silence cut-off → hold-to-talk; long answers + "say it back" → 2–3 sentences + one follow-up question (code-teacher, teach-me); whole-screen OCR missing small code → sharper re-read near the mouse; permissions re-granted after every rebuild → a stable local signing certificate.

Next steps

These are flaws I found while using Glance. If I work on it next week, this is what I would change:

  • Memory. Glance has no conversational memory yet. After it answers, it asks "Do you want some follow-up?", and if I reply "yes", it has lost the context and does not know how to continue. It does not know what we talked about in my previous conversation, or even earlier in the same session. I need to add memory to it.
  • A stop button. I want a button that stops its speech output while it is explaining something to me.
  • Tailored openings. The first sentence of each answer should fit the question. Right now every answer opens with something like "I will start by looking at…".
  • Beyond code, with my knowledge base. This is the main next step for Glance as a learning aid. I want to develop its persona further so it understands context better, and not only for code. Whatever I ask about, whether literature, philosophy or politics, it should understand and reply; it should not be limited to code. It could connect to my Obsidian knowledge base and answer my questions from it, or help me build connections between what I know, whether the question is about philosophy, design or something technical.

05 AI disclosure

I used Claude by Anthropic as a collaborator throughout this build. It:

  • helped me study the assignment brief and the related research
  • wrote the code (agents, environments, tools, evaluation and logging) and ran the experiments
  • analyzed the results and built the data visualizations, charts, diagrams, drawings and animations
  • helped draft, edit and format these notes for the course site

The agency and every decision stayed with me. The ideas, the research questions, the system and interaction design, the visual design, and the choices about what to build, test and keep are my own. I directed the work, reviewed every output, and decided what went in.


Appendix A: Tool hygiene checklist

Rule (from my skills)Glance
Small, consolidated toolset3 local tools; look_at_screen hides capture, OCR, search and the Jev call
Short, actionable resultsone next per result, no line numbers, errors returned as data
Deterministic code where it workscommands, routing, docs query · Not yet: the model still writes the concept label
Test on real taskslabelled screens: Jev found the right line 91% of the time (fuzzy match 73%)
Least privilege, bounded runsread-only tools (plus one log line), 4 steps, $0.05 per question, $1 per day
Untrusted content is datascreen text never reaches the router
Sandbox and token costNot yet: LocalPythonExecutor is not a real sandbox; generic few-shot examples are re-sent every step

Appendix B: Live runs on 2026-09-28

HeardTools calledModels$
what does this line dolook, recall, skill, query_docs, record, answerHaiku10.40.012
What is happening on my screen now?look, recall, skill, record, answerHaiku7.20.006
Explain this highlighted quote to melook, recall, record, answerSonnet4.90.037
Explain this codelook, recall, skill, record, answerHaiku8.10.005
Can you explain this?look, recall, look (window), record, answerHaiku7.90.007
Can you explain the status of class?look, recall, skill, record, answerSonnet5.60.020
Can you explain to me what is dynamic matchlook, recall, skill, record, answerHaiku12.00.009

7 of the 13 live questions that night; the other 6 were fragments Apple dictation cut short or misheard ("Wasn't", "Terminal", "Rahul Hana"). "Status of class" was dataclass and "dynamic match" was DynamicMacAgent, which is what moving to ElevenLabs Scribe with on-screen keyterms fixed (run 07).

In a second run the tool result decides what happens. For "Can you explain this?", look_at_screen found nothing near the mouse, so next said to look across the whole window; still nothing, so next said to answer generally, and the agent asked me to highlight the code instead of guessing.

Appendix C: My anatomy of an agentic system, mapped onto Glance

LayerWhat it is (my summary)In Glance
1. ModelReading and generating textClaude Haiku 4.5; Sonnet 5.5 for deep questions
2. Structured outputTurning generated text into actions the program can executeHaiku writes Python; Jev picks from closed lists
3. Tool useThe program runs the actions and feeds results back: the agent loop3 local tools + 2 Context7 tools
4. Tool designShaping actions so the model can use them wellone question-shaped tool, one next per result
5. MCPActions from any external service without rewriting codeContext7 over streamable HTTP
6. Skills"How-to" procedures as reusable instructions, loaded on demand7 SKILL.md files
7. FrameworkLoop, memory, callbacks, sandboxingsmolagents CodeAgent, 4-step limit
8. Scheduling + stateThe agent assigning tasks to its future selfno scheduler; study_log brings a concept back the next day

References

  1. TypeSafe (2026) Jev documentation. Available at: docs.typesafe.ai (Accessed: 28 September 2026). ↩︎

  2. @hey_amandam (2026) Post on X, 1 June. Available at: x.com (Accessed: 28 September 2026). ↩︎

  3. Aayan-DEV (2026) aayans-yc-indexor. GitHub repository. Available at: github.com (Accessed: 28 September 2026). ↩︎

  4. Amal-David (2026) awesome-jev. GitHub repository. Available at: github.com (Accessed: 28 September 2026). ↩︎

  5. Gao, A. (2026) 'I built a voice controlled computer-use for my mac using typesafeai', X, 18 September. Available at: x.com (Accessed: 28 September 2026). ↩︎

  6. timpratim (2026) macbrow. GitHub repository. Available at: github.com (Accessed: 28 September 2026). ↩︎

  7. Bhosale, P. (2026) Post announcing macbrow, X, 19 September. Available at: x.com (Accessed: 28 September 2026). ↩︎

  8. musubipapi (2026) computah. GitHub repository, MIT licence. Available at: github.com (Accessed: 28 September 2026). ↩︎

  9. ElevenLabs (2026) Scribe v2 and Flash v2.5. Available at: elevenlabs.io (Accessed: 28 September 2026). ↩︎

  10. Hugging Face (n.d.) smolagents: Agents guided tour. Available at: huggingface.co (Accessed: 28 September 2026). ↩︎

  11. Context7 (n.d.) Context7. Available at: context7.com (Accessed: 28 September 2026). ↩︎

  12. Model Context Protocol (n.d.) Architecture overview. Available at: modelcontextprotocol.io (Accessed: 28 September 2026). ↩︎

  13. Agent Skills (n.d.) Specification. Available at: agentskills.io (Accessed: 28 September 2026). ↩︎

  14. Pocock, M. (2026) teach, in mattpocock/skills. GitHub repository, MIT licence. Available at: github.com (Accessed: 28 September 2026). ↩︎ ↩︎2

  15. moona3k (2026) MacParakeet, on-device speech-to-text for the Mac. GitHub repository. Available at: github.com (Accessed: 28 September 2026). ↩︎

  16. Anthropic (2025) 'Writing effective tools for AI agents, using AI agents', Anthropic Engineering. Available at: anthropic.com (Accessed: 28 September 2026). ↩︎

  17. Anthropic (2025) 'Introducing advanced tool use on the Claude Developer Platform', Anthropic Engineering. Available at: anthropic.com (Accessed: 28 September 2026). ↩︎

Last updated October 26, 2026

Read more

View all