Xpersona
D

delegation-core

CLAWHUB · Unverified

Delegates tasks to Gemini or Qwen with quota tracking and error handling Skill: delegation-core Owner: athola Summary: Delegates tasks to Gemini or Qwen with quota tracking and error handling Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:08:53.761Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:31:36.543Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:48:27.753Z | user Release v1.9.16 v1.9.15 | 2026-07-04T21:22:05.188Z | user Release v1.9.15 v1.9.14 | 2026-06-30T17:52:44.88

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-conjure-delegation-core
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-conjure-delegation-core/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

145,455 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: delegation-core
description: Delegates tasks to Gemini or Qwen with quota tracking and error handling
version: 1.9.8
triggers:
  - delegation
  - external-llm
  - gemini
  - qwen
  - task-management
  - quality-control
  - tasks exceed context window or need cheaper processing
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/conjure", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.leyline:quota-management", "night-market.leyline:usage-logging", "night-market.leyline:service-registry", "night-market.leyline:error-patterns", "night-market.leyline:authentication-patterns"]}}}
source: claude-night-market
source_plugin: conjure
---

> **Night Market Skill** — ported from [claude-night-market/conjure](https://github.com/athola/claude-night-market/tree/master/plugins/conjure). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Philosophy](#philosophy)
- [Delegation Flow](#delegation-flow)
- [Quick Decision Matrix](#quick-decision-matrix)
- [Detailed Workflow Steps](#detailed-workflow-steps)
- [1. Task Assessment (`delegation-core:task-assessed`)](#1-task-assessment-delegation-coretask-assessed)
- [2. Suitability Evaluation (`delegation-core:delegation-suitability`)](#2-suitability-evaluation-delegation-coredelegation-suitability)
- [3. Handoff Planning (`delegation-core:handoff-planned`)](#3-handoff-planning-delegation-corehandoff-planned)
- [4. Execution & Integration (`delegation-core:results-integrated`)](#4-execution-integration-delegation-coreresults-integrated)
- [Leyline Infrastructure](#leyline-infrastructure)
- [Service-Specific Skills](#service-specific-skills)
- [Module Reference](#module-reference)
- [Exit Criteria](#exit-criteria)


# Delegation Core Framework

## Overview

A method for deciding when and how to delegate tasks to external LLM services. Core principle: **delegate execution, retain high-level reasoning**.

## When To Use
- Before invoking external LLMs for task assistance.
- When operations are token-heavy and exceed local context limits.
- When batch processing benefits from different model characteristics.
- When tasks require routing between models.

## When NOT To Use

- Task requires reasoning by Claude

## Philosophy

**Delegate execution, retain reasoning.** Claude handles architecture, strategy, design, and review. External LLMs perform data processing, pattern extraction, bulk operations, and summarization.

## Delegation Flow

1. **Task Assessment**: Classify task by complexity and context size.
2. **Suitability Evaluation**: Check prerequisites and service fit.
3. **Handoff Planning**: Formulate request and document plan.
4. **Execution & Integration**: Run delegation, validate, and integrate results.

## Quick Decision Matrix

| Complexity | Context | Recommendation |
|------------|---------|----------------|
| High | 

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-conjure-delegation-core",
  "version": "1.9.19",
  "publishedAt": 1787749733761
}

modules/cost-estimation.md

---
name: cost-estimation
description: Token cost calculations, budget guidelines, and cost optimization strategies for external LLM delegation
parent_skill: conjure:delegation-core
category: delegation-framework
estimated_tokens: 250
dependencies:
  - leyline:quota-management
  - leyline:usage-logging
---

# Cost Estimation and Budget Guidelines

## Service Cost Comparisons

**Gemini 2.0 Models (per 1M tokens):**
- Input: $0.50, Output: $1.50 (Pro version)
- Input: $0.075, Output: $0.30 (Flash version)
- Context: Up to 1M tokens

**Qwen Models (per 1M tokens):**
- Input: $0.20-0.50, Output: $0.60-1.20 (varies by provider)
- Context: Up to 100K+ tokens
- Sandbox execution: Typically $0.001-0.01 per request

## Cost Decision Framework

**Calculate Cost-Benefit Ratio:**
```
Cost = (input_tokens * input_rate) + (output_tokens * output_rate)
Benefit = time_saved * hourly_rate + quality_improvement_value

Delegate if: Benefit > Cost * 3 (safety margin for quality risks)
```

## Practical Cost Examples

**Low-Cost Delegations (<$0.01):**
- Count function occurrences: 50 files × 30 tokens = $0.000015
- Extract import statements: 100 files × 50 tokens = $0.000025
- Generate 10 boilerplate files: ~2K output tokens = $0.003

**Medium-Cost Delegations ($0.01-0.10):**
- Summarize 50K lines of code: ~125K tokens = $0.06-0.19
- Analyze architecture of 100 files: ~80K tokens = $0.04-0.12
- Generate 20 API endpoints: ~3K output tokens = $0.005

**High-Cost Delegations ($0.10+):**
- Review entire codebase (500K+ tokens): $0.25-0.75
- Generate detailed documentation: $0.15-0.45
- Complex refactoring analysis: $0.20-0.60

## Cost Optimization Strategies

**Input Optimization:**
- Remove comments, tests, examples when not needed
- Use selective file patterns instead of entire directories
- Pre-filter with grep/awk for relevant content
- Compress multiple small queries into one request

**Model Selection:**
- Use Flash/cheaper models for simple extraction tasks
- Reserve Pro models for complex analysis only
- Consider batch processing for repetitive tasks

### Cheapest-Capable Model Selection

When dispatching subagents, select the cheapest model
that can handle the task. This is a recommendation,
not a mandate; override when judgment dictates.

| Task Type | Has Detailed Plan? | Recommended Model |
|-----------|-------------------|-------------------|
| Implementation | Yes | haiku |
| Implementation | No | sonnet |
| Planning/reasoning | Any | sonnet/opus |
| Security/safety review | Any | sonnet minimum, prefer opus |
| Code review | Any | sonnet minimum |

**Security/safety task types** (never downgrade):
- Security audit
- Secret scanning
- Permissions analysis
- Auth-critical review
- Dependency vulnerability scanning

If a code review surfaces security-relevant findings,
the reviewer should note "security-relevant" in its
output to prevent downstream model downgrade.

**Fallback**: When a downgrade rule triggers but the
task type is ambiguous, default to sonne

modules/handoff-patterns.md

---
name: handoff-patterns
description: Request formulation templates and documentation patterns for delegating tasks to external LLMs
parent_skill: conjure:delegation-core
category: delegation-framework
estimated_tokens: 180
dependencies:
  - leyline:service-registry
  - leyline:authentication-patterns
---

# Handoff Patterns and Request Formulation

## Suitability Evaluation

**Check Prerequisites:**
- [ ] Authenticate and verify external service is reachable
- [ ] Confirm quota/rate limits have capacity for the task
- [ ] Verify task does not involve sensitive data requiring local processing
- [ ] Verify expected output format is well-defined

**Evaluate Service Fit:**
- Does the external model excel at this task type?
- Is the latency acceptable for the workflow?
- Can results be easily validated?

## Request Formulation

**Four-Step Process:**
1. Write a clear, self-contained prompt
2. Include all necessary context (files, constraints, examples)
3. Specify the exact output format expected
4. Define success criteria for validation

## Delegation Plan Template

```markdown
## Delegation Plan
- **Service**: [Gemini CLI / Qwen MCP / Other]
- **Command/Call**: [Exact invocation]
- **Input Context**: [Files, data provided]
- **Expected Output**: [Format, content type]
- **Validation Method**: [How to verify correctness]
- **Contingency**: [What to do if delegation fails]
```

## Execution and Integration

**Execute:**
1. Run the delegation with the planned command
2. Capture full output (save to file for audit trail)
3. Log usage metrics (tokens, duration, success/failure)

**Validate:**
- Does output match the expected format?
- Are results factually plausible?
- Do code suggestions compile/lint?
- Are there obvious errors or hallucinations?

**Integrate:**
- Apply results only after validation
- Document what was delegated and the outcome
- Note lessons learned for future delegations

## Collaborative Workflows

For complex tasks requiring both intelligence AND scale:

```
1. Claude: Define framework, criteria, evaluation rubric
2. External: Process data, extract patterns, generate candidates
3. Claude: Analyze results, make decisions, provide recommendations
```

**Example - Large Codebase Review:**
1. Claude: Define architectural principles to evaluate
2. Gemini: Catalog all modules, extract dependency graphs
3. Claude: Analyze patterns against principles, recommend changes

## Anti-Patterns vs Good Patterns

**Don't Delegate:**
- "Review this code and tell me if it's good" (intelligence task)
- "What's the best architecture for X?" (strategic decision)
- "Fix the bugs in this file" (requires understanding intent)

**Do Delegate:**
- "List all functions in these 50 files" (extraction)
- "Count occurrences of pattern X across codebase" (counting)
- "Generate boilerplate for these 20 endpoints" (templating)

modules/task-assessment.md

---
name: task-assessment
description: Task classification framework for determining delegation suitability based on intelligence level and context requirements
parent_skill: conjure:delegation-core
category: delegation-framework
estimated_tokens: 200
dependencies:
  - leyline:quota-management
---

# Task Assessment for Delegation

## Intelligence Level Classification

**High Intelligence (Keep Local):**
- Architecture analysis
- Design decisions
- Trade-off evaluation
- Strategic recommendations
- Nuanced code review
- Creative problem solving

**Low Intelligence (Delegate):**
- Pattern counting
- Bulk extraction
- Boilerplate generation
- Large-file summarization
- Repetitive transformations

## Context Requirements

**Large Context (Favor Delegation):**
- Multi-file analysis
- Codebase-wide searches
- Log processing

**Small Context (Either):**
- Single-file operations
- Focused queries

## Decision Matrix

| Intelligence | Context | Recommendation |
|-------------|---------|----------------|
| High | Any | Keep local |
| Low | Large | Delegate |
| Low | Small | Either |

## Assessment Checklist

Record the following for each task:
- [ ] **Task Objective**: What needs to be accomplished?
- [ ] **Files Involved**: How many and what size?
- [ ] **Intelligence Level**: High or Low?
- [ ] **Context Size**: Large or Small?
- [ ] **Failure Impact**: What happens if delegation fails?

## Token Usage Estimates

**Low Intelligence Tasks (Good for Delegation):**
- Pattern counting across files: 10-50 tokens/file
- Bulk data extraction: 20-100 tokens/file
- Boilerplate generation: 100-500 tokens/template
- Large file summarization: 1-5% of file size tokens

**Context Size Estimations:**
- Single Python file (500 lines): ~2,000-3,000 tokens
- Small module (10 files): ~15,000-25,000 tokens
- Medium project (50 files): ~75,000-150,000 tokens
- Large codebase (200+ files): 300,000+ tokens

**Delegation Thresholds:**
- **Efficient to delegate**: >25,000 total tokens or >50 files
- **Consider delegation**: 10,000-25,000 tokens or 20-50 files
- **Keep local**: <10,000 tokens and <20 files

## Red Flags (Stay Local)

- Security-sensitive operations (auth, crypto, secrets)
- Tasks requiring real-time iteration
- Complex multi-step reasoning chains
- Subjective quality judgments

Sponsored

Ads related to delegation-core and adjacent AI workflows.