brainstorming
Structured design dialogue that validates ideas before implementation begins.
llamacpp
Complete llama.cpp C/C++ API reference covering model loading, inference, text generation, embeddings, chat, tokenization, sampling, batching, KV cache, LoRA adapters, and state management. Triggers on: llama.cpp questions, LLM inference code, GGUF models, local AI/ML inference, C/C++ LLM integra...
Full skill instructions
Comprehensive reference for the llama.cpp C API, documenting all non-deprecated functions and common usage patterns.
llama.cpp is a C/C++ implementation for LLM inference with minimal dependencies and state-of-the-art performance. This skill provides:
See references/workflows.md for complete working examples. Basic workflow:
llama_backend_init() - Initialize backendllama_model_load_from_file() - Load modelllama_init_from_model() - Create contextllama_tokenize() - Convert text to tokensllama_decode() - Process tokensllama_sampler_sample() - Sample next tokenUse this skill when:
llama_model: Loaded model weights and architecturellama_context: Inference state (KV cache, compute buffers)llama_batch: Input tokens and positions for processingllama_sampler: Token sampling configurationllama_vocab: Vocabulary and tokenizerllama_memory_t: KV cache memory handlellama_backend_init()llama_model_load_from_file()llama_init_from_model()llama_tokenize()llama_encode() or llama_decode()llama_sampler_sample()For detailed API documentation, the complete API is split across 6 files for efficient targeted loading. Start with references/api-core.md which links to all other sections.
API Files:
Total: 172 active, non-deprecated functions (b7631) across 6 organized files
Most common: llama_backend_init(), llama_model_load_from_file(), llama_init_from_model(), llama_tokenize(), llama_decode(), llama_sampler_sample(), llama_vocab_is_eog(), llama_memory_clear()
See references/api.md for all 172 function signatures and detailed usage.
See references/workflows.md for 13 complete working examples: basic text generation, chat, embeddings, batch processing, multi-sequence, LoRA, state save/load, custom sampling (XTC/DRY), encoder-decoder models, model detection, and memory management patterns.
See references/workflows.md for detailed best practices. Key points:
llama_model_default_params(), etc.)llama_n_ctx())llama_vocab_is_eog()End-of-generation check (llama_vocab_is_eog()), logits retrieval (llama_get_logits_ith()), batch creation (llama_batch_get_one()), tokenization buffer handling. See references/workflows.md for complete code examples.
Model loading fails:
n_gpu_layers if GPU memory insufficientTokenization returns negative value:
-n size and retryDecode/encode returns non-zero:
llama_batch_get_one() or llama_batch_init())llama_n_ctx())Silent failures / no output:
llama_vocab_is_eog() immediately returns truellama_log_set()Performance issues:
n_threads for CPUn_gpu_layers for GPU offloadingn_batch for promptsSliding Window Attention (SWA) issues:
ctx_params.swa_full = true to access beyond attention windowllama_model_n_swa(model) to detect SWA size and configuration needsPer-sequence state errors:
llama_state_seq_load_file(ctx, "file", dest_seq_id, ...)Model type detection:
llama_model_has_encoder() before assuming decoder-only architecturellama_encode() then llama_decode() workflowFor advanced issues: https://github.com/ggerganov/llama.cpp/discussions
If you're updating old code:
llama_model_load_from_file() instead of llama_load_model_from_file()llama_model_free() instead of llama_free_model()llama_init_from_model() instead of llama_new_context_with_model()llama_vocab_*() functions instead of llama_token_*()llama_state_*() functions instead of deprecated state functionsSee the API reference for complete mappings.
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs