IDSTune

VérifiéPrudence

IDSTune est une compétence d'agent réutilisable pour l'optimisation intégrée de bases de données. Elle collecte le contexte de charge de travail, génère des recommandations de configuration, d'index et de vues matérialisées, et orchestre les plans d'optimisation.

Spar Skills Guide Bot
Data & IAIntermédiaire
27/07/2026
Claude CodeCopilot
#database-tuning#configuration-optimization#index-recommendation#workload-analysis

Recommandé pour

Synthèse automatique

IDSTune est une compétence d'agent qui automatise l'optimisation de bases de données en collectant le contexte d'exécution, en recommandant des réglages de configuration, des index et des vues matérialisées, et en fusionnant les plans d'optimisation de manière itérative.

Points forts

  • Interface unifiée pour plusieurs tâches de réglage (collecte, recommandations, révision, fusion).
  • Automatise la coordination entre différents agents spécialisés (KnobTuner, IndexRecommender, etc.).
  • Permet un processus itératif avec révision et approbation des plans.
  • Inclut des garde-fous de sécurité et une recherche web optionnelle pour enrichir les décisions.

Limites

  • Nécessite Python 3.10+ et une structure de dépôt spécifique (optimizer.py).
  • Dépend d'un accès à une API LLM et éventuellement à la base de données pour appliquer les recommandations.
  • L'efficacité dépend de la qualité des modèles sous-jacents et du schéma de base de données.
Quand l'utiliser

Utilisez cette compétence lorsque vous souhaitez automatiser l'optimisation de la configuration et du schéma d'une base de données pour des charges de travail spécifiques, en exploitant un processus itératif piloté par l'IA.

Quand l'éviter

Évitez de l'utiliser pour des tâches d'optimisation triviales qui peuvent être effectuées manuellement, ou si vous ne disposez pas des permissions nécessaires sur la base de données ou de l'environnement Python requis.

Analyse de sécurité

Prudence
Score qualité88/100

The skill orchestrates database tuning actions, including applying changes via DB Execution after a safety review. While Safety Guardrails is mandated, misuse or guardrail bypass could lead to harmful changes. Web Search introduces external content risk. The skill itself is not malicious but operates in a high-impact domain.

Points d'attention
  • •Requires DB Execution tool which can modify database configuration and schema, potentially causing performance degradation or data unavailability if misapplied.
  • •Uses Web Search tool which could retrieve untrusted or manipulated content, risking prompt injection or biased recommendations.
  • •Calls Python code from a repository that must be trusted; the skill itself does not inspect the code for safety.
Comment cette analyse est faite

Exemples

Tune database for e-commerce workload
I need to optimize my PostgreSQL database for an e-commerce workload with heavy read and write operations. Use the IDSTune skill to collect context, recommend knobs, indexes, and materialized views, and create a tuning plan.
Suggest index recommendations only
Run IDSTune to suggest index recommendations for my database. I don't need knob changes or materialized views.
Full iterative tuning loop
Execute the IDSTune full framework with max 5 iterations on my production database to get a final optimization plan.

name: idstune description: >- IDSTune is a reusable agent skill that provides integrated database tuning for specific workloads. Use this skill to collect runtime workload context, generate knob (configuration) recommendations, propose index and materialized-view changes, review and merge optimization plans, and run the framework iteratively. Designed for orchestration in dynamic agent frameworks (e.g., Copilot CLI-style tool use). license: Apache-2.0 compatibility: >- Requires Python 3.10+ and access to the repository containing configuration_recommendation/optimizer.py. Needs network access for LLM API calls and optional web search. Requires database access when running actions that exercise or apply plans. metadata: author: IDSTune Project version: "0.1" allowed-tools: Bash Python Read Web Search Safety Guardrails DB Execution

IDSTune Skill

Summary

This skill packages the IDSTune design into a single, discoverable agent skill. It exposes a small, well-documented set of actions that orchestration agents can call to perform database tuning tasks without needing to reimplement the coordination logic or low-level plumbing.

Load this skill when the agent's goal includes automated database tuning, configuration optimization, or workload-driven index/materialized-view recommendations.

Actions (what this skill provides)

  • collect_context

    • Purpose: refresh and collect workload and database runtime features.
    • Implementation hint: calls refresh_context() or workload_compression.get_features.
  • suggest_knobs

    • Purpose: produce knob (database configuration) tuning recommendations.
    • Implementation: configuration_recommendation.optimizer.param_tuner(current_plan=None)
    • Output: JSON object with agent: "KnobTuner", items: [ {name, value, details}, ... ], and rationale.
  • suggest_indexes

    • Purpose: propose index recommendations.
    • Implementation: configuration_recommendation.optimizer.index_recommender(current_plan=None)
    • Output: JSON object with agent: "IndexRecommender", items: [ {name, table, columns, details}, ... ].
  • suggest_matviews

    • Purpose: propose materialized view recommendations.
    • Implementation: configuration_recommendation.optimizer.matview_recommender(current_plan=None)
    • Output: JSON object with agent: "MatViewRecommender", items: [ {name, query, details}, ... ].
  • review_plan

    • Purpose: evaluate a candidate plan and return an opinion or revision requests.
    • Implementation: configuration_recommendation.optimizer.control_node(plan, current_plan=None, history=None)
    • Output: { opinion: "Accept" | "Reject", revisions: [ {agent, comment}, ... ] }.
  • merge_plan

    • Purpose: merge a single agent's recommendation into the global plan.
    • Implementation: configuration_recommendation.optimizer.merge_plan(plan, rec)
    • Effect: updates passed-in plan object in place and logs the merged plan.
  • run_framework

    • Purpose: run the full IDSTune iterative optimization loop.
    • Implementation: configuration_recommendation.optimizer.run_framework(max_iters, previous_plan=None, history=None)
    • Output: final plan JSON (may also write plan/result files and optionally run workload tests depending on config.ini).

Tool execution policy

Use the following tools at the points below during an orchestration run:

  • Web Search

    • Use automatically when the agent needs additional domain knowledge that is not present in the local repository or current plan history.
    • Typical triggers include missing tuning heuristics, unfamiliar PostgreSQL behavior, or ambiguous recommendations that need external corroboration.
    • Keep the search targeted and only fetch information that changes the tuning decision.
  • Safety Guardrails

    • Use once a tuning report is finalized, before any recommendation is considered ready for application.
    • Validate recommendation quality, consistency, permission boundaries, and risk level.
    • Reject or flag plans that contain conflicting changes, unsafe resource usage, or actions that exceed the deployment policy.
  • DB Execution

    • Use once Safety Guardrails approves the finalized tuning report.
    • Apply the recommended changes to the target database or test environment in the correct order.
    • Capture execution feedback, including success/failure, performance impact, and any runtime errors, then feed that feedback back into context collection for the next iteration.
    • Prefer transactional, reversible, or isolated execution paths whenever possible.

Orchestration order:

  1. Collect context.
  2. Generate candidate recommendations.
  3. Invoke Web Search only if additional knowledge is required.
  4. Review the report with Safety Guardrails.
  5. Execute the approved changes with DB Execution.
  6. Feed execution feedback back into context and continue iterating if needed.

Inputs and Outputs

This skill prefers structured JSON inputs and returns structured JSON outputs. Recommended common input schema:

  • target (optional): { db: <connection>, workload_dir: <path>, benchmark: <string> }
  • constraints (optional): { time_limit: <seconds>, max_iterations: <int>, dry_run: <bool> }
  • previous_plan (optional): plan JSON produced by prior runs

Common output schema (plan):

  • plan: {
    • knobs: { <name>: {value, details}, ... },
    • indexes: [ {name, table, columns, details}, ... ],
    • matviews: [ {name, query, details}, ... ],
    • history: [ ... ] }

Where applicable, recommendation actions return wrapper objects that include an agent field (e.g., KnobTuner) and a free-text rationale when JSON parsing fails.

Examples

Programmatic usage (Python, no side effects unless you run tests)

from configuration_recommendation import optimizer

# Collect recommendations (safe: only calls LLM and local code)
plan = {"knobs": {}, "indexes": [], "matviews": [], "history": []}
for fn in (optimizer.param_tuner, optimizer.index_recommender, optimizer.matview_recommender):
    rec = fn(None)
    optimizer.merge_plan(plan, rec)

print(plan)

CLI-style quick example (Copilot CLI-like agent exec)

To fetch recommendations only:

python -c "from configuration_recommendation.optimizer import param_tuner,index_recommender,matview_recommender,merge_plan; p={'knobs':{},'indexes':[],'matviews':[],'history':[]};
for f in (param_tuner,index_recommender,matview_recommender): merge_plan(p,f(None));
import json; print(json.dumps(p,ensure_ascii=False,indent=2))"

To run the full framework (may perform tests and have side effects):

python configuration_recommendation/optimizer.py

Safety, validation and best practices

  • Dry-run recommended: set constraints.dry_run=true or isolate DB in a test instance before applying changes (creating indexes, materialized views, or changing knobs).
  • Validate plans before applying: perform validate_plan(plan) that checks for duplicates, conflicting index definitions, resource budget, and DB permissions.
  • LLM failures: control_node contains fallback logic; orchestration layers should implement retry, backoff and human review for Reject outcomes.
  • Audit & rollback: apply changes in transactional or revertible steps and keep an audit log of any schema or configuration changes.

Error handling

  • Recommendation functions return non-JSON rationale text when parsing fails. Orchestrators should treat such cases as candidate outputs requiring review.
  • When external tests (benchmark runners) fail, the skill logs results to optimization_result.json and continues according to constraints.

Files and integration points

Place this skill in the repository root as a sibling to the existing configuration_recommendation folder. This skill references the following modules inside the repository:

  • configuration_recommendation/optimizer.py (core implementation)
  • workload_compression/* (context extraction)
  • configuration_recommendation/DB_test.py (benchmark/test runners)

Agents should register the following callable entrypoints provided by the repository when activating this skill:

  • idstune.collect_context -> workload_compression.get_features / refresh_context
  • idstune.suggest_knobs -> optimizer.param_tuner
  • idstune.suggest_indexes -> optimizer.index_recommender
  • idstune.suggest_matviews -> optimizer.matview_recommender
  • idstune.review_plan -> optimizer.control_node
  • idstune.merge_plan -> optimizer.merge_plan
  • idstune.run_framework -> optimizer.run_framework

Progressive disclosure

  • Agents should load the frontmatter and the action list when considering activating the skill (small). The instructions above provide enough detail for initial use. If deeper references are needed, load implementation files under configuration_recommendation/ on demand.

Reference & validation

Validate this skill locally using the agent skills reference tooling if available (see repository Specification.md for validation commands).

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/idstune-ms2s7bq0/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/idstune-ms2s7bq0' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/idstune-ms2s7bq0/download' --output '.skill-downloads/idstune-ms2s7bq0/SKILL.md.part' && mv '.skill-downloads/idstune-ms2s7bq0/SKILL.md.part' '.skill-downloads/idstune-ms2s7bq0/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.

Environnement déclaré par l’auteur : Requires Python 3.10+ and access to the repository containing `configuration_recommendation/optimizer.py`. Needs network access for LLM API calls and optional web search. Requires database access when running actions that exercise or apply plans.

Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash Python Read Web Search Safety Guardrails DB Execution

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/idstune-ms2s7bq0/SKILL.md' && test -s '.skill-downloads/idstune-ms2s7bq0/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/idstune' && cp -R '.skill-downloads/idstune-ms2s7bq0' '.claude/skills/idstune'

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/idstune-ms2s7bq0'

openskills read 'idstune-ms2s7bq0'

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/idstune-ms2s7bq0/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