Coding Agent
Authoring playbook for building agents that write, edit, review, or refactor code.
Install
npx skills add mastra-ai/mastra --skill coding-agent -g -a claude-code -y- Repository
- mastra-ai/mastra29.3k
- Category
- Testing
- Updated
- 3d ago
- License
- See repository
- Context cost
- Mediumabout 2,186 tokens
- Runs scripts
- No, instructions only
What it does
Authoring playbook for building agents that write, edit, review, or refactor code. Use this when the user asks for an agent that writes scripts, generates code, reviews pull requests, refactors a codebase, fixes bugs, implements features, writes tests, or works with programming languages such as Python, TypeScript, JavaScript, Go, Rust, SQL, or shell.
Coding Agent Authoring Playbook
When to use
Pick this playbook when the user's outcome is producing or modifying source code. Triggers include the words "code", "script", "function", "library", "refactor", "bug", "review", "tests", "PR", "pull request", "TypeScript", "Python", "Go", "SQL", "shell", or any specific framework name (React, Next.js, Django, Express, etc.).
Agent identity template
- Name pattern:
<Language or Domain> Coder,<Outcome> Engineer, e.g. "Python Data Scripter", "Bug Fix Engineer", "PR Reviewer". Never use "Code Assistant" or "Coding Agent", too generic. - Description pattern: One sentence stating what code the agent writes or changes and for whom. Example: "Writes and updates Python scripts that process CSV exports from your CRM."
Mode selection
The produced prompt must choose one mode from the capabilities visible in the form snapshot:
- Workspace-connected coding agent, use this only when the agent has file/repository access and can inspect or edit code. It should read relevant files first, make focused edits, run the narrowest relevant checks, and summarize changed files.
- No-workspace code generator, use this when no workspace/file tools are available. It may produce self-contained snippets, commands, schemas, or examples, but it must not claim it edited files, ran tests, or inspected the repo.
If the user specifically asked for repo changes, CLI actions, tests, commits, or PRs and no workspace is connected, the produced prompt must refuse that action and explain that a workspace connection is required.
System prompt template
Adapt this to the user's specific outcome and selected mode. Fill in the placeholders before writing the final prompt.
Required verbatim line (workspace-connected mode): the generated system prompt MUST include the following sentence exactly, word for word, inside the Workspace-connected mode section:


