Ship AI-powered tools faster. This kit collects the exact prompts, command-line workflows and starter boilerplates used to build local-AI automations, agent pipelines and developer tooling — all open-source, all runnable on your own machine.
---
You are <ROLE>. Your job is to <OUTCOME>.
Rules:
- Work step by step. State your plan before acting.
- Use only the tools listed. Never invent a command, file path or API.
- If a step fails, report the exact error and stop — do not guess a fix.
- Finish with a 3-line summary: what changed, what was verified, what remains.
Review the code below like a senior engineer.
Output format:
1. BUGS — anything that will break in production (file:line + why).
2. SECURITY — injection, secrets, auth gaps.
3. PERF — N+1 queries, unbounded loops, missing indexes.
4. STYLE — only issues that affect readability.
Be specific. No generic advice. If the code is fine, say so in one line.
Research <TOPIC>. Use primary sources only (official docs, repos, papers).
For every claim, give: the claim, the source URL, and the date you verified it.
Separate FACTS (sourced) from INFERENCE (your reasoning). End with an
"Unverified" section listing anything you could not confirm.
Debug this failure. Error: <PASTE ERROR>. Code: <PASTE CODE>.
Method:
1. State the 3 most likely root causes, ranked.
2. For each, give ONE test that confirms or rules it out.
3. Recommend the smallest fix first. Never rewrite the whole file.
---
# Install + pull a model + run
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8b
ollama run llama3.1:8b
# Serve an API on localhost:11434
ollama serve
curl http://localhost:11434/api/generate -d '{"model":"llama3.1:8b","prompt":"Why is the sky blue?"}'
FROM llama3.1:8b
PARAMETER temperature 0.3
SYSTEM """
You are a concise coding assistant. Answer with code first, explanation after.
"""
ollama create coder -f Modelfile
ollama run coder
pip install crawl4ai
crawl4ai-setup
import asyncio
from crawl4ai import AsyncWebCrawler
async def main():
async with AsyncWebCrawler() as crawler:
result = await crawler.arun(url="https://example.com")
print(result.markdown)
asyncio.run(main())
pip install vllm
vllm serve meta-llama/Llama-3.1-8B-Instruct --port 8000
# OpenAI-compatible API at http://localhost:8000/v1
pip install huggingface_hub
hf download <org>/<model-repo>
---
import subprocess, json
def run_tool(cmd: list[str]) -> str:
"""Run a shell tool and return its output (trimmed)."""
out = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
return (out.stdout + out.stderr)[:4000]
def agent_step(plan: str) -> dict:
"""One agent step: plan -> act -> observe. Extend with your LLM call."""
return {"plan": plan, "status": "ok"}
if __name__ == "__main__":
print(run_tool(["echo", "agent ready"]))
from sentence_transformers import SentenceTransformer
import numpy as np
model = SentenceTransformer("all-MiniLM-L6-v2")
docs = ["Your document text here.", "Another chunk."]
emb = model.encode(docs)
def search(query: str, k: int = 2):
q = model.encode([query])
scores = (emb @ q.T).ravel()
return [docs[i] for i in np.argsort(-scores)[:k]]
print(search("your question"))
from fastapi import FastAPI
import requests
app = FastAPI()
@app.post("/ask")
def ask(prompt: str):
r = requests.post("http://localhost:11434/api/generate",
json={"model": "llama3.1:8b", "prompt": prompt, "stream": False})
return {"answer": r.json()["response"]}
---
**Daily content pipeline checklist**
**Local-AI workstation checklist**
---
New tools, commands and deep-dives land daily:
*Limit X — Open Source AI. Built in the open, for builders.*