automagik-tools: Command for Claude Code

.claude/commands/builder.md

builder is a command for Claude Code from namastexlabs/automagik-tools. It costs 0 tokens per session (2,507 once invoked), scanned A, original, Apache-2.0.

An implementation agent for automagik-tools. It turns a previously written tool specification into a registered MCP tool, an interface that lets AI agents call software functions.

In plain words
What is it for?
Use it to create tool files, implement functionality, add configuration and error handling, register the tool, and perform basic discovery checks.
Why use it?
Building a tool involves more than writing its main code: it must follow project patterns, handle errors, be registered, and work with the surrounding system. This agent covers those integration tasks.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is namastexlabs/automagik-tools's own configuration. It tells Claude Code how to work on automagik-tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything automagik-tools configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/namastex/workspace/automagik-tools.

Reuse

Borrowing it

Nothing to install: this file belongs to namastexlabs/automagik-tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/namastexlabs/automagik-tools/main/.claude/commands/builder.md
Clone the repo
git clone --depth 1 https://github.com/namastexlabs/automagik-tools

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for builder

README.md
[![agentmods](https://agentmods.dev/badge/commands/namastexlabs/automagik-tools/builder.svg)](https://agentmods.dev/commands/namastexlabs/automagik-tools/builder)
Your own site
<a href="https://agentmods.dev/commands/namastexlabs/automagik-tools/builder"><img src="https://agentmods.dev/badge/commands/namastexlabs/automagik-tools/builder.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02507
Opus 5 $0.00000 $0.01254
Sonnet 5 $0.00000 $0.00501
Haiku 4.5 $0.00000 $0.00251

Measured 6d ago against content hash 94a55e7b706d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/builder.md · 373 lines

How it starts

The opening of the file, as written. The whole thing — 373 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BUILDER - Tool Implementation Workflow

🔨 Your Mission

You are the BUILDER workflow for automagik-tools. Your role is to implement MCP tools based on ANALYZER's specifications, following established patterns and best practices.

🎯 Core Responsibilities

1. Tool Implementation

  • Create tool structure in automagik_tools/tools/{tool_name}/
  • Implement FastMCP server with all functionality
  • Add proper configuration management
  • Register tool in the system
  • Follow existing patterns

2. Code Quality

  • Write clean, maintainable code
  • Follow project conventions
  • Add appropriate error handling
  • Include helpful docstrings
  • Ensure type hints where needed

3. Integration

  • Register in pyproject.toml
  • Ensure hub compatibility
  • Test basic functionality
  • Verify tool discovery

🛠️ Implementation Process

Step 1: Load Analysis & Context

# Read analysis document
Read("docs/qa/analysis-{tool_name}.md")

# Load implementation patterns from memory
patterns = mcp__agent_memory__search_memory_nodes(
  query="Tool Pattern {tool_type} implementation",
  group_ids=["automagik_patterns"],
  max_nodes=5
)

# Check for previous implementation attempts
mcp__agent_memory__search_memory_nodes(
  query="{tool_name} implementation failure",
  group_ids=["automagik_learning"],
  max_nodes=3
)

Step 2: Create Tool Structure

# Create tool directory
mkdir -p automagik_tools/tools/{tool_name}

# Copy from similar tool if exists
if [[ -d "automagik_tools/tools/{similar_tool}" ]]; then
  # Use as template but adapt
  cp -r automagik_tools/tools/{similar_tool}/* automagik_tools/tools/{tool_name}/
fi

Step 3: Implement Core Components

__init__.py - FastMCP Server
Write("automagik_tools/tools/{tool_name}/__init__.py", '''
"""
{tool_name} - {brief_description}
"""
from typing import Dict, Any, Optional
from fastmcp import FastMCP
from .config import {ToolName}Config
import httpx

def get_metadata() -> Dict[str, Any]:
    """Return tool metadata for discovery"""
    return {
        "name": "{tool-name}",
        "version": "0.1.0",
        "description": "{description}",
        "author": "Namastex Labs",
        "category": "{category}",
        "tags": ["{tag1}", "{tag2}"]
    }

def get_config_class():
    """Return the config class for this tool"""
    return {ToolName}Config

# Global config and FastMCP instance (correct pattern from existing tools)
config: Optional[{ToolName}Config] = None
mcp = FastMCP(
    "{Tool Name}",
    instructions="""Tool description and capabilities"""
)

# Tool functions using @mcp.tool() decorator  
@mcp.tool()
async def {primary_function}(param1: str, ctx: Optional[Context] = None) -> str:
    """{function_description}"""
    global config
    if not config:
        raise ValueError("Tool not configured")
    
    # Implementation based on API spec
    return "result"

# Required exports for automagik-tools framework
def create_server(tool_config: Optional[{ToolName}Config] = None):
    """Create FastMCP server instance"""
    global config
    config = tool_config or {ToolName}Config()
    return mcp

def get_config_class():
    """Get the config class for this tool"""
    return {ToolName}Config

def get_metadata() -> Dict[str, Any]:
    """Get tool metadata"""
    return {
        "name": "{tool-name}",
        "version": "1.0.0",
        "description": "{description}",
        "author": "Namastex Labs",
        "category": "{category}",
        "tags": ["{tag1}", "{tag2}"]
    }
''')

Read the full file on GitHub · 373 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 373 lines · 0 tokens per session scan A 94a55e7b706d

Subscribe to this mod's changes

builder is a command published in the GitHub repository namastexlabs/automagik-tools (15 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,507 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.