docs/ai-context/archive/cursor-skills/dpla-script-workflow/SKILL.md
Follow the project workflow when adding or modifying shell or Python scripts. Use when the user asks to add a script, create a new script, modify a script, or write a script for a task. Ensures POSIX bash, common.sh, documentation in SCRIPTS.md, and tests are created or updated and run.
npx skillsauth add dpla/ingestion3 dpla-script-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When adding or modifying scripts in this repo, follow the project's conventions so scripts are documented, portable, and tested.
Environment: When running the test suite or any script that depends on project env, run source .env from repo root first.
./venv/ (e.g. ./venv/bin/python or source ./venv/bin/activate). Never assume system Python.--profile dpla for any AWS commands.sed -i, readlink -f). Use helpers from scripts/common.sh: sed_i, get_script_dir, get_common_dir, log_info, die, etc.scripts/common.sh if bash (source it, use its helpers).scripts/tests/test-scripts.sh (or under scripts/tests/ as appropriate)../scripts/tests/test-scripts.sh (or --quick for syntax) before committing../scripts/tests/test-scripts.sh before committing.| Resource | Path | |----------|------| | Script docs | scripts/SCRIPTS.md | | Updating docs | SCRIPTS.md section "Updating This Documentation" | | Shared helpers | scripts/common.sh | | Test suite | scripts/tests/test-scripts.sh |
# Run full script test suite
./scripts/tests/test-scripts.sh
# Quick syntax / lightweight checks
./scripts/tests/test-scripts.sh --quick
# Verbose test output
./scripts/tests/test-scripts.sh --verbose
scripts/ with shebang #!/usr/bin/env bash, set -euo pipefail, and source "$(get_script_dir)/common.sh" (or equivalent via get_common_dir).sed_i, get_script_dir, log_info, die instead of raw sed -i or readlink -f.scripts/tests/test-scripts.sh (e.g. syntax check, help output, or sourcing common.sh)../scripts/tests/test-scripts.sh and fix any failures.data-ai
Show key i3.conf config for a hub (provider, harvest.type, harvest.endpoint, schedule, email, setlist). Use when user asks for hub config, harvest type/endpoint, who gets emails, schedule months, or OAI setlist details.
development
Run Community Webs ingest. Use when the user says harvest community-webs, run community-webs ingest, export community webs, or process community webs DB.
testing
Verify ingest outcomes and send failure or status notifications to Slack or [email protected]. Use when the user asks to verify the ingest, check if it succeeded, notify about a failure, or post to tech-alerts.
business
Report which hubs have new JSONL staged in S3 for a given month, and optionally post the report to Slack. Use when user asks what hubs are staged/ready for indexing, /ingest staged, or what changed this month in S3.