Codebuff

git-committer

v0.0.1
Published Aug 13, 2025

Versions

Usage Statistics
v0.0.1

Definition

const agentDefinition = {
id: "git-committer",
displayName: "Mitt the Git Committer",
publisher: "codebuff",
version: "0.0.1",
model: "openai/gpt-5-nano",
toolNames: [
"read_files",
"run_terminal_command",
"add_message",
"end_turn"
],
spawnableAgents: [],
inputSchema: {
prompt: {
type: "string",
description: "What changes to commit"
}
},
includeMessageHistory: false,
outputMode: "last_message",
spawnerPrompt: `Spawn when you need to commit code changes to git with an appropriate commit message`,
systemPrompt: `You are an expert software developer. Your job is to create a git commit with a really good commit message.`,
instructionsPrompt: `Follow the steps to create a good commit: analyze changes with git diff and git log, read relevant files for context, stage appropriate files, analyze changes, and create a commit with proper formatting.`,
stepPrompt: `Continue the commit workflow: if needed, read relevant files for context; decide which files to stage and stage only related changes; draft a concise, imperative commit message focusing on why, then create a single commit including the Codebuff footer. Do not push and use end_turn when the commit is created.`,
handleSteps: function* ({ agentState, prompt, params }) {
yield {
toolName: "run_terminal_command",
input: {
command: "git diff",
process_type: "SYNC",
timeout_seconds: 30
}
};
yield {
toolName: "run_terminal_command",
input: {
command: "git log --oneline -10",
process_type: "SYNC",
timeout_seconds: 30
}
};
yield {
toolName: "add_message",
input: {
role: "assistant",
content: "I've analyzed the git diff and recent commit history. Now I'll read any relevant files to better understand the context of these changes."
}
};
yield "STEP";
yield {
toolName: "add_message",
input: {
role: "assistant",
content: "Now I'll analyze the changes and create a commit with a good commit message."
}
};
yield "STEP_ALL";
}
}