用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/arm2arm/AstroAgentAssistant --skill local-llm-setup命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
S3/MinIO operations: connectivity, transfers, read benchmarks, and matplotlib visualization templates.
Complete guide to the REANA reproducible analytics platform: Dockerized client setup, multi-backend profiles, workflow authoring patterns, S3 dataset workflows, and best practices. Covers dev/prod backends, serial workflows, REANA_WORKSPACE usage, and self-learning from finished workflows.
Complete guide to working with Arepo simulation HDF5 files: structure inspection, unit conversion, radial profiles, slice projections, and dimensionality reduction (UMAP/t-SNE) for clustering analysis.
正在显示 SKILL.md
| name | local-llm-setup |
| description | Diagnose local LLMs, bridge formats for Claude Code, Codex. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["Coding-Agent","Local-LLM","Setup","Troubleshooting","Proxy"]}} |
When a user wants a coding agent (Claude Code, Codex, OpenCode) running on a local/self-hosted LLM.
curl -s https://<host>/v1/models \
-H "Authorization: Bearer <key>"
Expected: {"data":[{"id":"<model-name>"}],"object":"list"}
curl -s -X POST https://<host>/v1/chat/completions \
-H "Authorization: Bearer <key>" \
-H "Content-Type: application/json" \
-d '{"model":"<model>","messages":[{"role":"user","content":"hi"}],"max_tokens":20}'
| Result | Meaning |
|---|---|
| 200 OK | OpenAI-compatible, coding agent may work |
| 405 Method Not Allowed | Models endpoint works but chat completions not served — agent WILL fail |
| 404 | Wrong path, service down, or incomplete API |
A models endpoint returning 200 does NOT mean the service is ready for Claude Code. Always test /v1/chat/completions.
If the endpoint speaks OpenAI (/v1/chat/completions) but Claude Code needs Anthropic format:
pip install litellm
litellm --model openai/<provider>/<model> --host <host> --port 4000
Then:
ANTHROPIC_API_KEY=*** \
ANTHROPIC_BASE_URL=http://127.0.0.1:4000/v1/messages \
claude -p "task" --max-turns 1
Point the agent directly at the local endpoint using environment variables:
ANTHROPIC_API_KEY=*** ANTHROPIC_BASE_URL=<host>/v1OPENAI_API_KEY=*** OPENAI_BASE_URL=<host>/v1--model <provider>/<model> with appropriate authANTHROPIC_API_KEY can be any string for local endpoints — it just needs to be present for auth validation--max-turns 1 for smoke tests/v1/models but not /v1/chat/completions is misconfigured — Claude Code cannot use it. Fix the upstream or add a proxy.--sandbox danger-full-access for Codex or --bare for Claude Codeollama pull <model-name>
ollama list | grep <model-name> # verify
import yaml
with open('/home/hermes/.hermes/config.yaml', 'r') as f:
config = yaml.safe_load(f)
# Add model to provider's model list (don't overwrite)
models = config['providers']['ollama'].setdefault('models', [])
if '<model-name>' not in models:
models.append('<model-name>')
with open('/home/hermes/.hermes/config.yaml', 'w') as f:
yaml.dump(config, f, default_flow_style=False, sort_keys=False, allow_unicode=True)
hermes config set model.provider ollama
hermes config set model.default <model-name>
import requests, time, json
payload = {
"model": "<model-name>",
"prompt": "List 50 items quickly.",
"stream": True,
"options": {"temperature": 0.7, "num_predict": 80}
}
resp = requests.post("http://localhost:11434/api/generate", json=payload, stream=True, timeout=300)
tokens_count = 0
start = time.time()
ttft = None
for line in resp.iter_lines():
if line:
chunk = json.loads(line)
if "response" in chunk:
tokens_count += 1
if ttft is None:
ttft = time.time() - start
elapsed = time.time() - start
tps = tokens_count / elapsed
print(f"TTFT: {ttft:.1f}s | Tokens: {tokens_count} | Time: {elapsed:.1f}s | TPS: {tps:.1f}")
Expected TPS: ~10-15 on CPU for 27B models (no GPU). 2-4x faster per token on GPU.
model.default — it may still point to the removed model. Switch it back to a valid one.ollama pull can take a long time for large models (17GB+). Set generous timeouts./v1/completions endpoint may timeout for generation — use /api/generate with stream: True for reliable measurement.ollama --version and GitHub releases. Stable lags behind.dflash quants in Ollama 0.32.7 work only on the MLX engine (Apple Silicon). CUDA/ROCm/Linux ARM64 returns 412 even on latest stable. Check release notes for "coming days" disclaimers before installing pre-release builds. Always check available tags at https://ollama.com/library/<model>/tags — non-MLX tags (e.g., q4_K_M, q8_0, bf16) usually work cross-platform immediately.claude-code skill for Claude Code orchestration patternscodex skill for Codex workflow patterns