llama-cpp-worker
C++ development worker for llama.cpp speculative decoding fixes, CUDA builds, and server validation
Skill by DammianMiller
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dammianmiller-llama-cpp-worker
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/llama-cpp-worker
What's inside
- Skill name
llama-cpp-worker- Description
- C++ development worker for llama.cpp speculative decoding fixes, CUDA builds, and server validation
- License
- MIT
- Instructions
- 139 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
# llama.cpp C++ Worker
NOTE: Startup and cleanup are handled by `worker-base`. This skill defines the WORK PROCEDURE.
## When to Use This Skill
Features that involve:
- C++ code changes in llama.cpp (speculative decoding, memory management, server)
- CUDA builds and binary testing
- Server restart and direct query validation
- Speculative decoding parameter tuning
## Required Skills
None (all validation is via curl and log inspection).
## Work Procedure
### 1. Understand the Feature
- Read the feature description, preconditions, expectedBehavior, and verificationSteps carefully
- Read AGENTS.md for bug details, key paths, and validation test prompts
- Read the specific source files mentioned in the feature description
### 2. Read Current Code State
- Read the FULL files being modified (not just diffs) to understand context
- The main files are in `/home/cogtek/llama.cpp/.worktrees/003-faststate-029/`:
- `src/llama-memory-hybrid.cpp` (checkpoint save/restore)
- `src/llama-memory-hybrid.h` (data structures)
- `common/speculative.cpp` (compat check, draft management)
- `tools/server/server-common.cpp` (server tool handling)
- Also read upstream versions in worktree 002 for reference
### 3. Make Code Changes
- Edit files in worktree 003-faststate-029
- Follow existing code style (4-space indent, snake_case)
- Use LLAMA_LOG_DEBUG/LLAMA_LOG_WARN/LLAMA_LOG_ERROR for logging
- Always check return values of memory operations
- Keep changes minimal and focused
### 4. Build
```bash
cd /home/cogtek/llama.cpp/.worktrees/003-faststate-029
cmake --build build-cuda --config Release -j 32
```
- If build fails, fix errors and rebuild
- Build MUST succeed before proceeding
### 5. Restart Server and Test
Use port 8080 for raw llama.cpp validation only. Proxy-first coding-agent flows should still target port 4000.
```bash
# Check if server is idle
curl -s http://localhost:8080/slots | python3 -c "import sys,json; d=json.load(sys.stdin); print('idle' if all(s.get('state','')!='started' for s in d) else 'BUSY')"
# Kill current server
kill $(ps aux | grep 'llama-server.*8080' | grep -v grep | awk '{print $2}') 2>/dev/null
sleep 3
# Start with spec enabled
nohup /home/cogtek/llama.cpp/.worktrees/003-faststate-029/build-cuda/bin/llama-server \
--model /home/cogtek/Downloads/Qwen3.5-35B-A3B-UD-IQ4_XS.gguf \
--host 0.0.0.0 --port 8080 --threads 32 --ctx-size 65536 \
--cache-type-k q4_0 --cache-type-v q4_0 --gpu-layers 99 \
--flash-attn on --batch-size 512 --ubatch-size 512 --parallel 1 \
--n-predict 32768 --repeat-penalty 1.0 --defrag-thold 0.1 \
--spec-type ngram-cache --draft-max 12 --draft-min 2 --draft-p-min 0.80 \
--jinja --chat-template-file /home/cogtek/dev/miller-tech/universal-agent-protocol/tools/agents/config/qwen-sharp.jinja \
--log-file /home/cogtek/llama.cpp/llama-server.log --metrics \
> /tmp/llama-test-startup.log 2>&1 &
# Wait for model load
sleep 35
curl -s http://localhost:8080/health
```
NOTE: Use ctx-size 65536 for testing (faster startup). Production uses 262144.
### 6. Run Validation Tests
Run ALL 4 test prompts from AGENTS.md. For each:
- Check response content for degenerate repetition
- Check server log for draft acceptance rate
- Check for non-consecutive token position warnings
### 7. Iterate
If tests fail:
- Analyze the failure mode (what kind of corruption, which test)
- Check server logs for clues
- Make targeted code changes
- Rebuild and re-test
- Do NOT give up after one iteration - keep iterating until tests pass or return with detailed failure analysis
### 8. Final Validation
Once all 4 tests pass:
- Run 5 consecutive queries to verify stability (VAL-SPEC-006)
- Run a multi-turn conversation (VAL-SPEC-007)
- Verify draft acceptance rate > 0% in logs
### 9. Commit
```bash
cd /home/cogtek/llama.cpp/.worktrees/003-faststate-029
git add -A
git commit -m "fix: correct 4 bugs in hybrid speculative checkpoint system"
```
## Example Handoff
```json
{
"salientSummary": "Fixed all 4 checkpoint bugs in llama-memory-hybrid.cpp: moved save to seq_rm callsite, added full cell metadata restore, synchronized attn/recurrent positions, and fixed compat check to test intermediate rollback. Built CUDA binary, restarted server with ngram-cache spec. All 4 test prompts produce clean output. Draft acceptance rate: 8.5% on JSON schema, 12.3% on multi-turn. Zero repetition artifacts across 5 consecutive queries.",
"whatWasImplemented": "Fixed save timing (checkpoint now saved in seq_rm before clear, not in init_batch before decode). Fixed cell metadata restore (now reinitializes src, src0, head, tail, occupied status). Added attention cache sync after recurrent restore (mem_attn->seq_rm matching recurrent rollback position). Fixed compat check to test pos 3->1 rollback not just end->start.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{"command": "cmake --build build-cuda --config Release -j 32", "exitCode": 0, "observation": "Build succeeded, no warnings in modified files"},
{"command": "curl JSON schema test", "exitCode": 0, "observation": "600 tokens, clean structured JSON, no repetition"},
{"command": "curl User schema test (temp=0)", "exitCode": 0, "observation": "102 tokens, clean JSON object, no 'User:User:User' pattern"},
{"command": "curl Fibonacci test", "exitCode": 0, "observation": "300 tokens, valid Python function, no 'val=val=val' pattern"},
{"command": "curl proxy tool_use test", "exitCode": 0, "observation": "Valid tool_use block returned"},
{"command": "grep 'draft acceptance rate' server.log", "exitCode": 0, "observation": "Rates: 8.5%, 12.3%, 5.1%, 14.8% across 4 tests"},From DammianMiller/universal-agent-protocol, MIT.
More from DammianMiller/universal-agent-protocol
- 0.598score
design-system
DammianMiller
Keep a project's UI/UX on its DESIGN.md design system.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
agent-collaboration-board
DammianMiller
Use the shared collaboration board to coordinate with other agents — post findings, dead-ends, integrity flags, and handoffs, and read peers' posts before…
SkillAFreshness: A★ 2Claude Code +9 - 0.595score
hooks-session-start
DammianMiller
Session initialization hook that cleans stale agents, injects recent memory context, and ensures 100% CLAUDE.md adherence
SkillAFreshness: A★ 2Claude Code +9 - 0.592score
scripts-tool-router
DammianMiller
Intelligent tool routing and pattern matching for automated tasks
SkillAFreshness: A★ 2Claude Code +9 - 0.592score
hooks-pre-compact
DammianMiller
Pre-compact hook for database optimization, cleanup, and CLAUDE.md compliance preservation
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
scripts-preload-memory
DammianMiller
Memory system preloading and context initialization
SkillAFreshness: A★ 2Claude Code +9 - 0.588score
infra-worker
DammianMiller
Infrastructure worker for systemd services, env files, and process management
SkillAFreshness: A★ 2Claude Code +9 - 0.586score
cli-design-expert
DammianMiller
Expert CLI/TUI designer for building intuitive, user-friendly, and professional command-line interfaces.
SkillAFreshness: A★ 2Claude Code +9 - 0.568score
session-context-preservation-droid
DammianMiller
This droid specializes in maintaining project knowledge continuity across session boundaries by intelligently capturing, synthesizing, and retrieving context…
SkillAFreshness: A★ 2Claude Code +9 - 0.329score
parallel-expert-review
DammianMiller
No description from the publisher yet.
SkillAFreshness: A★ 2Claude Code +9 - 0.329score
adversarial
DammianMiller
No description from the publisher yet.
SkillAFreshness: A★ 2Claude Code +9 - 0.329score
batch-review
DammianMiller
No description from the publisher yet.
SkillAFreshness: A★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 20, 2026 (2 months ago)
- Last release
- Oct 9, 2026 (20 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from DammianMiller
- 0.598score
design-system
DammianMiller
Keep a project's UI/UX on its DESIGN.md design system.
SkillAFreshness: A★ 2Claude Code +9 - 0.598score
agent-collaboration-board
DammianMiller
Use the shared collaboration board to coordinate with other agents — post findings, dead-ends, integrity flags, and handoffs, and read peers' posts before…
SkillAFreshness: A★ 2Claude Code +9 - 0.595score
hooks-session-start
DammianMiller
Session initialization hook that cleans stale agents, injects recent memory context, and ensures 100% CLAUDE.md adherence
SkillAFreshness: A★ 2Claude Code +9 - 0.592score
scripts-tool-router
DammianMiller
Intelligent tool routing and pattern matching for automated tasks
SkillAFreshness: A★ 2Claude Code +9 - 0.592score
hooks-pre-compact
DammianMiller
Pre-compact hook for database optimization, cleanup, and CLAUDE.md compliance preservation
SkillAFreshness: A★ 2Claude Code +9 - 0.589score
scripts-preload-memory
DammianMiller
Memory system preloading and context initialization
SkillAFreshness: A★ 2Claude Code +9
Cite this page
llama-cpp-worker skill. Agent Mart. https://agentmart.dev/skills/dammianmiller-llama-cpp-worker (last updated 2026-10-24)