brainstorming
Structured design dialogue that validates ideas before implementation begins.
managing-imports
Organize incoming files and track import status through the file staging workflow
Full skill instructions
Manage import file workflow from drop to archive: organize files, check duplicates, track status, and clear processed files.
Use when: Processing new import files, checking import status, or archiving successfully imported data.
Announce at start: "I'm using the managing-imports skill to [operation]."
Wraps the file staging system (scripts/utilities/file_staging/) with user-friendly operations:
When: New files dropped in inbox, need to classify and organize for import.
Process:
Verify inbox has files
cd /Users/anthonybyrnes/PycharmProjects/Python419
find imports/inbox -type f | wc -l
If 0 files, report: "Inbox is empty. No files to stage."
Run file staging orchestrator
cd /Users/anthonybyrnes/PycharmProjects/Python419
PYTHONPATH=. python3 -m scripts.utilities.file_staging \
--drop-folder imports/inbox \
--use-db \
--generate-plan
What this does:
imports/staged/{type}/Parse orchestrator output
Look for:
Report results
Format:
Staging Complete:
- Processed: 15 files
- Staged: 12 files (ready for import)
- Skipped: 3 files (duplicates)
Staged files by type:
- LBHRA: 5 files → imports/staged/lbhra/
- PS_LB: 4 files → imports/staged/ps-lb/
- 419F: 3 files → imports/staged/419f/
Manifest: imports/staged/staging-manifest-YYYY-MM-DD-HHMMSS.json
Import plan: imports/staged/import-plan-YYYY-MM-DD-HHMMSS.sh
Error Handling:
When: Want to verify if files have already been imported before staging.
Process:
Get file path or directory
User provides:
Calculate SHA256 hashes
For each file:
shasum -a 256 <file_path>
Query import_manifest
import psycopg2
from dotenv import load_dotenv
import os
load_dotenv()
conn = psycopg2.connect(
host=os.getenv('DB_HOST'),
dbname=os.getenv('DB_NAME'),
user=os.getenv('DB_USER'),
password=os.getenv('DB_PASSWORD')
)
cursor = conn.cursor()
cursor.execute("""
SELECT
original_path,
file_type,
term_code,
imported_at
FROM import_manifest
WHERE file_hash = %s
""", (file_hash,))
result = cursor.fetchone()
Report duplicates
For each duplicate found:
DUPLICATE: filename.txt
- SHA256: abc123...
- Previously imported: 2025-11-10 14:32:15
- Original path: imports/archive/lbhra/2024-fall/filename.txt
- File type: LBHRA
- Term: 2024-fall
- Action: SKIP (already in database)
For non-duplicates:
NEW: filename.txt
- SHA256: def456...
- Not found in import_manifest
- Action: READY FOR IMPORT
SQL Helper:
-- Check multiple files at once
SELECT
file_hash,
original_path,
file_type,
term_code,
imported_at
FROM import_manifest
WHERE file_hash IN ('hash1', 'hash2', 'hash3')
ORDER BY imported_at DESC;
When: Need overview of import workflow stages, checking what's queued for import.
Process:
Count files in each stage
cd /Users/anthonybyrnes/PycharmProjects/Python419
# Inbox
INBOX=$(find imports/inbox -type f 2>/dev/null | wc -l | tr -d ' ')
# Staged by type
LBHRA=$(find imports/staged/lbhra -type f 2>/dev/null | wc -l | tr -d ' ')
PS_LB=$(find imports/staged/ps-lb -type f 2>/dev/null | wc -l | tr -d ' ')
LBSR08E=$(find imports/staged/lbsr08e -type f 2>/dev/null | wc -l | tr -d ' ')
F419=$(find imports/staged/419f -type f 2>/dev/null | wc -l | tr -d ' ')
PROGRAM=$(find imports/staged/program-list -type f 2>/dev/null | wc -l | tr -d ' ')
COTA=$(find imports/staged/cota-persistence -type f 2>/dev/null | wc -l | tr -d ' ')
# Processing
PROCESSING=$(find imports/processing -type f 2>/dev/null | wc -l | tr -d ' ')
# Archive (total)
ARCHIVE=$(find imports/archive -type f 2>/dev/null | wc -l | tr -d ' ')
Detect terms for staged files
For each type with staged files, group by term:
# Example: LBHRA files by term
for file in imports/staged/lbhra/*.txt; do
# Run term detector
TERM=$(PYTHONPATH=. python3 -c "
from scripts.utilities.file_staging.term_detector import detect_term
result = detect_term('$file')
print(result.get('term_code', 'unknown'))
")
echo "$file -> $TERM"
done
Count by term for display.
Format output
Import Status:
Inbox: 0 files
Staged: 13 files ready for import
- LBHRA (5 files):
- 2024-fall: 2 files
- 2025-spring: 3 files
- PS_LB (4 files):
- 2024-fall: 1 file
- 2025-spring: 3 files
- 419F (3 files):
- 2025-spring: 3 files
- LBSR08E (0 files)
- Program List (0 files)
- COTA Persistence (1 file):
- 2024-fall: 1 file
Processing: 0 files
Archive: 1,247 files across 6 types
Show recent imports from manifest
SELECT
file_type,
term_code,
COUNT(*) as file_count,
MAX(imported_at) as last_import
FROM import_manifest
GROUP BY file_type, term_code
ORDER BY last_import DESC
LIMIT 10;
Display as:
Recent Imports (from manifest):
- LBHRA 2025-spring: 3 files (last: 2025-11-13 10:45:22)
- PS_LB 2025-spring: 3 files (last: 2025-11-13 10:47:15)
- 419F 2024-fall: 5 files (last: 2025-11-12 16:23:01)
Error Handling:
When: Import succeeded, files verified in database, ready to move to archive.
Process:
Verify files are in manifest
SELECT
file_hash,
original_path,
file_type,
term_code
FROM import_manifest
WHERE original_path LIKE '%staged%'
ORDER BY imported_at DESC;
These are successfully imported files still in staging.
Determine archive destination
For each file:
LBHRA, PS_LB, etc.2024-fall, 2025-spring, etc.imports/archive/{type}/{term}/Example:
imports/staged/lbhra/LBHRA_Report_Fall2024.txtlbhra2024-fallimports/archive/lbhra/2024-fall/Create archive directories if needed
mkdir -p imports/archive/{type}/{term}
Move files
mv imports/staged/{type}/{filename} imports/archive/{type}/{term}/
Update manifest (optional)
If tracking archive paths:
UPDATE import_manifest
SET original_path = %s
WHERE file_hash = %s;
Report results
Cleared Processed Files:
Moved to archive:
- LBHRA (5 files):
- 2024-fall: 2 files → imports/archive/lbhra/2024-fall/
- 2025-spring: 3 files → imports/archive/lbhra/2025-spring/
- PS_LB (4 files):
- 2025-spring: 4 files → imports/archive/ps-lb/2025-spring/
Total: 9 files archived
Remaining staged: 4 files
Safety Checks:
Error Handling:
imports/archive/{type}/unknown-term/Wraps:
scripts/utilities/file_staging/orchestrator.pyscripts/utilities/file_staging/term_detector.pyscripts/utilities/file_staging/duplicate_checker.pyDatabase:
import_manifest (SHA256 tracking).env credentialsUsed by:
project-status skill (shows import queue)Depends on:
/imports/ directory structureFile Type Patterns:
FILE_TYPE_PATTERNS = {
'LBHRA': r'LBHRA.*\.txt$',
'PS_LB': r'PS_LB.*\.txt$',
'LBSR08E': r'LBSR08E.*\.txt$',
'419F': r'419F.*\.txt$',
'PROGRAM_LIST': r'(?i)program.*list.*\.xlsx?$',
'COTA_PERSISTENCE': r'(?i)(ta|ga|isa).*\.txt$',
}
Term Code Mapping:
TERM_CODES = {
'fall': 'YYYY-fall',
'spring': 'YYYY-spring',
'summer': 'YYYY-summer',
'winter': 'YYYY-winter',
}
Database Schema:
CREATE TABLE import_manifest (
id SERIAL PRIMARY KEY,
file_hash VARCHAR(64) UNIQUE NOT NULL,
original_path TEXT NOT NULL,
file_type VARCHAR(50),
term_code VARCHAR(20),
imported_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
file_size BIGINT,
record_count INTEGER
);
User: "I have new import files in the inbox. Can you stage them?"
Assistant: "I'm using the managing-imports skill to stage files from inbox."
[Runs staging operation]
Output:
Staging Complete:
- Processed: 8 files
- Staged: 8 files (ready for import)
- Skipped: 0 files (no duplicates)
Staged files by type:
- LBHRA: 3 files → imports/staged/lbhra/
- PS_LB: 3 files → imports/staged/ps-lb/
- 419F: 2 files → imports/staged/419f/
Manifest: imports/staged/staging-manifest-2025-11-14-143022.json
Import plan: imports/staged/import-plan-2025-11-14-143022.sh
Next step: Review import plan and execute imports.
User: "What's in the import queue?"
Assistant: "I'm using the managing-imports skill to track import status."
[Runs track status operation]
Output:
Import Status:
Inbox: 0 files
Staged: 8 files ready for import
- LBHRA (3 files):
- 2025-spring: 3 files
- PS_LB (3 files):
- 2025-spring: 3 files
- 419F (2 files):
- 2025-spring: 2 files
Processing: 0 files
Archive: 1,255 files across 6 types
Recent Imports (from manifest):
- PS_LB 2025-spring: 3 files (last: 2025-11-14 10:15:33)
- LBHRA 2025-spring: 3 files (last: 2025-11-14 10:12:45)
- 419F 2024-fall: 5 files (last: 2025-11-13 15:22:11)
User: "Check if these files are duplicates before I import them."
Assistant: "I'm using the managing-imports skill to check for duplicates."
[Runs duplicate check on inbox]
Output:
Duplicate Check Results:
DUPLICATE: LBHRA_Spring2025_v2.txt
- SHA256: abc123def456...
- Previously imported: 2025-11-10 14:32:15
- Original path: imports/archive/lbhra/2025-spring/LBHRA_Spring2025.txt
- File type: LBHRA
- Term: 2025-spring
- Action: SKIP (already in database)
NEW: PS_LB_Spring2025_Updated.txt
- SHA256: 789xyz012abc...
- Not found in import_manifest
- Action: READY FOR IMPORT
Summary:
- Duplicates: 1 file (skip)
- New files: 1 file (ready to import)
User: "Import completed successfully. Archive the processed files."
Assistant: "I'm using the managing-imports skill to clear processed files."
[Runs clear processed operation]
Output:
Cleared Processed Files:
Moved to archive:
- LBHRA (3 files):
- 2025-spring: 3 files → imports/archive/lbhra/2025-spring/
- PS_LB (3 files):
- 2025-spring: 3 files → imports/archive/ps-lb/2025-spring/
- 419F (2 files):
- 2025-spring: 2 files → imports/archive/419f/2025-spring/
Total: 8 files archived
Remaining staged: 0 files
All staged files have been archived.
Staging without database connection:
--use-db flag when stagingMoving files before import verified:
Not detecting terms correctly:
Archiving files not in manifest:
Never:
Always:
1. New files arrive
↓
Drop in: /imports/inbox/
2. Stage files (this skill)
↓
Run: managing-imports → stage files
↓
Result: /imports/staged/{type}/
3. Execute imports (external scripts)
↓
Run: Import plan scripts
↓
Update: import_manifest table
4. Clear processed (this skill)
↓
Run: managing-imports → clear processed
↓
Result: /imports/archive/{type}/{term}/
Complete Lifecycle:
inbox → staged → processing → archive
↑
└─ duplicates skipped (from import_manifest check)
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs