database-operation
Qué hace
Permite que la IA consulte y mantenga la base de datos de MoviePilot mediante un auxiliar incluido, sin poner contraseñas en el chat. Está pensada para administradores de MoviePilot que necesitan comprobar o limpiar datos.
Cuándo usarla
- ✓Cuando quieres recuentos o estadísticas de la base de datos de MoviePilot.
- ✓Cuando un registro atascado necesita inspección o hay que hacer una limpieza concreta.
- ✓Cuando quieres que la IA revise el contenido de las tablas antes de hacer cualquier cambio.
Link de la skill
https://github.com/jxxghp/MoviePilot/blob/v3/skills/database-operation/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes contar cuántos registros hay en la base de datos de MoviePilot y listar las tablas?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La IA ejecuta un script auxiliar incluido que lee los ajustes propios de MoviePilot, se conecta a la base de datos y devuelve los resultados.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Database Operation
All script paths are relative to this skill file.
Use scripts/mp-db.py for all database access. Do not extract database passwords, API tokens, or full PostgreSQL DSNs from the prompt. The script reads MoviePilot local settings and connects to SQLite or PostgreSQL internally.
Scope And Boundaries
This skill is the direct SQL boundary. It is implemented as a Python script and is appropriate when the agent must inspect records, run data statistics, repair stuck state, or perform an explicitly requested database update.
Run the bundled copy from the MoviePilot program directory with its project runtime, for example:
cd <MOVIEPILOT_ROOT>
python skills/database-operation/scripts/mp-db.py tables
The Agent command environment routes python to the project-specific moviepilot-python
entry when available and falls back to the project or Docker VENV_PATH Python otherwise.
The runtime sets MOVIEPILOT_ROOT for copied skills. If you run a copied
script directly from <CONFIG_PATH>/agent/skills/, set that variable to the
program directory first; otherwise the helper reports how to relocate it.
Use the project runtime instead of a system python3.
Prefer safer product surfaces first:
| Request | Preferred skill |
|---|---|
| Normal MoviePilot product operation | moviepilot-api structured operations |
| Operation outside the structured API catalog | A more specific Skill or explicit unsupported result |
| Slash commands or plugin/system command dispatch | command-dispatch |
| Manual file organization | organize-files |
| Retry failed transfer history records | transfer-failed-retry |
Use this skill as the final fallback for data access or mutation. It may run
SELECT, INSERT, UPDATE, DELETE, and schema-changing statements through
the bundled script, but broad or destructive writes still require explicit user
authorization.
System settings have two managed sources and should not normally be edited here:
- Runtime
Settingsvariables are queried and updated bymoviepilot-apioperationsconfig.system.get/config.system.update; updates perform type conversion and persist toapp.env. SystemConfigKeyvalues are stored in the databasesystemconfigtable, but the same API operations must be preferred because they enforce registered keys, plugin mutation admission, value normalization, secret redaction, and configuration-change events.
Use direct SQL against systemconfig only for an explicitly authorized repair
when the managed API cannot complete the operation. The script blocks any
statement that references systemconfig until you pass --show-secrets, so
inspect the exact row first, avoid broad writes, and verify the managed API can
read the repaired value.
Commands
List tables:
python scripts/mp-db.py tables
Show table schema:
python scripts/mp-db.py schema downloadhistory
Run a read query:
python scripts/mp-db.py query "SELECT COUNT(*) AS total FROM downloadhistory"
Read SQL from stdin or a file:
python scripts/mp-db.py query --file /path/to/query.sql
Run a write statement:
python scripts/mp-db.py write "UPDATE subscribe SET state = 'S' WHERE id = 123"
query --write is also supported for compatibility, but prefer the write subcommand for INSERT, UPDATE, DELETE, and schema changes.
SQLite also checks the actual table accesses while executing each statement, including single-quoted table names and reads through views. The temporary authorizer is removed when that statement finishes. PostgreSQL retains the identifier check described below.
Statements that reference systemconfig are rejected until you add
--show-secrets, in read and write mode alike:
python scripts/mp-db.py query "SELECT key, value FROM systemconfig WHERE key = 'TMDB_API_KEY'" --show-secrets
The gate is per table, not per column, so even a count or key listing over
systemconfig needs the flag. Read normal settings through
moviepilot-api config.system.get instead, which redacts secrets for you,
and pass the flag only for an explicitly authorized repair.
Workflow
- Prefer existing MoviePilot tools or APIs for normal product workflows.
- Use this skill for direct database inspection only when no existing tool covers the request.
- For unknown schema, run
tablesfirst, thenschema <table>. - For
SELECTqueries, execute directly with a narrow project
Preguntas frecuentes
¿Necesita mi contraseña de la base de datos?
No. El auxiliar lee por sí mismo los ajustes locales de MoviePilot, así que las contraseñas no tienen que estar en el prompt.
¿Qué bases de datos admite?
Se conecta a SQLite o a PostgreSQL, según cómo esté configurado MoviePilot.
¿Debo usarla para tareas normales?
No. La habilidad aconseja usar primero las herramientas más seguras de MoviePilot y el acceso directo a la base de datos solo cuando no puedan hacer el trabajo.
Detalles
Descripción original del autor
Use this skill when you need to inspect, query, maintain, or carefully modify the MoviePilot database. This skill uses the bundled scripts/mp-db.py helper, which reads MoviePilot local settings itself and never requires database passwords or full PostgreSQL DSNs in the agent prompt. Applicable scenarios include data statistics, counts, aggregations, inspecting or fixing records, cleanup requests, and questions like "how many downloads", "show site stats", "delete old records", or "why is this subscription stuck".
repo: jxxghp/MoviePilot
Popularidad
- Estrellas en GitHub
- 12 mil
- Posición en el ranking
- #11481
- Licencia
- GPL-3.0
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
anysearch
12 milAyuda a tu agente a buscar en la web en tiempo real, consultar fuentes especializadas como datos financieros o académicos, y leer páginas web completas.
browser-use
12 milAyuda a tu agente a abrir páginas web, leerlas, hacer clic en botones, rellenar formularios y tomar capturas para comprobar los resultados.
command-dispatch
12 milAyuda a tu agente a encontrar y ejecutar comandos de sistema o de plugins de MoviePilot a partir de una petición, después de comprobar qué comandos existen.
create-moviepilot-plugin
12 milAyuda a tu agente a crear o arreglar un plugin de MoviePilot, usando la estructura de archivos y la configuración correctas para la versión de MoviePilot.
Skills parecidas
discrawl
394 milPermite que tu agente busque y resuma un archivo local guardado de mensajes de Discord, revise qué tan actual es y lea mensajes directos.
clickhouse-io
280 milAyuda a tu agente a optimizar consultas y esquemas en ClickHouse con buenas prácticas para cargas analíticas de alto rendimiento. Úsalo si las consultas son muy lentas.
scientific-db-pubmed-database
280 milAyuda a tu agente a buscar artículos científicos del ámbito biomédico. Es útil para investigaciones que necesitan información médica específica.