一個 Claude Code 插件,用於將提示委派給其他 AI 模型並驗證其工作
AI 翻譯
A Claude Code plugin to delegate prompts to other AI models and verify their work
AI 摘要 · README
外掛Python · ShellGitHub @cruzanstx自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
正在載入完整 README。 以下為已儲存的摘錄。
Delegate prompts to Codex, Gemini, Z.AI, Synthetic, or local models from Claude Code — with worktree isolation and Ralph-Wiggum-inspired verification loops.
Run these commands in your terminal (not inside Claude Code):
Clone/copy this plugin to one of:
• ~/.claude/plugins/daplug/ (user scope)
• .claude/plugins/daplug/ (project scope)
OpenCode does not load Claude marketplace plugins, so daplug's namespaced commands (for example /daplug:run-prompt) are not available and will fail with Command or skill not found.檢視完整 README ↗Delegate prompts to Codex, Gemini, Z.AI, Synthetic, or local models from Claude Code — with worktree isolation and Ralph-Wiggum-inspired verification loops.
Run these commands in your terminal (not inside Claude Code):
# Add the marketplace (SSH)
claude plugin marketplace add cruzanstx/daplug
# Or via HTTPS
claude plugin marketplace add https://github.com/cruzanstx/daplug
# Install daplug
claude plugin install daplug@cruzanstx
Clone/copy this plugin to one of:
~/.claude/plugins/daplug/ (user scope).claude/plugins/daplug/ (project scope)OpenCode does not load Claude marketplace plugins, so daplug's namespaced commands (for example /daplug:run-prompt) are not available and will fail with Command or skill not found.
To use daplug commands in OpenCode, install bridge commands using the built-in command (from Claude Code):
/install-bridges opencode
Or run the generator script directly:
# Default output: ~/.config/opencode/commands/
python3 scripts/generate-opencode-bridges.py
# Custom output directory (example: project-local)
python3 scripts/generate-opencode-bridges.py .opencode/commands
# Remove stale daplug bridges before regenerating
python3 scripts/generate-opencode-bridges.py --clean
Bridges contain an absolute @ reference to daplug's real commands/*.md specs, so there's no command duplication.
Command name mapping:
/daplug:run-prompt/daplug-run-prompt| Command | Description |
|---|---|
/daplug:check-config | Verify daplug configuration status and detect legacy settings |
/daplug:cclimits | Check AI CLI usage/quota (Claude, Codex, Gemini, Z.AI, Synthetic) |
/daplug:check-updates | Check if plugin has updates available |
/daplug:codex-cli | Run task with OpenAI Codex CLI |
/daplug:create-at-prompt | Create an agent-team orchestration bundle (orchestrator prompt + sub-prompts) |
/daplug:create-llms-txt | Research and generate llms_txt documentation |
/daplug:create-prompt | Create optimized, XML-structured prompts |
/daplug:devstral-cli | Run task with local Devstral model via Codex CLI |
/daplug:detect-clis | Scan and manage available AI coding CLIs |
/daplug:gemini-cli | Run task with legacy Google Gemini CLI |
/daplug:handoff | Create a compact, evidence-backed session handoff checkpoint outside tracked Git state |
/daplug:install-bridges | Install daplug command bridges for other runtimes (e.g. OpenCode) |
/daplug:migrate-config | Migrate legacy CLAUDE.md settings to <daplug_config> |
/daplug:prompts | Analyze prompts folder and recommend next steps |
/daplug:qwen-cli | Run task with local Qwen model via Codex CLI |
/daplug:resume-handoff | Validate and load a compact session handoff checkpoint with Git drift detection |
/daplug:run-at-prompt | Run existing prompts with agent-team orchestration (phase groups + auto-deps) |
/daplug:run-prompt | Execute prompts with various AI models |
/daplug:sprint | Automated sprint planning from specs or existing prompts |
/daplug:uvc | Update docs and push to version control |
| Agent | Description |
|---|---|
frontend-build-optimizer | Optimize frontend build times (SvelteKit, Next.js, Vite) |
go-build-optimizer | Optimize Go compilation and Docker builds |
infra-troubleshooter | Diagnose infrastructure issues |
k8s-cicd-troubleshooter | Troubleshoot Kubernetes and CI/CD pipelines |
readonly-log-watcher | Monitor prompt execution logs without touching files |
| Skill | Description |
|---|---|
ai-usage | Check AI CLI usage/quota (Claude, Codex, Gemini, Z.AI, Synthetic) |
config-reader | Read and manage daplug config from CLAUDE.md (<daplug_config>) |
handoff | Create, validate, and resume compact provider-neutral session handoff checkpoints |
prompt-executor | Execute prompts with AI models, worktrees, tmux |
prompt-finder | Find and resolve prompts in ./prompts/ directory |
prompt-manager | CRUD operations for prompts with subfolder support |
sprint | Automated sprint planning, dependency graphs, execution plans |
tmux-manager | Manage tmux sessions for background tasks |
worktree | Manage git worktrees for isolated development |
hooks/hooks.json - PostToolUse hook that nudges Claude to spawn pipeline-deploy-monitor after successful git pushhooks/scripts/post-push-detect.sh - Detects git push and respects auto_pipeline_monitor: disabled in <daplug_config>servers.json - Placeholder MCP config (disabled by default)Commands below are shown without the /daplug: prefix for readability. In Claude Code, use /daplug:<command> if you prefer namespaced commands.
/create-promptgenerates XML-structured prompts optimized for each task type, then/run-promptexecutes them with your chosen model.
Run prompt batches across Claude, Codex, Gemini, Z.AI, or Synthetic with parallel execution and quota-aware routing.
Execute prompts in isolated git worktrees to keep your main branch clean while tasks run.
Re-run prompts until tests pass with
--loopand completion-marker detection.
Check usage across all AI CLIs and pick the model with the most headroom.
/create-llms-txtscaffolds research prompts in your llms_txt repo and supports cross-repo execution.
# In Claude Code:
/create-prompt "add user authentication with JWT"
/run-prompt 005 --model codex # OpenAI Codex
/run-prompt 005 --model cc-sonnet # Claude Code CLI (Sonnet)
/run-prompt 005 --model cc-opus # Claude Code CLI (Opus)
/run-prompt 005 --model gemini # Google Gemini (agy preferred, Gemini CLI fallback)
/run-prompt 005 --model opencode # Z.AI GLM-4.7 (recommended)
/run-prompt 005 --model zai # Z.AI GLM-4.7 (via Codex)
Local models (local, qwen, devstral) now run through OpenCode by default (LMStudio-backed). You can override the CLI wrapper with --cli.
# Defaults to OpenCode + LMStudio
/run-prompt 005 --model local
/run-prompt 005 --model qwen
/run-prompt 005 --model devstral
# Legacy Codex wrapper (if you need it)
/run-prompt 005 --model local --cli codex
/run-prompt 001 002 003 --parallel --worktree
/cclimits
# Shows: Claude: 18% | Codex: 0% | Gemini: 7% | Z.AI: 1%
claude CLI
--cli override: --cli claude (aliases: claudecode, cc)cc-sonnet and cc-opus/install-bridges command: Install daplug command bridges for other AI coding runtimes (currently supports OpenCode)pipeline-deploy-monitor after git pushscripts/generate-opencode-bridges.py for cross-runtime compatibilitylocal, qwen, devstral now route through OpenCode CLI (LMStudio-backed)--cli override flag: --cli codex restores legacy behavior, --cli opencode forces OpenCodeglm-local (GLM-4.7-Flash), qwen-small (Qwen3-4B haiku-tier)gpt-5.3-codexopencode model for Z.AI GLM-4.7 via OpenCode CLI--from-existing flag analyzes prompts already in prompts/ instead of generating from a spec--prompts 001-005,010, --folder providers/, --exclude 003,007 for precise selectiondepends on, requires, @file referencesrun-sprint.sh for batch execution/sprint command for automated sprint planning from technical specifications.sprint-state.json for pause/resume/status trackingstatus, add, remove, replan, pause, resume, cancel, historyprompts/providers/, prompts/backend/)--folder/-f for create, --tree for list, --folder for next-numberfind 011 searches all folders, find providers/011 targets specific folderproviders/011-013 expands correctly with folder prefixfolder, path, status fieldsprompt/providers/001-name)/check-updates command (cruzanstx not daplug)gpt52, gpt52-high, gpt52-xhigh for planning and research tasksscripts/manage-models.py for listing, checking, and adding models<daplug_config> XML blocks in CLAUDE.md files/daplug:migrate-config automatically converts legacy plaintext settings/daplug:check-config verifies config status and detects legacy settings/create-llms-txt now creates prompts in $LLMS_TXT_DIR/prompts/ (the llms_txt repo) instead of the current project's ./prompts/llms_txt_dir from ~/.claude/CLAUDE.md, offers clone/configure flow if not set--prompt-file flag for running prompts from external repos/create-prompt and prompt-finder updated to use prompt-manager$() command substitution passed through eval in zsh/create-prompt now saves to {git_root}/prompts/ instead of ./prompts/ (relative to cwd)/run-prompt now reports errors clearly instead of attempting manual CLI execution/run-promptreadonly-log-watcher agent for lightweight monitoring/create-llms-txt to generate prompts for /run-prompt.claude-plugin/plugin.json to change name, version, description, authorcommands/agents/skills/<skill-name>/SKILL.mdhooks/mcp/servers.json{
"name": "plugin-name",
"version": "1.0.0",
"description": "What the plugin does",
"author": {
"name": "Your Name",
"email": "[email protected]",
"url": "https://your-site.com"
},
"homepage": "https://docs.example.com",
"repository": "https://github.com/you/plugin",
"license": "MIT",
"keywords": ["utility", "helper"]
}
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier (kebab-case) |
version | No | Semantic version (e.g., "1.0.0") |
description | No | Brief plugin purpose |
author | No | Object with name, email, url |
homepage | No | Documentation URL |
repository | No | Source code URL |
license | No | License identifier |
keywords | No | Discovery tags array |
Custom paths (optional): commands, agents, skills, hooks, mcpServers, outputStyles, lspServers
INVALID fields (will cause installation to fail): manifest_version, type, permissions, entry
This repo is configured as a Claude Code marketplace. Run in terminal:
# Add marketplace (SSH)
claude plugin marketplace add cruzanstx/daplug
# Or via HTTPS
claude plugin marketplace add https://github.com/cruzanstx/daplug
# Install the plugin
claude plugin install daplug@cruzanstx
git clone cruzanstx/daplug
cp -r daplug ~/.claude/plugins/
ln -s $(pwd) ~/.claude/plugins/daplug
Add to your project's .claude/settings.json:
{
"plugins": {
"marketplaces": {
"extraKnown": ["cruzanstx/daplug"]
}
},
"enabledPlugins": ["daplug@cruzanstx"]
}
Or install manually for each team member:
claude plugin marketplace add cruzanstx/daplug
claude plugin install daplug@cruzanstx
Claude Code doesn't have built-in plugin update notifications yet (feature request #10265). Here are workarounds:
# Uninstall, refresh marketplace, then reinstall
claude plugin uninstall daplug@cruzanstx
claude plugin marketplace update cruzanstx
claude plugin install daplug@cruzanstx
Important: You must uninstall first - claude plugin install won't overwrite an existing cached version.
Add to .gitlab-ci.yml to notify your team when the plugin version changes:
notify-plugin-update:
stage: notify
rules:
- changes:
- .claude-plugin/plugin.json
script:
- |
VERSION=$(jq -r '.version' .claude-plugin/plugin.json)
echo "daplug updated to v${VERSION}"
# Slack notification (uncomment and configure):
# curl -X POST -H 'Content-type: application/json' \
# --data "{\"text\":\"daplug plugin updated to v${VERSION} - run: claude plugin uninstall daplug@cruzanstx && claude plugin marketplace update cruzanstx && claude plugin install daplug@cruzanstx\"}" \
# $SLACK_WEBHOOK_URL
# Email notification (uncomment and configure):
# echo "daplug v${VERSION} released" | mail -s "Plugin Update" [email protected]
This plugin includes /daplug:check-updates which compares your installed version against the marketplace:
/daplug:check-updates
Output:
daplug: v0.3.0 -> v0.3.0
UP_TO_DATE
Or when an update is available:
daplug: v0.2.0 -> v0.3.0
NEEDS_UPDATE
Update available! Run:
claude plugin uninstall daplug@cruzanstx && claude plugin marketplace update cruzanstx && claude plugin install daplug@cruzanstx
Then resume session:
claude --resume
Running --resume without an ID shows available sessions to pick from.
Note: The uninstall is required because claude plugin install won't overwrite an existing cached version.
Claude Code hooks can't trigger on startup, but you can create a reminder that fires on specific events. Add hooks/update-reminder.json:
{
"name": "update-reminder",
"description": "Periodic reminder to check for plugin updates",
"hooks": [
{
"matcher": {
"type": "event",
"event": "Notification"
},
"hooks": [
{
"type": "command",
"command": "echo 'Tip: Run /daplug:check-updates to check for plugin updates'"
}
]
}
]
}
Note: This approach is limited since there's no "on startup" or "periodic" hook event. It only triggers when Claude sends a notification.
For teams, combine:
On first use, daplug prompts for user settings and saves them to ~/.claude/CLAUDE.md under a <daplug_config> block:
<daplug_config>
preferred_agent: codex
worktree_dir: .worktrees/
llms_txt_dir: /storage/projects/docker/llms_txt
ai_usage_awareness: enabled
cli_logs_dir: ~/.claude/cli-logs/
agy_print_timeout: 60m
agy_inactivity_timeout:
</daplug_config>
| Setting | When Prompted | Default |
|---|---|---|
preferred_agent | Running /daplug:prompts | Asks user to choose |
worktree_dir | Running /daplug:run-prompt --worktree | ../worktrees |
llms_txt_dir | Running /daplug:create-llms-txt | ../llms_txt |
ai_usage_awareness | Running /daplug:create-prompt (when choosing executor) | Asks user (enabled/disabled) |
cli_logs_dir | Not prompted (advanced) | ~/.claude/cli-logs/ |
agy_print_timeout | Not prompted (advanced) | 60m |
agy_inactivity_timeout | Not prompted (advanced) | (disabled) |
auto_pipeline_monitor | Not prompted (advanced) | enabled |
Settings are checked in order: project ./CLAUDE.md → user ~/.claude/CLAUDE.md
If you still have legacy plaintext settings, run /daplug:migrate-config to upgrade them.
Daplug integrates with cclimits (npm) to provide real-time quota monitoring across all AI CLI tools.
What is cclimits?
A standalone CLI tool that checks quota/usage for AI coding tools:
GET https://api.synthetic.new/v2/quotasIntegration with daplug:
When ai_usage_awareness is enabled, /create-prompt will:
npx cclimits --json before presenting model optionsYou can also check usage directly:
# Via daplug command
/daplug:cclimits
# Or directly via npx
npx cclimits # Detailed output
npx cclimits --oneline # Compact one-liner
npx cclimits --json # JSON for scripting
Example output:
Claude: 4.0% (5h) ✅ | Codex: 0% (5h) ✅ | Z.AI: 1% ✅ | Synthetic: 12/100 ✅ | Gemini: ( 3-Flash 7% ✅ | Flash 1% ✅ | Pro 10% ✅ )
Status icons:
| Icon | Meaning |
|---|---|
| ✅ | Under 70% - plenty of capacity |
| ⚠️ | 70-90% - moderate usage |
| 🔴 | 90-100% - near limit |
| ❌ | 100% or unavailable |
Toggle setting:
Update ~/.claude/CLAUDE.md under <daplug_config>:
<daplug_config>
ai_usage_awareness: enabled # or 'disabled'
</daplug_config>
Learn more: cclimits on GitHub | cclimits on npm
Commands that use Codex CLI (codex-cli, qwen-cli, zai-cli) check for required config on first run:
For qwen-cli (LMStudio):
# ~/.codex/config.toml
[model_providers.lmstudio-remote]
name = "LMStudio"
base_url = "http://YOUR_IP:1234/v1"
env_key = "LMSTUDIO_API_KEY"
wire_api = "chat"
[profiles.local]
model_provider = "lmstudio-remote"
model = "qwen/qwen3-coder-next"
[env]
LMSTUDIO_API_KEY = "lm-studio"
For zai-cli (Z.AI):
# ~/.codex/config.toml
[model_providers.zai]
name = "Z.AI"
base_url = "https://api.z.ai/api/coding/paas/v4"
env_key = "ZAI_KEY"
wire_api = "chat"
[profiles.zai]
model_provider = "zai"
model = "glm-4.7"
[env]
ZAI_KEY = "your-api-key" # Get from https://z.ai/manage-apikey
If config is missing, the commands will prompt you to set it up.
Commands that reference internal plugin files (like run-prompt.md calling executor.py) should read the install path from Claude's manifest:
# Get exact install path from Claude's tracking
PLUGIN_ROOT=$(jq -r '.plugins."daplug@cruzanstx"[0].installPath' ~/.claude/plugins/installed_plugins.json)
EXECUTOR="$PLUGIN_ROOT/skills/prompt-executor/scripts/executor.py"
python3 "$EXECUTOR" 123 --model codex
Why read from installed_plugins.json?
The cache directory may contain multiple plugin versions (0.1.0, 0.2.0, 0.3.0, etc.) after upgrades. Glob patterns would expand to ALL versions:
# BAD - expands to multiple paths
echo ~/.claude/plugins/cache/.../*/...executor.py
# Result: "/path/0.1.0/.../executor.py /path/0.2.0/.../executor.py ..."
Reading from installed_plugins.json:
Why not use ${CLAUDE_PLUGIN_ROOT}?
Claude Code provides a ${CLAUDE_PLUGIN_ROOT} variable, but there's a known bug (#9354) where it doesn't work in command markdown files.
Where ${CLAUDE_PLUGIN_ROOT} works: Hooks JSON, MCP configs, LSP configs
Where it doesn't work: Command .md files
The executor uses stdin for codex models to avoid shell escaping issues with complex prompts:
# Codex: uses stdin with '-' flag
codex exec --full-auto - # reads from stdin
# Antigravity: uses --print with the prompt as the flag value
agy --model "Gemini 3.8 Flash (High)" --dangerously-skip-permissions --print "prompt content"
# Legacy Gemini CLI fallback: uses -p for headless mode
gemini -y -p "prompt content"
This prevents issues with prompts containing newlines, quotes, backticks, and XML tags.
When --sandbox is enabled (Linux/bubblewrap), each CLI receives only the minimum host credentials it needs:
~/.claude/.credentials.json + ~/.claude.json (read-only bind)~/.gemini/antigravity-cli/antigravity-oauth-token (read-only bind on a tmpfs; conversations and databases stay outside)--setenv; no host credential files boundWritable tool-state binds are CLI-scoped: opencode_state/opencode_cache/opencode_config are only bound for opencode children. Preflight probes (claude auth status, agy models) verify authentication before real runs and fail fast with an actionable message.
These tables are generated from scripts/models.json.
| Shorthand | Model | Best For |
|---|---|---|
claude | claude | Complex reasoning in current Claude Code context |
cc-sonnet | claude-sonnet-5-5 (Sonnet 5.5) | Claude Code CLI Sonnet 5.5 runs |
cc-opus | opus (currently Opus 5.5; floating alias) | Claude Code CLI Opus runs |
fable | fable (currently Fable 5.1; floating alias) | Hardest reasoning tasks via Claude Code CLI; currently Fable 5.1 with 1M context and 128K max output |
fable51 | claude-fable-5-1 (Fable 5.1 pin) | Hardest reasoning tasks pinned to Fable 5.1 (1M context, 128K max output, adaptive thinking, efforts low/medium/high/xhigh/max, $10/MTok in, $50/MTok out) |
| Shorthand | Model | Best For |
|---|---|---|
codex | gpt-5.6-terra | Fast coding execution (default Codex shorthand) |
codex-spark | gpt-5.3-codex-spark | Lowest-latency quick edits |
codex-high | gpt-5.6-terra | Complex coding |
codex-xhigh | gpt-5.6-terra | Large refactors |
sol | gpt-6-sol | Hardest agentic coding tasks |
terra | gpt-5.6-terra | Balanced everyday coding (codex default) |
luna | gpt-6-luna | Fast, cost-efficient coding |
astra | gpt-6-astra | GPT-6 Astra coding |
gpt54 | gpt-5.4 | Explicit GPT-5.4 shorthand |
gpt54-high | gpt-5.4 | Deep reasoning with GPT-5.4 |
gpt54-xhigh | gpt-5.4 | Maximum reasoning with GPT-5.4 |
gpt55 | gpt-5.5 | Explicit GPT-5.5 shorthand |
gpt55-high | gpt-5.5 | Deep reasoning with GPT-5.5 |
gpt55-xhigh | gpt-5.5 | Maximum reasoning with GPT-5.5 |
gpt52 | gpt-5.2 | Planning, research, analysis |
gpt52-high | gpt-5.2 | Deep reasoning |
gpt52-xhigh | gpt-5.2 | Maximum reasoning (30+ min) |
| Shorthand | Model | Best For |
|---|---|---|
gemini | gemini-3.8-flash | Fast daily driver, high reasoning (default) |
gemini-high | gemini-2.5-pro | Stable, more capable |
gemini-xhigh | gemini-3-pro-preview | Most capable Gemini fallback |
gemini25pro | gemini-2.5-pro | Explicit stable Pro selection |
gemini25flash | gemini-2.5-flash | Fast, cost-effective |
gemini25lite | gemini-2.5-flash-lite | Fastest Gemini option |
gemini3flash | gemini-3-flash-preview | Explicit 3 Flash selection |
gemini3pro | gemini-3-pro-preview | Explicit 3 Pro selection |
gemini31pro | gemini-3.1-pro-preview | Latest Pro model (if available) |
gemini37 | gemini-3.8-flash | Latest Flash tier, high reasoning (default 3.7 Flash alias) |
gemini37-high | gemini-3.8-flash | Latest Flash tier, high reasoning |
gemini37-medium | gemini-3.8-flash | Latest Flash tier, balanced reasoning |
gemini37-low | gemini-3.8-flash | Latest Flash tier, fast low-reasoning |
argon | gemini-4-argon-high | Argon high reasoning (AGY only) |
argon-high | gemini-4-argon-high | Argon high reasoning (AGY only) |
argon-medium | gemini-4-argon-medium | Argon medium reasoning (AGY only) |
argon-low | gemini-4-argon-low | Argon low reasoning (AGY only) |
agy | gemini-3.8-flash | Antigravity default (same as gemini/gemini37) |
| Shorthand | Model | Best For |
|---|---|---|
zai | glm-4.7 | General coding fallback |
glm5 | glm-5.3 | Latest GLM 5.x tasks via OpenCode |
glm52 | glm-5.2 | Explicit GLM-5.2 pin via OpenCode |
glm53 | glm-5.3 | Explicit GLM-5.3 pin via OpenCode |
flash | glm-5.3-flash | Fast multimodal GLM-5.3-Flash tasks via OpenCode (1M context, 3x quota, reasoning effort max recommended) |
glm53-flash | glm-5.3-flash | Explicit GLM-5.3-Flash pin via OpenCode (multimodal, 1M context, 3x quota, reasoning effort max recommended) |
kimi | kimi-k2.5 | Kimi K2.5 via OpenCode |
opencode | glm-4.7 | Recommended OpenCode JSON runner |
Synthetic shorthands route through OpenCode's synthetic provider and require SYNTHETIC_API_KEY.
| Shorthand | Model | Best For |
|---|---|---|
synthetic | syn:large:text | Synthetic floating alias — currently DeepSeek V4.1 Flash |
syn-flash | syn:small:text | Synthetic floating alias — currently GLM-4.7-Flash |
syn-kimi | syn:large:vision | Synthetic floating alias — currently Kimi-K3 (prefer syn-kimi3) |
syn-kimi3 | hf:moonshotai/Kimi-K3 | Kimi-K3 flagship, vision, 512k context |
syn-qwen | syn:small:vision | Synthetic floating alias — currently Qwen3.8-27B |
syn-minimax | hf:MiniMaxAI/MiniMax-M3 | MiniMax-M3 vision, cheap all-rounder |
syn-nemotron | hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4 | Nemotron-3-Super-120B, cheapest large text |
syn-glm53 | hf:zai-org/GLM-5.3 | Beta text-only GLM-5.3, 512k context, 64k max output ($1.40/MTok in, $0.26/MTok cached, $4.40/MTok out) |
syn-glm53-flash | hf:zai-org/GLM-5.3-Flash | Beta vision GLM-5.3-Flash, low-cost ($0.15/MTok in, $0.04/MTok cached, $0.50/MTok out) |
syn-ds41-flash | hf:deepseek-ai/DeepSeek-V4.1-Flash | DeepSeek V4.1 Flash, vision, 512k context, tools/structured outputs, reasoning efforts none/low/high/xhigh/max |
deepseek | hf:deepseek-ai/DeepSeek-V4.1-Flash | Everyday DeepSeek V4.1 Flash alias (vision, 512k context, identical route to syn-ds41-flash) |
| Shorthand | Model | Best For |
|---|---|---|
local | qwen3.6-35b-a3b | Local qwen-coder model with no quota |
qwen | qwen3.6-35b-a3b | Local qwen-coder model with no quota |
devstral | devstral-small-2-2512 | Local Devstral model with no quota |
glm-local | glm-4.7-flash | Local GLM-4.7 Flash model with no quota |
qwen-small | qwen3-4b-2507 | Small/fast local Qwen model |
qwen36 | qwen3.6-35b-a3b | Best local coding model, MoE 35B, no quota |
qwen36-27b | qwen3.6-27b | Local Qwen 3.6 dense 27B, no quota |
When to use GPT-5.2 vs GPT-5.5:
When using --worktree, the executor automatically detects and installs project dependencies after creating the worktree. This ensures verification commands (build, test, lint) work correctly in the isolated environment.
| Type | Lock File | Install Command | Search Dirs |
|---|---|---|---|
| npm | package-lock.json | npm ci | ., frontend, web, client, app |
| pnpm | pnpm-lock.yaml | pnpm install --frozen-lockfile | same |
| yarn | yarn.lock | yarn install --frozen-lockfile | same |
| Go | go.mod | go mod download | . |
| pip | requirements.txt | pip install -r requirements.txt | . |
| poetry | poetry.lock | poetry install | . |
| uv | uv.lock | uv sync | . |
[Worktree] Detected: frontend/package-lock.json (npm)dependencies_installed[Worktree] Installing dependencies...
[Worktree] Detected: frontend/package-lock.json (npm)
[Worktree] Running: npm ci
[Worktree] npm ci completed (23.4s)
[Worktree] Dependencies installed successfully
The --loop flag enables iterative execution where prompts re-run until they report completion. Useful for test/build tasks that may need multiple attempts.
This feature is inspired by the ralph-wiggum plugin from Anthropic's official plugin collection. Ralph-wiggum implements a "self-referential feedback loop" that re-runs Claude until a completion promise is found.
Compare & Contrast:
| Aspect | ralph-wiggum | daplug --loop |
|---|---|---|
| Mechanism | Stop hooks intercept Claude's exit | Python loop in executor.py |
| Loop control | Hook script feeds prompt back to Claude | Executor re-runs CLI directly |
| State file | .claude/ralph-loop.local.md | ~/.claude/loop-state/{num}.json |
| Completion marker | <promise>COMPLETE</promise> | <verification>VERIFICATION_COMPLETE</verification> |
| Works with | Claude Code only | Any CLI (codex, agy/gemini, zai, etc.) |
| Runs in | Interactive Claude session | Background process |
Why no hooks? Ralph-wiggum's hook approach only works within Claude Code sessions. Our implementation needs to support external CLIs (Codex, Antigravity/Gemini, Z.AI) that don't have Claude's hook system. The Python-based loop runs the CLI, waits for completion, checks logs for markers, and re-runs if needed - all without requiring hooks.
/daplug:run-prompt 123 --model codex --loop
/daplug:run-prompt 123 --model codex --loop --max-iterations 5
The executor wraps your prompt with verification protocol instructions. The agent signals completion by outputting:
<!-- Success - task complete -->
<verification>VERIFICATION_COMPLETE</verification>
<!-- Retry needed - explain why -->
<verification>NEEDS_RETRY: Tests failing - 3 auth tests need fixing</verification>
VERIFICATION_COMPLETE found → loop ends successfullyNEEDS_RETRY found or no marker → loop continuesState is persisted in ~/.claude/loop-state/{prompt-number}.json:
{
"prompt_number": "123",
"iteration": 3,
"max_iterations": 3,
"status": "running",
"last_updated_at": "2025-12-29T18:30:00",
"history": [
{"iteration": 1, "exit_code": 0, "marker_found": false, "retry_reason": "Tests failing"},
{"iteration": 2, "exit_code": 1, "marker_found": false, "retry_reason": "Lint errors remain"}
],
"suggested_next_steps": [
{"text": "Deploy to staging", "original": "1) Deploy to staging", "source_iteration": 1}
]
}
Check status: python3 "$EXECUTOR" 123 --loop-status
The executor also extracts "Next steps" / "TODO" suggestions from logs and returns them in the loop result JSON so follow-up prompts can be created automatically.
For best results with --loop:
Example prompt structure:
## Requirements
- Add login/logout endpoints
- Password hashing with bcrypt
## Verification Criteria
- [ ] All tests pass: `npm test`
- [ ] Build succeeds: `npm run build`
- [ ] No lint errors: `npm run lint`
When ALL criteria verified, output:
<verification>VERIFICATION_COMPLETE</verification>
/daplug:zai-cli |
| Run task with Z.AI GLM-4.7 via Codex CLI |