Gestion des adaptateurs Mastermind

VérifiéPrudence

Installer, activer, désactiver et supprimer des adaptateurs LLM pour une organisation via Mastermind. Prend en charge claude-local, gemini-local, codex-local, cursor et plus.

Spar Skills Guide Bot
Data & IAIntermédiaire
30/08/2026
Claude Code
#llm-adapters#plugin-management#org-config#multi-agent#cli-config

Recommandé pour

Synthèse automatique

Gère les adaptateurs LLM d'une organisation Mastermind (lister, activer, désactiver, installer, recharger, supprimer, définir celui par défaut) via des fichiers JSON d'organisation.

Points forts

  • Couvre tout le cycle de vie de l'adaptateur : list, enable, disable, install, remove, reload, set-default.
  • Amorce automatiquement le fichier d'adaptateurs à partir de la configuration de l'org quand il n'existe pas encore.
  • Registre intégré de dix types d'adaptateurs (claude-local, gemini-local, codex-local, cursor, http, acpx-local, etc.).
  • Mode confirm par défaut, ce qui limite les modifications accidentelles.

Limites

  • Les étapes reload, install et remove sont tronquées dans le SKILL.md fourni, et la branche enable s'arrête au milieu d'un commentaire.
  • Suppose une arborescence .monomind/orgs/ et la présence de jq.
  • Ne vérifie ni la disponibilité réelle de l'adaptateur ni les CLI ou identifiants requis.
Quand l'utiliser

À utiliser lorsqu'il faut changer l'adaptateur LLM par défaut d'une organisation ou activer/désactiver/installer un adaptateur pour celle-ci.

Quand l'éviter

À ne pas utiliser pour écrire une nouvelle implémentation d'adaptateur ou diagnostiquer la qualité des réponses d'un modèle.

Analyse de sécurité

Prudence
Score qualité85/100

The skill executes bash scripts that read and write local JSON configuration files. While the actions are limited to adapter registry management and do not perform destructive or exfiltrating operations, the lack of input sanitization for org_name and package_name introduces potential path traversal or injection risk if invoked with untrusted values. This warrants a caution rating.

Points d'attention
  • •Uses shell commands and modifies local configuration files under .monomind/orgs.
  • •org_name and package_name are interpolated directly into file paths and jq expressions without sanitization, which could allow path traversal or JSON injection if inputs are untrusted.
Comment cette analyse est faite

Exemples

List org adapters
/mastermind:adapters list for org acme
Switch default adapter
Set the default adapter for org acme to gemini-local, then disable the http adapter for that org.
Install a custom adapter
Install the adapter package @acme/mm-adapter-openrouter for org acme and reload it so it shows up in the adapter list.

name: mastermind-adapters description: Mastermind adapters — install, enable, disable, reload, and remove LLM adapter plugins per org. Supports claude-local, gemini-local, codex-local, cursor, hermes, http, and custom adapters. type: domain-skill default_mode: confirm

Mastermind Adapters

This skill is invoked by mastermind:adapters or directly via /mastermind:adapters.


Inputs

  • brain_context: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
  • org_name: org to manage adapters for (required)
  • action: list | enable | disable | install | remove | reload | set-default
  • adapter_type: adapter slug (e.g. claude-local, gemini-local, http) — required for most actions
  • package_name: npm package name or local path (required for install)
  • caller: command | master

Step 0 — Brain Load (standalone only)

If caller is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: ops.


Built-in Adapter Registry

| Type | Label | Source | Notes | |------|-------|--------|-------| | claude-local | Claude (local CLI) | built-in | Uses claude CLI | | claude-opus-4-7 | Claude Opus 4.7 | built-in | High capability | | claude-sonnet-4-6 | Claude Sonnet 4.6 | built-in | Balanced (default) | | claude-haiku-4-5 | Claude Haiku 4.5 | built-in | Fast, low cost | | gemini-local | Gemini (local) | built-in | Uses gemini CLI | | codex-local | Codex (local) | built-in | Uses codex CLI | | cursor | Cursor | built-in | Uses Cursor agent | | hermes-local | Hermes (local) | built-in | Local Hermes LLM | | http | HTTP Adapter | built-in | Generic HTTP endpoint | | acpx-local | ACPX (local) | built-in | ACPX protocol |


Step 1 — Load Adapter Registry

orgFile=".monomind/orgs/${org_name}.json"
[ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }

adaptersFile=".monomind/orgs/${org_name}-adapters.json"
if [ ! -f "$adaptersFile" ]; then
  # Bootstrap from org config adapter_config if present
  defaultModel=$(jq -r '.run_config.ceo_adapter // "claude-sonnet-4-6"' "$orgFile")
  cat > "$adaptersFile" <<EOF
{
  "org": "${org_name}",
  "default_adapter": "${defaultModel}",
  "adapters": [
    {"type":"claude-local","label":"Claude (local CLI)","source":"built-in","disabled":false,"modelsCount":3},
    {"type":"gemini-local","label":"Gemini (local)","source":"built-in","disabled":false,"modelsCount":1},
    {"type":"http","label":"HTTP Adapter","source":"built-in","disabled":true,"modelsCount":0}
  ]
}
EOF
fi

Step 2 — Execute Action

list (default)

echo "ADAPTERS — org: $org_name"
echo "──────────────────────────────────────────────────────"
printf "%-22s %-28s %-10s %-8s %s\n" "TYPE" "LABEL" "SOURCE" "MODELS" "STATUS"
echo "──────────────────────────────────────────────────────"

defaultAdap=$(jq -r '.default_adapter // "claude-sonnet-4-6"' "$adaptersFile")

jq -r --arg def "$defaultAdap" '
  (.adapters // [])[] |
  [.type, (.label // .type), (.source // "built-in"), (.modelsCount // 0 | tostring),
   (if .disabled then "DISABLED" else "ACTIVE" end),
   (if .type == $def then " ← default" else "" end)]
  | @tsv
' "$adaptersFile" | while IFS=$'\t' read -r type label source models status def; do
  printf "%-22s %-28s %-10s %-8s %s%s\n" "$type" "$label" "$source" "$models" "$status" "$def"
done

echo ""
echo "Default adapter: $defaultAdap"
echo "External adapters: $(jq '[(.adapters // [])[] | select(.source == "external")] | length' "$adaptersFile")"

enable / disable

action_status=$([ "$action" = "enable" ] && echo "false" || echo "true")
tmp="${adaptersFile}.tmp"
jq --arg type "$adapter_type" --argjson dis "$action_status" \
  '.adapters = [(.adapters // [])[] | if .type == $type then .disabled = $dis else . end]' \
  "$adaptersFile" > "$tmp" && mv "$tmp" "$adaptersFile"

# If re-enabling, also check org config adapter_config for matching roles
echo "Adapter '$adapter_type' → $([ "$action" = "enable" ] && echo 'ACTIVE' || echo 'DISABLED')"

install

Add an external adapter (npm package or local path):

[ -z "$package_name" ] && { echo "ERROR: --package-name required."; exit 1; }
[ -z "$adapter_type" ] && adapter_type=$(echo "$package_name" | sed 's/[@/].*$//' | tr '-' '_')

isLocal=false
[[ "$package_name" == /* || "$package_name" == "./"* ]] && isLocal=true

tmp="${adaptersFile}.tmp"
jq --arg type "$adapter_type" \
   --arg pkg "$package_name" \
   --argjson local "$isLocal" \
   '.adapters = [(.adapters // [])[] | select(.type != $type)] +
    [{"type":$type,"label":$pkg,"source":"external","packageName":$pkg,"isLocalPath":$local,
      "disabled":false,"modelsCount":0,"installedAt":(now|todate)}]' \
  "$adaptersFile" > "$tmp" && mv "$tmp" "$adaptersFile"
echo "Installed: $package_name as adapter type '$adapter_type'"
echo "NOTE: Restart the org run to activate the new adapter."

remove

[ -z "$adapter_type" ] && { echo "ERROR: --adapter-type required."; exit 1; }

# Verify it's external
src=$(jq -r --arg t "$adapter_type" '(.adapters // [])[] | select(.type == $t) | .source' "$adaptersFile" 2>/dev/null)
[ "$src" = "built-in" ] && { echo "ERROR: Cannot remove built-in adapters. Use 'disable' instead."; exit 1; }
[ -z "$src" ] && { echo "ERROR: Adapter '$adapter_type' not found."; exit 1; }

tmp="${adaptersFile}.tmp"
jq --arg type "$adapter_type" '.adapters = [(.adapters // [])[] | select(.type != $type)]' \
  "$adaptersFile" > "$tmp" && mv "$tmp" "$adaptersFile"
echo "Removed adapter: $adapter_type"

set-default

[ -z "$adapter_type" ] && { echo "ERROR: --adapter-type required."; exit 1; }
tmp="${adaptersFile}.tmp"
jq --arg type "$adapter_type" '.default_adapter = $type' "$adaptersFile" > "$tmp" && mv "$tmp" "$adaptersFile"
# Sync to org run_config as well
orgTmp="${orgFile}.tmp"
jq --arg model "$adapter_type" '.run_config.ceo_adapter = $model' "$orgFile" > "$orgTmp" && mv "$orgTmp" "$orgFile"
echo "Default adapter set to: $adapter_type"

reload

Force a reload hint (marks adapter as needing restart):

tmp="${adaptersFile}.tmp"
jq --arg type "$adapter_type" --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  '.adapters = [(.adapters // [])[] | if .type == $type then .last_reload = $ts else . end]' \
  "$adaptersFile" > "$tmp" && mv "$tmp" "$adaptersFile"
echo "Marked adapter '$adapter_type' for reload. Restart the org run to apply."

Step 3 — Return Output

domain: ops
status: complete
action: <action>
org: <org_name>
adapter_type: <adapter_type if applicable>

Step 4 — Brain Write (standalone only)

If caller is not "command", follow mastermind-protocol/SKILL.md Brain Write Procedure for domain ops.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/mastermind-adapters-management-mtfbwm9p' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/mastermind-adapters-management-mtfbwm9p/download' --output '.skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md.part' && mv '.skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md.part' '.skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md' && test -s '.skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/mastermind-adapters' && cp -R '.skill-downloads/mastermind-adapters-management-mtfbwm9p' '.claude/skills/mastermind-adapters'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/mastermind-adapters-management-mtfbwm9p'

openskills read 'mastermind-adapters-management-mtfbwm9p'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/mastermind-adapters-management-mtfbwm9p/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires