Agent skill · Audited from source
External Model Delegation
skill · alinaqi/maggyMIT licenceAudited 13 Oct 2026 · source 3a4a7596e97e
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 3a4a7596e97e and found no filesystem, network or shell access and no hard-coded secrets. What it does: UserPromptSubmit hook pattern that classifies prompts into six cost tiers and delegates to external model CLIs
Cite
Cite this page
ModelsAtlas. “External Model Delegation (alinaqi/maggy)”. Retrieved 13 Oct 2026. https://modelsatlas.com/skills/alinaqi/external-model-delegation
Trust audit
Audit 0.4.1 · source read 13 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 3a4a7596e97e · 13 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisheralinaqi GitHub userOwner of the repository this skill is read from
- Source folderalinaqi/maggy/skills/external-model-delegationThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict3a4a7596e97eA new audit runs when the source changes
- Repository statusNot archivedLast push 18 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: UserPromptSubmit hook pattern that classifies prompts into six cost tiers and delegates to external model CLIs
---
name: external-model-delegation
description: UserPromptSubmit hook pattern that classifies prompts into six cost tiers and delegates to external model CLIs
when-to-use: When configuring or debugging prompt-based delegation to qwen3, deepseek, kimi, or codex
user-invocable: false
effort: medium
---
# External Model Delegation Pattern
A `UserPromptSubmit` hook classifies every user prompt into one of six cost/performance tiers. The hook injects `additionalContext` instructing Claude to run a specific delegation script and return the output.
## Tier routing table
| Tier | Delegation command | Cost |
|------|-------------------|------|
| QWEN | `qwen3 "prompt"` | $0 (local Ollama) |
| DEEPSEEK_FLASH | `deepseek --flash "prompt"` | $0.14 / $0.28 per M tokens |
| DEEPSEEK_PRO | `deepseek --pro "prompt"` | $0.44 / $0.87 per M tokens |
| KIMI | `kimi --quiet -p "prompt"` | $0.60 / $2.50 per M tokens |
| CODEX | `codex exec` | varies |
| CLAUDE | handle natively | $3-5 / $15-25 per M tokens |
## Delegation script pattern
Each script is a self-contained executable in `~/bin/` that accepts a prompt and writes the response to stdout:
```
~/bin/
├── qwen3 # Shell: curl to local Ollama API
├── kimi # Shell: execs Kimi CLI binary
├── deepseek # Python: httpx to DeepSeek Anthropic-compat API
└── route-task # Shell + qwen3: classifies prompt into tier
```
### Script contract
1. Accept prompt as first argument: `qwen3 "what is 2+2"`
2. Support `--flash` / `--pro` model flags (deepseek)
3. Support `--quiet` mode flag (kimi)
4. Write response to stdout, errors to stderr
5. Exit 0 on success, non-zero on error
### Writing a new delegation script
```bash
#!/bin/bash
# Minimal delegator template
PROMPT="$1"
API_KEY="${EXTERNAL_API_KEY:-}"
# Call external API, write result to stdout
curl -s https://api.example.com/chat \
-H "Authorization: Bearer $API_KEY" \
-d "$(jq -n --arg p "$PROMPT" '{prompt: $p}')" \
| jq -r '.response'
```
## Routing hook flow
```
User types prompt
↓
UserPromptSubmit hook fires
↓
qwen3 classifies into tier (QWEN|DEEPSEEK_FLASH|DEEPSEEK_PRO|KIMI|CODEX|CLAUDE)
↓
Hook injects additionalContext: "Run: <delegation-command>"
↓
Claude reads context, spawns delegation script, returns output
↓
User sees response from the delegated model
```
## Classification tiers
| Tier | Task types |
|------|-----------|
| QWEN | grep, find, regex, shell, syntax lookups, log reading, short summaries |
| DEEPSEEK_FLASH | Simple code, boilerplate, CRUD, test writing, small fixes, config |
| DEEPSEEK_PRO | Multi-file features, refactors, debugging, medium coding, docs |
| KIMI | Single-file review, medium reasoning, commit messages, diff summaries |
| CODEX | Bulk generation, mechanical changes across many files |
| CLAUDE | Architecture, security, complex debugging, system design, quality-critical |
## Environment
```bash
# Required env vars (set in ~/.zshrc)
export DEEPSEEK_API_KEY="sk-..." # For deepseek delegator
export OPENAI_API_KEY="sk-..." # For codex CLI
# Ollama must be running locally for qwen3 classification + delegation
```Excerpt, first 3,138 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 3a4a759
git clone https://github.com/alinaqi/maggy git -C maggy checkout 3a4a7596e97e
The author documents no install command, so this uses the repository directly. Our verdict covers commit 3a4a7596e97e only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Codex | Mentioned in its text, not tested | Skills for Codex · About Codex |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
3a4a7596e97e
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/alinaqi/external-model-delegation/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →alinaqi/claude-bootstrap
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
alinaqi/maggy
Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement
alinaqi/claude-bootstrap
Build AI agents with Pydantic AI (Python) and Claude SDK (Node.js)
alinaqi/claude-bootstrap
Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate
alinaqi/claude-bootstrap
Android Java development with MVVM, ViewBinding, and Espresso testing
alinaqi/claude-bootstrap
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing
Add this badge to your README
[](https://modelsatlas.com/skills/alinaqi/external-model-delegation/)
<a href="https://modelsatlas.com/skills/alinaqi/external-model-delegation/"><img src="https://modelsatlas.com/skills/alinaqi/external-model-delegation/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about External Model Delegation
What does the External Model Delegation skill do?
Is External Model Delegation safe to install?
What can External Model Delegation access on my machine?
Which assistants does External Model Delegation work with?
How current is this page?
Sources
- github.com/alinaqi/maggy/tree/main/skills/external-model-delegat — the audited source at commit 3a4a7596e97e and every finding aboveObserved · 13 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the External Model Delegation skill do?
- Is External Model Delegation safe to install?
- What can External Model Delegation access on my machine?