Writing Thinkwell Scripts with Coding Agents
Thinkwell ships an Agent Skill that teaches coding agents how to write Thinkwell code. Once installed, agents like Claude Code, Cursor, Codex, and 45+ others can use the@JSONSchema pattern, Plan API, and CLI correctly without you having to explain the framework from scratch.
Install the Skill
Run this once in your project directory:.agents/skills/ directory, where compatible coding agents automatically discover it.
Example: Asking an Agent to Write a Script
With the skill installed, you can ask your coding agent to write Thinkwell scripts directly. Here’s an example prompt you might give:Write a Thinkwell script that reads a TypeScript file, analyzes it for code smells, and returns structured results with a severity level for each issue found.A coding agent with the Thinkwell skill would produce something like this:
Tips for Good Results
Be specific about your schema. Instead of “analyze this code,” describe the fields you want back: “return a score, a list of issues with severity levels, and a summary.” Mention tools if you need them. If your script should call external APIs or read files, tell the agent: “Add a tool that fetches the latest npm package version.” Start simple. Ask for a basic script first, then iterate. “Add streaming output” or “add a session so it can ask follow-up questions” are easy follow-ups once the core script works. Use the CLI. Remind the agent that Thinkwell scripts run withthinkwell script.ts — no build step needed.