Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

kwcode-local-coding-agent

БесплатноБез исполняемых скриптовНе проверен

KWCode (天工开物) — a CLI coding agent optimized for local open-source models (8B-30B), featuring deterministic expert pipelines, BM25+AST code location, runtime…

reason-machinesот reason-machines★ 99 звёзд на GitHub

Об этом скилле

KWCode Local Coding Agent

Skill by ara.so — Daily 2026 Skills collection.

KWCode is a CLI coding agent designed specifically for local open-source models (8B–30B parameters). Unlike cloud-first agents (Claude Code, Cursor), KWCode uses a deterministic expert pipeline where the LLM only classifies and generates — all routing, validation, and decision-making is handled by deterministic code. This lets small models succeed where they would otherwise hallucinate or loop.


Installation

# Standard install
pip install kwcode

# China mirror (faster in mainland)
pip install kwcode -i https://pypi.tuna.tsinghua.edu.cn/simple

# Optional: Cross-Encoder search reranking
pip install "kwcode[rerank]"

Requirements: Python 3.10+, any OpenAI-compatible API (local or cloud).


Quick Start

# Launch interactive REPL
kwcode

On first launch, KWCode runs a setup wizard to configure your model connection.


Configuration

Connect to a local inference engine (Ollama example)

# Inside kwcode REPL or as a slash command:
/api default http://localhost:11434/v1 ollama qwen3:8b

Connect to a cloud API (no local GPU needed)

/api default https://api.deepseek.com $DEEPSEEK_API_KEY deepseek-coder
/api default https://api.siliconflow.cn/v1 $SILICONFLOW_API_KEY Qwen/Qwen3-8B

Environment variable approach

export KWCODE_API_BASE=http://localhost:11434/v1
export KWCODE_API_KEY=ollama
export KWCODE_MODEL=qwen3:8b
kwcode

Recommended models by VRAM

VRAM Model
4 GB gemma3:4b
8 GB qwen3:8b
16 GB qwen3:14b
24 GB+ qwen3:30b-a3b

Key Commands

All commands are entered inside the kwcode REPL (> prompt).

Core task commands

> <natural language task description>
> 修复登录验证失败的问题
> write a FastAPI login endpoint with JWT auth
> refactor calculate_price into smaller functions

Planning & safety

> /plan <task description>

Shows execution steps and risk level (High / Medium / Low) before touching any file. Requires confirmation.

> /checkpoint

Manually snapshot current project state. KWCode also auto-snapshots before each task.

> /rollback

Restore to the last checkpoint if a task goes wrong.

Multi-task orchestration (DAG)

> /multi task1 ; task2 ; task3          # all parallel
> /multi task1 -> task2 -> task3        # serial chain
> /multi                                # interactive builder

Interactive multi-task example:

> /multi
  + add docstring to function `add`       (parallel)
  + add docstring to function `sub`       (parallel)
  + >write tests for the modified code    (serial, depends on above two)

Search enhancement

# Install SearXNG (requires Docker Desktop running)
kwcode setup-search
> /search <query>       # explicit search inside REPL

Without Docker, KWCode falls back to DuckDuckGo automatically.

Statistics & flywheel

kwcode stats            # CLI command (outside REPL)

Shows tasks completed, estimated time saved, and flywheel expert promotions.

API management

> /api list                              # show configured endpoints
> /api default <base_url> <key> [model] # set default endpoint
> /api add <name> <base_url> <key>      # add named endpoint
> /api use <name>                        # switch active endpoint

Project Configuration Files

KWCode looks for these files in your project root and injects them as context:

File Purpose
KWCODE.md Project-level rules, conventions, coding standards. Injected per task type.
PROJECT.md Auto-maintained project summary (Layer 1 memory).
EXPERT.md Domain expert knowledge accumulated by the flywheel (Layer 2).
PATTERN.md Recurring code patterns learned from your project (Layer 3).
REFLECTION.md Structured log of past failures and lessons (auto-updated).

Example KWCODE.md

# Project Rules

## bugfix
- Always run `pytest tests/` after any fix
- Never modify migration files directly

## codegen
- Use `async def` for all new route handlers
- Import order: stdlib → third-party → local

## general
- Line length: 88 (black default)
- All new functions must have type hints

How the Expert Pipeline Works

Every user input flows through five deterministic stages:

Input
  └─► Gate       — classifies task, routes to skill, matches domain knowledge
        └─► Locator    — BM25 keyword recall + AST call-graph expansion (no LLM)
              └─► Generator  — generates only the changed diff, injects SKILL.md
                    └─► Verifier   — syntax check + pytest (deterministic)
                          └─► Debugger   — sys.settrace captures live variable values
                                └─► Reviewer   — LLM checks intent vs actual change

**The LLM is only called

Полный SKILL.md на GitHub

Установить kwcode-local-coding-agent в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл kwcode-local-coding-agent?

KWCode (天工开物) — a CLI coding agent optimized for local open-source models (8B-30B), featuring deterministic expert pipelines, BM25+AST code location, runtime debugging, and a self-improving flywheel — all running fully offline.

Как установить скилл kwcode-local-coding-agent?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл kwcode-local-coding-agent запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить kwcode-local-coding-agent с