This skill should be used when the user wants to view, display, or show a file stored in the CRM database. This is an orchestration skill that combines downloading from the database and opening with the OS default application. Triggers on requests like "show me the contract from CRM", "display the image from the database", "view the PDF for company X", or "open the attachment from the database".
View files stored in the CRM database by downloading them to disk and opening them in the default application. This is an orchestration skill that combines the download and open workflows.
Use this skill when the user wants to:
Trigger phrases:
Do NOT use this skill if:
bel-download-file-from-crm-dbbel-open-file)This skill orchestrates two other skills in sequence. Do NOT write a new script - instead, use the existing skills.
1. Download file from database → 2. Open file with OS default app
(bel-download-file-from-crm-db) (bel-open-file)
Use the bel-download-file-from-crm-db skill to download the file from the database:
bel-crm-db to query and find the file_idpython scripts/download_file_from_db.py <file_id>Use the bel-open-file skill to open the downloaded file:
python scripts/open_file.py <file_path># User: "Show me the contract for company ID 42"
# Step 1: Download from database
python /path/to/bel-download-file-from-crm-db/scripts/download_file_from_db.py 789 --quiet
# Output: _RESULTS_FROM_AGENT/contract.pdf
# Step 2: Open the file
python /path/to/bel-open-file/scripts/open_file.py _RESULTS_FROM_AGENT/contract.pdf
# File opens in default PDF viewer
This skill does not have its own scripts - it coordinates existing skills:
Required skills:
bel-crm-db - For database schema and queryingbel-download-file-from-crm-db - For downloading filesbel-open-file - For opening filesCoordination pattern:
# Pseudo-code for the workflow
file_id = query_database_for_file_id(entity_identifier)
file_path = download_file_from_db(file_id)
open_file(file_path)
User: "Show me file ID 789 from the database"
1. Invoke: bel-download-file-from-crm-db
- python scripts/download_file_from_db.py 789 --quiet
- Result: _RESULTS_FROM_AGENT/document.pdf
2. Invoke: bel-open-file
- python scripts/open_file.py _RESULTS_FROM_AGENT/document.pdf
- File opens in PDF viewer
3. Report to user: "✅ Opened document.pdf"
User: "Show me the contract for Acme Corp"
1. Use bel-crm-db to query:
- Find company_site_id for "Acme Corp"
- Find file_id via company_site_file junction table
- Result: file_id = 456
2. Invoke: bel-download-file-from-crm-db
- python scripts/download_file_from_db.py 456 --quiet
- Result: _RESULTS_FROM_AGENT/acme_contract.pdf
3. Invoke: bel-open-file
- python scripts/open_file.py _RESULTS_FROM_AGENT/acme_contract.pdf
- Contract opens in PDF viewer
4. Report to user: "✅ Opened acme_contract.pdf for Acme Corp"
User: "Display the image from event 5"
1. Use bel-crm-db to query:
- Find file_id via event_file where event_id = 5
- Result: file_id = 234
2. Invoke: bel-download-file-from-crm-db
- python scripts/download_file_from_db.py 234 --quiet
- Result: _RESULTS_FROM_AGENT/event_photo.jpg
3. Invoke: bel-open-file
- python scripts/open_file.py _RESULTS_FROM_AGENT/event_photo.jpg
- Image opens in default viewer
4. Report to user: "✅ Opened event_photo.jpg"
Handle errors at each step:
Step 1 - Download errors:
Step 2 - Open errors:
Recovery strategy:
Decision tree for file operations:
User wants to work with a file
│
├─ File is in database?
│ ├─ Yes: User wants to view/show/display?
│ │ ├─ Yes → Use bel-show-crm-file (this skill)
│ │ └─ No (just download) → Use bel-download-file-from-crm-db
│ │
│ └─ No: File already on disk
│ └─ User wants to open? → Use bel-open-file
This skill is orchestration only:
Benefits of this approach: