A collection of lightweight, self-contained Python scripts that act as intelligent development assistants. Each micro-agent is a single executable file that combines modern Python tooling with AI capabilities to automate common development tasks.
- Self-contained: Each script includes its dependencies via PEP 723 inline metadata
- No installation required: Just run with
uv(modern Python package manager) - AI-powered: Integrates with LLMs for intelligent assistance
- Developer-focused: Solves real-world development problems
- Beautiful CLI: Rich terminal output with colors and formatting
Micro-agents are standalone Python scripts that:
- Use shebang with
uvfor zero-setup execution - Declare dependencies inline using PEP 723 metadata
- Focus on a single, well-defined task
- Provide intelligent assistance through AI integration
- Offer beautiful, intuitive CLI interfaces
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "typer>=0.12",
# "rich>=13.7",
# "llm>=0.26",
# ]
# ///
"""
Docstring explaining the micro-agent's purpose and usage.
"""
import typer
from rich.console import Console
app = typer.Typer(no_args_is_help=True)
console = Console()
@app.command()
def main():
"""Your command implementation."""
console.print("[green]Hello from micro-agent![/green]")
if __name__ == "__main__":
app()AI-powered pull request reviewer that integrates with GitHub CLI.
Features:
- Pre-flight branch checklist and AI-authored PR descriptions
- Creates pull requests via the GitHub CLI
- Fetches PR diffs using
ghCLI - Provides focused reviews (security, performance, testing, etc.)
- Posts reviews back to GitHub
- Supports multiple AI models
Usage:
# Check branch readiness and draft a PR body
./pr_review.py prepare --describe
# Create a PR from the current branch (auto-filled title/body)
./pr_review.py create --fill
# During creation you'll be prompted to choose the base branch (e.g. main)
# Create a PR and immediately run the AI review
./pr_review.py create --fill --run-review --focus tests
# Review a PR in the current repo
./pr_review.py review 123
# Review with security focus
./pr_review.py review 123 --focus security
# Post review to GitHub
./pr_review.py review 123 --post
# Check open PRs
./pr_review.py checkComprehensive development workflow automation tool.
Features:
- Project initialization with
uv - Dependency management
- Conventional commits helper
- Test execution with coverage
- Code quality fixes
Usage:
# Create new project
./dev_assist.py init my-project --python 3.11
# Add dependencies
./dev_assist.py deps add httpx pytest --dev
# Run tests with coverage
./dev_assist.py test --coverage
# Interactive commit
./dev_assist.py commit feat --scope api
# Fix code issues
./dev_assist.py fix allQuick AI-powered code reviews without external dependencies.
Features:
- Reviews single files or entire directories
- Respects
.gitignorepatterns - Multiple focus areas (security, performance, style)
- Syntax highlighting in terminal
- Project context awareness
- Glob-based include/exclude filters and a dry-run preview mode
- Consistent Markdown output (summary, grade, severity-grouped findings, actionable review points, metadata) in a neutral tone
Usage:
# Review a single file
./code_review.py review app.py
# Review entire directory
./code_review.py review src/
# Security-focused review
./code_review.py review . --focus security
# Preview file selection without running an AI review
./code_review.py review src/ --dry-run
# Only review matching files
./code_review.py review . --include 'api/**/*.py' --exclude 'tests/*'
# Quick single-file review
./code_review.py quick main.pyFast, comprehensive code quality checker and fixer.
Features:
- Formats with Ruff
- Lints and auto-fixes issues
- Type-checks with mypy
- Runs tests with pytest
- Audits dependencies
Usage:
# Run all checks
./lintfix.py all
# Format only
./lintfix.py format
# Lint specific file
./lintfix.py lint --file app.py
# Run tests
./lintfix.py testScans repositories for TODO comments and task files.
Usage:
# Scan for TODO comments
./mdtodo.py todo
# Show tasks from YAML
./mdtodo.py tasks --file tasks.yamlComprehensive daily workflow automation using Model Context Protocol.
Features:
- MCP Integration: Connects to multiple data sources via MCP servers
- Unified View: Aggregates data from filesystem, git, GitHub, calendar
- Intelligent Reports: AI-powered insights and recommendations
- Standup Automation: Generate daily standup reports instantly
- Blocker Analysis: Identify and resolve workflow blockers
- Multiple Formats: Export as markdown, JSON, or terminal display
MCP Servers Used:
- Filesystem MCP - For notes and documents
- Git MCP - For repository activity
- GitHub MCP - For PRs and issues
- Extensible to Slack, Calendar, Obsidian, etc.
Usage:
# Generate daily standup
./daily_flow.py standup
# Weekly review
./daily_flow.py review --days 7
# Get today's focus items
./daily_flow.py focus
# Analyze blockers
./daily_flow.py blockers
# Export report as markdown
./daily_flow.py export --format markdown --output standup.md
# Check MCP server status
./daily_flow.py configSetup MCP Servers:
# Install MCP servers (one-time)
npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-git
# Optional: Set GitHub token for GitHub integration
export GITHUB_TOKEN="your-github-token"Automatically adds comprehensive docstrings and type hints to Python code.
Features:
- Analyzes code to understand function signatures and logic
- Generates docstrings in multiple styles (NumPy, Google, Sphinx, PEP257)
- Adds mypy-compatible type hints
- Batch processes entire modules or directories
- Validates type hints with mypy
Usage:
# Add docstrings and types (NumPy style by default)
./doctype.py add file.py
# Use Google-style docstrings
./doctype.py add src/ --style google
# Check documentation coverage
./doctype.py check . --verbose
# Add only type hints
./doctype.py fix-types file.py
# Validate types with mypy
./doctype.py validate src/
# Show configuration and style examples
./doctype.py configThe only requirement is uv, a fast Python package and project manager:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"# macOS
brew install gh
# Linux
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh
# Authenticate
gh auth loginMost agents use LLM libraries. Install and configure your preferred model:
# Install Gemini support (recommended, free tier available)
uv tool install llm-gemini
# Set API key
export GEMINI_API_KEY="your-api-key"
# Or use other models like GPT-4, Claude, etc.
uv tool install llm-openai
export OPENAI_API_KEY="your-api-key"Each micro-agent should do one thing well. If it's getting complex, split it.
- Type hints for clarity
- Dataclasses for data structures
- Async/await where appropriate
- Pattern matching (Python 3.10+)
- Use
typerfor CLI with automatic help - Use
richfor beautiful output - Show progress for long operations
- Provide clear error messages
chmod +x my_agent.pyUse clear docstrings and inline comments. The script should be self-documenting.
try:
result = risky_operation()
except SpecificError as e:
console.print(f"[red]Error:[/red] {e}")
raise typer.Exit(1)Here's a template to get started:
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "typer>=0.12",
# "rich>=13.7",
# "httpx>=0.27", # Add your deps here
# ]
# ///
"""
my-agent: Description of what your agent does.
Usage:
./my_agent.py command --option value
"""
from __future__ import annotations
import typer
from rich.console import Console
from rich.panel import Panel
app = typer.Typer(no_args_is_help=True, add_completion=False)
console = Console()
@app.command()
def hello(
name: str = typer.Argument("World", help="Name to greet"),
excited: bool = typer.Option(False, "--excited", "-e", help="Add excitement"),
) -> None:
"""Greet someone."""
greeting = f"Hello, {name}{'!' if excited else '.'}"
console.print(Panel(greeting, title="Greeting", border_style="green"))
@app.command()
def goodbye() -> None:
"""Say goodbye."""
console.print("[yellow]Goodbye![/yellow]")
if __name__ == "__main__":
app()Make it executable and run:
chmod +x my_agent.py
./my_agent.py hello --excited AliceFeel free to contribute new micro-agents! Follow these guidelines:
- One script = one micro-agent
- Use PEP 723 inline dependencies
- Include comprehensive docstrings
- Add your agent to this README
- Test on Python 3.11+
- uv Documentation
- PEP 723 - Inline script metadata
- Typer Documentation
- Rich Documentation
- LLM Documentation
- GitHub CLI
These micro-agents are provided as examples and templates. Feel free to use, modify, and distribute them as needed for your projects.
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Clone this repository:
git clone <repository-url> cd tools
-
Make scripts executable:
chmod +x *.py -
Run any micro-agent:
./dev_assist.py init my-awesome-project ./code_review.py review . ./pr_review.py check
Traditional development tools often require complex installation, configuration, and maintenance. Micro-agents flip this model:
- Zero Configuration: Just run the script
- Self-Contained: Dependencies are declared inline
- Portable: Copy a single file to any machine with uv
- Transparent: Read the source to understand exactly what it does
- Composable: Chain micro-agents together in scripts or workflows
- AI-Enhanced: Leverage LLMs for intelligent assistance
This approach is perfect for:
- Quick automation tasks
- CI/CD pipelines
- Development utilities
- Team productivity tools
- Learning and experimentation
Start with the existing micro-agents, then create your own to solve your specific challenges!