database-operation
यह क्या करती है
यह AI को बंडल सहायक के ज़रिए MoviePilot डेटाबेस से क्वेरी करने और उसे संभालने देती है, बिना चैट में पासवर्ड डाले। यह उन MoviePilot एडमिन के लिए है जिन्हें डेटा जाँच या सफ़ाई करनी है।
कब इस्तेमाल करें
- ✓जब आपको MoviePilot डेटाबेस से गिनती या आँकड़े चाहिए।
- ✓जब कोई अटका हुआ रिकॉर्ड जाँचना हो या कोई खास सफ़ाई करनी हो।
- ✓जब आप चाहते हैं कि कोई बदलाव होने से पहले AI टेबल का डेटा जाँचे।
Skill का लिंक
https://github.com/jxxghp/MoviePilot/blob/v3/skills/database-operation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप गिन सकते हैं कि MoviePilot डेटाबेस में कितने रिकॉर्ड हैं, और टेबलों की सूची दे सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI एक बंडल सहायक स्क्रिप्ट चलाता है, जो MoviePilot की अपनी सेटिंग्स पढ़कर डेटाबेस से जुड़ती है और नतीजे लौटाती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या इसे मेरा डेटाबेस पासवर्ड चाहिए?
नहीं। सहायक MoviePilot की स्थानीय सेटिंग्स खुद पढ़ता है, इसलिए पासवर्ड प्रॉम्प्ट में डालने की ज़रूरत नहीं।
यह कौन-से डेटाबेस सपोर्ट करती है?
MoviePilot के सेटअप के अनुसार यह SQLite या PostgreSQL से जुड़ती है।
क्या इसे सामान्य कामों के लिए इस्तेमाल करना चाहिए?
नहीं। स्किल पहले सुरक्षित MoviePilot टूल इस्तेमाल करने और सीधी डेटाबेस पहुँच केवल तब करने की सलाह देती है, जब कोई और तरीका काम न करे।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 12k
- रैंकिंग में स्थान
- #11481
- लाइसेंस
- GPL-3.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
anysearch
12kआपके एजेंट को रीयल टाइम में वेब पर खोज करने, वित्त या शैक्षणिक डेटा जैसे विशेष स्रोतों से पूछने और पूरे वेब पेज पढ़ने में मदद करती है।
browser-use
12kआपके एजेंट को वेब पेज खोलने, पढ़ने, बटन क्लिक करने, फ़ॉर्म भरने और नतीजे जाँचने के लिए स्क्रीनशॉट लेने में मदद करती है।
command-dispatch
12kआपके एजेंट को किसी अनुरोध से MoviePilot सिस्टम या प्लगइन कमांड ढूँढकर चलाने में मदद करती है, पहले यह जाँचकर कि कौन-से कमांड मौजूद हैं।
create-moviepilot-plugin
12kआपके एजेंट को MoviePilot प्लगइन बनाने या ठीक करने में मदद करती है, MoviePilot संस्करण के लिए सही फ़ाइल संरचना और सेटअप के साथ।
मिलती-जुलती skills
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।