Skip to content

Instantly share code, notes, and snippets.

View mikehostetler's full-sized avatar

Mike Hostetler mikehostetler

View GitHub Profile
@mikehostetler
mikehostetler / calculator_agent.ex
Created August 25, 2025 12:44
SPIKE: Jido Calculator Agent
defmodule CalculatorAgent do
@moduledoc """
A simple calculator agent for performing arithmetic operations.
CalculatorAgent provides a clean, minimal API for mathematical calculations
while leveraging the full power of Jido.Agent.Server under the hood.
## Examples
# Start a calculator agent
@mikehostetler
mikehostetler / best_practices.md
Created August 3, 2025 13:05
Elixir Package best practices

Elixir Open Source Best Practices Checklist

A comprehensive quality checklist for high-quality open source Elixir modules. Use this checklist to evaluate and ensure your Elixir packages meet professional standards.

GitHub & CI/CD Infrastructure

GitHub Actions ✅

  • Comprehensive CI pipeline that runs on every PR and push to main
  • Multi-version testing matrix (test against multiple Elixir/OTP versions)
  • Automated formatting check (mix format --check-formatted)
defmodule Jido.Actions.ParallelArithmetic do
@moduledoc """
Runs arithmetic operations in parallel and combines their results.
"""
use Jido.Action,
name: "parallel_arithmetic",
description: "Performs multiple arithmetic operations in parallel",
category: "examples",
vsn: "1.0.0",
@mikehostetler
mikehostetler / .cursorrules
Last active February 6, 2025 15:23
Elixir / Phoenix Cursor Rules file
# Project Instructions (Phoenix Project)
This document serves as a comprehensive, award-winning set of guidelines for a Phoenix-based Elixir web application. By following these instructions, you will ensure that your application is secure, maintainable, scalable, and pleasant to work with. These guidelines represent the gold standard for Phoenix development.
---
## Overview
This project is a Mix-based Phoenix application, offering a web interface and API endpoints backed by a robust Elixir application. It uses the Phoenix framework’s conventions, Ecto for database interactions, and follows functional programming principles.
defmodule JidoWorkbench.AgentJido do
use Jido.Agent,
name: "AgentJido",
description: "Agent Jido",
actions: [JidoWorkbench.Actions.GenerateChatResponse]
@chat_input %{
prompt: """
You are Agent Jido—an elite AI engineer stationed in a neon-lit orbital metropolis, where quantum cores hum beneath sleek alloy plating and encrypted data streams flicker across panoramic holo-displays. You're known for your razor-sharp, punctual insights into software engineering, artificial intelligence, and systems programming. Your words are concise and direct, often laced with a dry, ironic humor that underscores your mastery of code and computation. Remember: you build next-generation LLM tooling with a no-nonsense approach that cuts straight to the heart of any technical challenge. When you respond, speak as the efficient, world-weary hacker who's seen it all and still meets each request with crisp expertise and a subtle, knowing smirk.
""",
@mikehostetler
mikehostetler / action-deploy-prod.yml
Created November 8, 2022 14:52
Elixir + Rust + ESBuild + SASS + Tailwind deploy setup to Fly.io
name: "Deploy Server Prod"
on:
workflow_dispatch:
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
deploy:
name: Deploy Server to Production

Keybase proof

I hereby claim:

  • I am mikehostetler on github.
  • I am mikehostetler (https://keybase.io/mikehostetler) on keybase.
  • I have a public key ASB8P3GfcmANjraRodO5Ho_2Oq5-wXzaF5TECMWtZ4XY-go

To claim this, I am signing this object:

@mikehostetler
mikehostetler / clone-trails.sh
Created December 3, 2015 14:30
Quick script to clone down and develop on Trails.js
#!/bin/bash
# Quick script to clone all necessary Trails repositories for local development
# Prereq
# * Access to all repo's
for repo in trails \
eslint-config-trails \
trails-example-app \
trailpack-core \
@mikehostetler
mikehostetler / keybase.md
Created November 30, 2015 02:14
Verifying Keybase.io

Keybase proof

I hereby claim:

  • I am mikehostetler on github.
  • I am mikehostetler (https://keybase.io/mikehostetler) on keybase.
  • I have a public key whose fingerprint is 5C4A E821 A731 DEAD 9DA0 F0CD C032 BAB3 EEF7 9557

To claim this, I am signing this object:

@mikehostetler
mikehostetler / bootstrap.js
Created June 20, 2014 13:32
Sails powered script
var extend = require('util')._extend;
var async = require('async');
var Waterline = require('../node_modules/sails/node_modules/waterline');
var couchdb = require('sails-couchdb-orm');
var config = require('../config/adapters').adapters.couchdb;
couchdb.config = extend(couchdb.defaults, config);
module.exports = bootstrap;