local-ai-query
Skill9 starsChanged 3 months agoMITView on GitHub
If this fails, start the stack: cd docker/local-ai-stack && docker compose up -d Pull a model if needed: Simple generation: Chat format (multi-turn): With system prompt: When chromadb is also running:
In this repository109 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- agent/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .agents/skills/llms.txtllms.txt
- agent-harnessSkill
- auto-fixSkill
- brain-dumpSkill
- industrial-brutalist-uiSkill
- changelog-enforcerSkill
- checkpoint-strategySkill
- context-primeSkill
- cooldown-resumeSkill
- council-reviewSkill
- data-quality-auditSkill
- debug-tracerSkill
- dependency-auditSkill
- deslopSkill
- docs-syncSkill
- duplicate-threadSkill
- email-triageSkill
- fabric-patternsSkill
- feature-flagSkill
- git-hygieneSkill
- graphifySkill
- implementation-plannerSkill
- insightsSkill
- issue-resolverSkill
- learn-ruleSkill
- lr-schedule-advisorSkill
- minimalist-uiSkill
- modularity-reviewSkill
- full-output-enforcementSkill
- parallel-agentsSkill
- parallel-worktreesSkill
- prompt-librarySkill
- prompt-transparencySkill
- pro-workflowSkill
- redesign-existing-projectsSkill
- release-readinessSkill
- replay-learningsSkill
- repo-memory-updaterSkill
- repowise-intelligenceSkill
- researchSkill
- resource-panelSkill
- risky-module-reviewSkill
- sandboxed-execSkill
- scope-guardSkill
- self-improveSkill
- session-handoffSkill
- skill-composerSkill
- smart-commitSkill
- high-end-visual-designSkill
- stitch-design-tasteSkill
- system-prompt-auditSkill
- task-alive-updatesSkill
- task-scoperSkill
- design-taste-frontendSkill
- test-first-executorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
If this fails, start the stack: cd docker/local-ai-stack && docker compose up -d
- Very specific: line 91
When chromadb is also running:
- Distinctive: line 113
All data stays on your machine — no cloud API calls
- Distinctive: line 116
No telemetry sent externally
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: local-ai-query
Purpose
Route prompts to a locally running Ollama instance instead of cloud AI APIs. Use this for privacy-sensitive tasks, offline work, or cost reduction. Pairs with the Docker stack in docker/local-ai-stack/.
When to Use
- Processing sensitive/proprietary code or data that shouldn't leave the machine
- Offline or air-gapped environments
- Rapid iteration where cloud latency matters
- Cost-conscious experimentation with large prompts
Prerequisites
- Ollama running locally (see
docker/local-ai-stack/README.md) - At least one model pulled:
docker exec ollama ollama pull llama3.2:latest
Steps
1. Verify Ollama is available
curl -s http://localhost:11434/api/tags | jq '.models[].name'If this fails, start the stack: cd docker/local-ai-stack && docker compose up -d
2. Choose appropriate model
| Task | Recommended Model |
| Code generation | deepseek-coder-v2:latest or codellama:latest |
| General chat | llama3.2:latest |
| Summarization | llama3.2:latest |
| Embeddings/RAG | nomic-embed-text:latest |
| Fast/small | phi3:mini |
Pull a model if needed:
docker exec ollama ollama pull <model-name>3. Send query to local model
Simple generation:
curl http://localhost:11434/api/generate \
-d '{
"model": "llama3.2:latest",
"prompt": "<YOUR_PROMPT>",
"stream": false
}' | jq -r .responseChat format (multi-turn):
curl http://localhost:11434/api/chat \
-d '{
"model": "llama3.2:latest",
"messages": [
{"role": "user", "content": "<YOUR_MESSAGE>"}
],
"stream": false
}' | jq -r '.message.content'With system prompt:
curl http://localhost:11434/api/chat \
-d '{
"model": "llama3.2:latest",
"messages": [
{"role": "system", "content": "You are a senior software engineer. Be concise and technical."},
{"role": "user", "content": "<YOUR_MESSAGE>"}
],
"stream": false
}' | jq -r '.message.content'4. Generate embeddings (for RAG)
curl http://localhost:11434/api/embeddings \
-d '{
"model": "nomic-embed-text:latest",
"prompt": "<TEXT_TO_EMBED>"
}' | jq '.embedding | length'5. List running models
curl -s http://localhost:11434/api/ps | jq '.models[].name'Integration with ChromaDB (RAG)
When chromadb is also running:
import chromadb
import requests
# Embed with Ollama
def embed(text: str) -> list[float]:
r = requests.post("http://localhost:11434/api/embeddings",
json={"model": "nomic-embed-text:latest", "prompt": text})
return r.json()["embedding"]
# Store in ChromaDB
client = chromadb.HttpClient(host="localhost", port=8000)
collection = client.get_or_create_collection("knowledge")
collection.add(documents=["Your doc here"], embeddings=[embed("Your doc here")], ids=["doc1"])
# Query
results = collection.query(query_embeddings=[embed("search query")], n_results=3)Privacy Notes
- All data stays on your machine — no cloud API calls
- Models run entirely in your Docker containers
- ChromaDB vectors are stored in
chroma_dataDocker volume - No telemetry sent externally
Limitations
- Slower than cloud APIs (depends on hardware)
- Smaller context windows on some models
- Quality varies by model — use larger models for complex tasks
Related Skills
research— use local-ai-query for private research tasksbrain-dump— process sensitive braindumps locallydebug-tracer— analyze proprietary code locally
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

