Skills

Database Operation

Use this skill when you need to inspect, query, maintain, or carefully modify the...

Install

npx skills add jxxghp/MoviePilot --skill database-operation -g -a claude-code -y
Repository
jxxghp/MoviePilot12k
Category
Data and ML
Updated
3d ago
License
GPL-3.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
Yes, review before use

What it does

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".

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:

RequestPreferred skill
Normal MoviePilot product operationmoviepilot-api structured operations
Operation outside the structured API catalogA more specific Skill or explicit unsupported result
Slash commands or plugin/system command dispatchcommand-dispatch
Manual file organizationorganize-files
Retry failed transfer history recordstransfer-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:

Read the whole SKILL.md on GitHub

More in Data and ML