Skip to content
/ conjure Public

Claude Code plugin for delegating tasks to external LLM services with strategic oversight and quality control

License

Notifications You must be signed in to change notification settings

athola/conjure

Repository files navigation

Conjure

Intelligent delegation for Claude Code. Save tokens by delegating work to other models. Keep strategy, design, and review for deep-thinking models; offload long-context analysis, bulk work, and summarization to inexpensive external LLM services with quota- and usage-aware tooling.

Testimonial

From an AI coding assistant's perspective:

Conjure turns delegation into a first-class workflow. I stay focused on architecture and code review while Conjure routes heavy lifting to the right external model. The unified executor, quota tracking, and skill hooks mean I can suggest Gemini for million-token reads, switch to Qwen for sandboxed execution, and still keep the "why" in Claude's head.

Concrete impact:

  • Faster turn-around on large, repetitive tasks
  • Safer delegation with quota warnings before rate limits bite
  • Consistent handoffs via shared skills and hooks
  • Better continuity: usage logs and status reports keep teams aligned

— Claude Code, November 24, 2025

Installation

As a Claude Code plugin (recommended)

The plugin wires in skills, hooks, and delegation tooling automatically.

/plugin install athola@claude-night-market
/status

Development setup

uv sync             # install deps (or: make deps)
make install-hooks  # pre-commit hooks
make test           # lint + type + security checks

Requirements: Python 3.10+, uv, and tiktoken for accurate token estimates: uv add tiktoken

Usage

Quick Start

# Check delegation readiness (auth + CLI availability)
make delegate-verify

# Auto-pick best service for a task
make delegate-auto PROMPT="Summarize src" FILES="src/"

# Monitor limits and usage
make quota-status
make usage-report

Delegation Executor

# List services
uv run python tools/delegation_executor.py --list-services

# Verify a service
uv run python tools/delegation_executor.py --verify gemini

# Auto-select based on requirements
uv run python tools/delegation_executor.py auto "Analyze this code" \
  --files src/ --requirement large_context

# Force a specific service
uv run python tools/delegation_executor.py gemini "Summarize" \
  --files docs/*.md --model gemini-2.5-pro-exp

Make Commands

# Development
make format          # ruff format + check --fix
make lint            # ruff check
make typecheck       # mypy + ty
make security-check  # bandit
make test            # lint + type + security bundle
make validate-all    # full validation including hooks
make clean           # remove caches/venv

# Delegation lifecycle
make delegate-status
make delegate-verify
make delegate-usage
make delegate-test
make delegate-gemini PROMPT="Analyze" FILES="src/main.py"
make delegate-qwen   PROMPT="Extract" FILES="src/**/*.py"
make delegate-auto   PROMPT="Best service" FILES="src/"

# Quota & usage
make quota-status
make usage-report

Quota & Usage Tools

# Quota tracker (Gemini)
uv run python tools/quota_tracker.py --status
uv run python tools/quota_tracker.py --estimate src/ docs/
uv run python tools/quota_tracker.py --validate-config

# Usage logger (Gemini)
uv run python tools/usage_logger.py --report
uv run python tools/usage_logger.py --validate
uv run python tools/usage_logger.py --status

In Claude Code

Use skills directly in chat:

Skill(conjure:delegation-core)
Skill(conjure:gemini-delegation)
Skill(conjure:qwen-delegation)

Hooks (bridge.on_tool_start, bridge.after_tool_use) surface delegation suggestions when tasks grow large or noisy.

Commands

delegate-auto

Auto-selects the best external service based on requirements (e.g., large context vs. sandbox execution).

delegate-gemini / delegate-qwen

Force a specific service with optional file globs and model hints.

quota-status

Shows current Gemini quota usage with warnings for approaching per-minute or daily limits.

usage-report

Summarizes recent Gemini requests, token counts, and success rate from ~/.claude/hooks/gemini/logs/usage.jsonl.

validate-delegation

Checks configuration integrity for delegation limits and paths.

Architecture

  • Claude Code plugin – Registers skills, commands, and Gemini hooks.
  • Skillsdelegation-core, gemini-delegation, qwen-delegation for assessment and execution paths.
  • Delegation executortools/delegation_executor.py provides unified command construction, verification, and execution with token estimation.
  • Quota trackertools/quota_tracker.py monitors rate/daily limits with warnings.
  • Usage loggertools/usage_logger.py records requests, tokens, success, and duration with session rollups.
  • Hookshooks/gemini/bridge.* recommend delegation when tool output size or volume suggests it.
  • Makefile – Single entry point for dev, validation, and delegation workflows.

How It Works

  1. Assessdelegation-core evaluates if a task should delegate based on size, repetition, or sandbox needs.
  2. Selectdelegate-auto picks Gemini (large context) or Qwen (sandbox/CLI) using service metadata and requirements.
  3. Executedelegation_executor builds and runs service-specific commands, capturing stdout/stderr, timing, and estimated tokens.
  4. Monitorquota_tracker warns on rate/daily limits; usage_logger logs outcomes for reports.
  5. Integrate – Results return to Claude for review, edits, and next actions.

Configuration & Paths

  • Delegation config overrides: ~/.claude/hooks/delegation/config.json
  • Quota data: ~/.claude/hooks/gemini/usage.json
  • Usage logs: ~/.claude/hooks/gemini/logs/usage.jsonl
  • Make targets reference uv for dependency management; adjust limits via DEFAULT_LIMITS in tools/quota_tracker.py.

Development

uv sync
make lint typecheck security-check
make test

See CHANGELOG.md for release notes (current: 1.1.0) and LICENSE (MIT).

License

MIT

About

Claude Code plugin for delegating tasks to external LLM services with strategic oversight and quality control

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published