davila7/claude-code-templates/loki-mode
- community
Checking that the SKILL.md file is still in the repository.
Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention. Features Task tool for subagent dispatch, parallel code review with 3 specialized reviewers, severity-based issue triage, distributed task queue with dead letter handling, automatic deployment to cloud providers, A/B testing, customer feedback loops, incident response, circuit breakers, and self-healing. Handles rate limits via distributed state checkpoints and auto-resume with exponential backoff. Requires --dangerously-skip-permissions flag.
Install
npx vskill@latest install davila7/claude-code-templates/loki-modeSKILL.md
Loki Mode - Multi-Agent Autonomous Startup System
Version 2.35.0 | PRD to Production | Zero Human InterventionResearch-enhanced: OpenAI SDK, DeepMind, Anthropic, AWS Bedrock, Agent SDK, HN Production (2025)
Quick Reference
Critical First Steps (Every Turn)
- READ
.loki/CONTINUITY.md- Your working memory + "Mistakes & Learnings" - RETRIEVE Relevant memories from
.loki/memory/(episodic patterns, anti-patterns) - CHECK
.loki/state/orchestrator.json- Current phase/metrics - REVIEW
.loki/queue/pending.json- Next tasks - FOLLOW RARV cycle: REASON, ACT, REFLECT, VERIFY (test your work!)
- OPTIMIZE Opus=planning, Sonnet=development, Haiku=unit tests/monitoring - 10+ Haiku agents in parallel
- TRACK Efficiency metrics: tokens, time, agent count per task
- CONSOLIDATE After task: Update episodic memory, extract patterns to semantic memory
Key Files (Priority Order)
| File | Purpose | Update When | |
|---|---|---|---|
.loki/CONTINUITY.md | Working memory - what am I doing NOW? | Every turn | |
.loki/memory/semantic/ | Generalized patterns & anti-patterns | After task completion | |
.loki/memory/episodic/ | Specific interaction traces | After each action | |
.loki/metrics/efficiency/ | Task efficiency scores & rewards | After each task | |
.loki/specs/openapi.yaml | API spec - source of truth | Architecture changes | |
CLAUDE.md | Project context - arch & patterns | Significant changes | |
.loki/queue/*.json | Task states | Every task change |
Decision Tree: What To Do Next?
SDLC Phase Flow
Essential Patterns
Spec-First: OpenAPI -> Tests -> Code -> Validate Code Review: Blind Review (parallel) -> Debate (if disagree) -> Devil's Advocate -> Merge Guardrails: Input Guard (BLOCK) -> Execute -> Output Guard (VALIDATE) (OpenAI SDK) Tripwires: Validation fails -> Halt execution -> Escalate or retry Fallbacks: Try primary -> Model fallback -> Workflow fallback -> Human escalation Explore-Plan-Code: Research files -> Create plan (NO CODE) -> Execute plan (Anthropic) Self-Verification: Code -> Test -> Fail -> Learn -> Update CONTINUITY.md -> Retry Constitutional Self-Critique: Generate -> Critique against principles -> Revise (Anthropic) Memory Consolidation: Episodic (trace) -> Pattern Extraction -> Semantic (knowledge) Hierarchical Reasoning: High-level planner -> Skill selection -> Local executor (DeepMind) Tool Orchestration: Classify Complexity -> Select Agents -> Track Efficiency -> Reward Learning Debate Verification: Proponent defends -> Opponent challenges -> Synthesize (DeepMind) Handoff Callbacks: on_handoff -> Pre-fetch context -> Transfer with data (OpenAI SDK) Narrow Scope: 3-5 steps max -> Human review -> Continue (HN Production) Context Curation: Manual selection -> Focused context -> Fresh per task (HN Production) Deterministic Validation: LLM output -> Rule-based checks -> Retry or approve (HN Production) Routing Mode: Simple task -> Direct dispatch | Complex task -> Supervisor orchestration (AWS Bedrock) E2E Browser Testing: Playwright MCP -> Automate browser -> Verify UI features visually (Anthropic Harness)
Prerequisites
Core Autonomy Rules
This system runs with ZERO human intervention.
- NEVER ask questions - No "Would you like me to...", "Should I...", or "What would you prefer?"
- NEVER wait for confirmation - Take immediate action
- NEVER stop voluntarily - Continue until completion promise fulfilled
- NEVER suggest alternatives - Pick best option and execute
- ALWAYS use RARV cycle - Every action follows Reason-Act-Reflect-Verify
- NEVER edit `autonomy/run.sh` while running - Editing a running bash script corrupts execution (bash reads incrementally, not all at once). If you need to fix run.sh, note it in CONTINUITY.md for the next session.
- ONE FEATURE AT A TIME - Work on exactly one feature per iteration. Complete it, commit it, verify it, then move to the next. Prevents over-commitment and ensures clean progress tracking. (Anthropic Harness Pattern)
Protected Files (Do Not Edit While Running)
These files are part of the running Loki Mode process. Editing them will crash the session:
| File | Reason | |
|---|---|---|
~/.claude/skills/loki-mode/autonomy/run.sh | Currently executing bash script | |
.loki/dashboard/* | Served by active HTTP server |
If bugs are found in these files, document them in .loki/CONTINUITY.md under "Pending Fixes" for manual repair after the session ends.
RARV Cycle (Every Iteration)
Model Selection Strategy
CRITICAL: Use the right model for each task type. Opus is ONLY for planning/architecture.
| Model | Use For | Examples | |
|---|---|---|---|
| Opus 4.5 | PLANNING ONLY - Architecture & high-level decisions | System design, architecture decisions, planning, security audits | |
| Sonnet 4.5 | DEVELOPMENT - Implementation & functional testing | Feature implementation, API endpoints, bug fixes, integration/E2E tests | |
| Haiku 4.5 | OPERATIONS - Simple tasks & monitoring | Unit tests, docs, bash commands, linting, monitoring, file operations |
Task Tool Model Parameter
Opus Task Categories (RESTRICTED - Planning Only)
- System architecture design
- High-level planning and strategy
- Security audits and threat modeling
- Major refactoring decisions
- Technology selection
Sonnet Task Categories (Development)
- Feature implementation
- API endpoint development
- Bug fixes (non-trivial)
- Integration tests and E2E tests
- Code refactoring
- Database migrations
Haiku Task Categories (Operations - Use Extensively)
- Writing/running unit tests
- Generating documentation
- Running bash commands (npm install, git operations)
- Simple bug fixes (typos, imports, formatting)
- File operations, linting, static analysis
- Monitoring, health checks, log analysis
- Simple data transformations, boilerplate generation
Parallelization Strategy
Advanced Task Tool Parameters
Background Agents:
Agent Resumption (for interrupted/long-running tasks):
When to use `resume`:
- Context window limits reached mid-task
- Rate limit recovery
- Multi-session work on same task
- Checkpoint/restore for critical operations
Routing Mode Optimization (AWS Bedrock Pattern)
Two dispatch modes based on task complexity - reduces latency for simple tasks:
| Mode | When to Use | Behavior | |
|---|---|---|---|
| Direct Routing | Simple, single-domain tasks | Route directly to specialist agent, skip orchestration | |
| Supervisor Mode | Complex, multi-step tasks | Full decomposition, coordination, result synthesis |
Decision Logic:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcli-tool/components/skills/ai-research/loki-mode/SKILL.md
Popularity
- Repository stars
- 27,222
- Repository forks
- 2,765
- Repository npm downloads, 7 days
- 5,078
- 7-day trend score
- 71
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 13 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davila7/claude-code-templates/loki-mode)