Automated summary
IDSTune is an agent skill that automates database tuning by collecting runtime context, recommending configuration knobs, indexes, and materialized views, and merging optimization plans iteratively.
Strengths
- Unified interface for multiple tuning tasks (context collection, recommendations, review, merge).
- Automates coordination between specialized agents (KnobTuner, IndexRecommender, etc.).
- Supports iterative process with plan review and approval.
- Includes safety guardrails and optional web search for additional context.
Limitations
- Requires Python 3.10+ and a specific repository structure (optimizer.py).
- Depends on access to an LLM API and potentially the database to apply recommendations.
- Effectiveness relies on the quality of underlying models and database schema.
Use this skill when you need to automatically tune a database's configuration and schema for specific workloads through an AI-driven iterative process.
Do not use for trivial tuning tasks that can be done manually, or if you lack the necessary database permissions or the required Python environment setup.
Security analysis
CautionThe 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.
- •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.
Examples
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.Run IDSTune to suggest index recommendations for my database. I don't need knob changes or materialized views.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()orworkload_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}, ... ], andrationale.
-
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
planobject 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
planJSON (may also write plan/result files and optionally run workload tests depending onconfig.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:
- Collect context.
- Generate candidate recommendations.
- Invoke Web Search only if additional knowledge is required.
- Review the report with Safety Guardrails.
- Execute the approved changes with DB Execution.
- 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=trueor 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_nodecontains fallback logic; orchestration layers should implement retry, backoff and human review forRejectoutcomes. - 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
rationaletext 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.jsonand 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_contextidstune.suggest_knobs->optimizer.param_tuneridstune.suggest_indexes->optimizer.index_recommenderidstune.suggest_matviews->optimizer.matview_recommenderidstune.review_plan->optimizer.control_nodeidstune.merge_plan->optimizer.merge_planidstune.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).
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/idstune-ms2s7bq0/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
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. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Environment declared by the author: 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.
Tools declared by the author (check availability in your agent): Bash Python Read Web Search Safety Guardrails DB Execution
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
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 must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/idstune-ms2s7bq0'openskills read 'idstune-ms2s7bq0'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/idstune-ms2s7bq0/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.