/carl-tools:django-smoke-alarmfrom carl-tools
Runs and triages Django/DRF security smoke checks, classifying scanner findings as REAL, HYGIENE, or FALSE POSITIVE before shipping or after scanner results.
Ships in carl-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this when a Django or DRF project needs a fast security/reliability sweep, especially after a tool such as djangoSecurityHunter, Bandit, Semgrep, or a custom grep pass reports many findings.
Third-order stance: the goal is not “make the scanner green.” The goal is to find the few boring Django foot-guns that become production incidents, while teaching the project a repeatable preflight. Smoke alarms should be loud, cheap, and easy to silence only with evidence.
Always classify scanner output before fixing:
Do not create a giant undifferentiated fix list. The dragon is usually three lizards in a trench coat.
Never judge raw scanner counts from a working repo if it contains worktrees or generated/vendor folders.
Exclude at minimum:
.git .hg .svn .venv venv node_modules dist build .tox .eggs
.mypy_cache .pytest_cache htmlcov coverage
.worktrees .claude/worktrees
.env .env.*
If using djangoSecurityHunter, prefer a clean temp copy and scan-only env values:
# run from the project root; script path is relative to this skill's directory
python3 <path-to-this-skill>/scripts/django_smoke_alarm.py \
--project . \
--settings myproject.settings \
--project-python .venv/bin/python \
--scanner-source /tmp/djangoSecurityHunter/src \
--env SECRET_KEY=dummy-scan-only-not-production-40-plus-chars \
--env DEBUG=False \
--env ALLOWED_HOSTS=localhost,127.0.0.1 \
--env DATABASE_URL=sqlite:////tmp/django-smoke.sqlite3
The SECRET_KEY above is a placeholder for scan-only use; never put a real secret in scan env values. If the scanner cannot import settings, keep static findings but explicitly say which settings-backed checks were skipped.
Group findings by risk surface:
DEBUG, SECRET_KEY, ALLOWED_HOSTS, HTTPS redirect, HSTS, secure cookies, CSRF trusted origins, CORS.mark_safe, |safe, XML/Markdown renderers, admin previews, template tags, rich text blocks.exists/get + create, multi-save workflows, save() in loops, arithmetic updates without F(), missing uniqueness/idempotency..env* accidentally tracked.For each noisy rule, inspect representative code before deciding.
Classify as REAL if untrusted or external content is inserted into safe HTML without escaping:
Classify as HYGIENE if the string is constant or all interpolated variables are escaped, but the code would be safer with format_html() / format_html_join().
Classify as FALSE POSITIVE only when the full data path is safe and future edits are unlikely to reintroduce unsafe interpolation.
Do not blindly wrap long-running workflows in transaction.atomic(). Multi-save progress markers around external API calls, Celery jobs, or imports may be intentional.
Prefer:
get_or_create() / update_or_create() where appropriate.select_for_update() for concurrent mutation of existing rows.F() expressions for arithmetic updates.Report a compact table:
| Finding | Classification | Evidence | Recommended move |
|---|---|---|---|
| Missing HSTS | REAL | settings.py has no SECURE_HSTS_SECONDS under DEBUG=False | Add production security block or env-controlled settings |
Admin mark_safe preview | HYGIENE | URL is escaped, constant HTML otherwise | Convert to format_html |
| AI pipeline multiple saves | FALSE POSITIVE/HYGIENE | Saves status before/after long external calls | Do not wrap whole function; maybe add comment/tests |
Then list only the top 3-7 REAL fixes. Put hygiene work behind those. Cite file:line for every row, and stop after the table; apply fixes only if the user asks.
If the same issue could recur, add a project-local guardrail:
settings.py production security block and test.mark_safe with interpolation; use format_html.”scripts/django_smoke_alarm.py creates a clean temp copy, runs djangoSecurityHunter if available, writes JSON, and prints a grouped summary. It is intentionally a wrapper, not the source of truth: the agent still must read code and classify findings.
Useful flags:
--project — Django repo root.--settings — Django settings module.--project-python — project venv Python, recommended for settings import.--scanner-source — local djangoSecurityHunter/src checkout to add to PYTHONPATH.--env KEY=VALUE — scan-only env overrides.--output-dir — report destination.trust-audit for user-facing permission, privacy, billing, and unsafe-feeling AI/data flows found during the scan.empathy-audit after fixes to catch developer/support burden from noisy scanner-driven changes.release-operator if this creates a CI/release gate.decision-log if choosing to accept a scanner false positive or defer a real risk.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (carlkibler/agent-skills) — no native marketplace selected
npx claudepluginhub p/carlkibler-carl-skills26 skills in this plugin
/agent-log-forensicsAnalyze Claude/Codex logs for behavior patterns, repeated friction, and Toolsmith gaps./changelog-writerDraft plain-language changelog entries from Git history, optionally updating CHANGELOG.md./chezmoi-driftCheck chezmoi dotfiles for drift, unmanaged files, and broken skill links./contacts-unifyMerge and dedupe macOS, iCloud, Google, Zoho, or VCF contacts with reviewable provenance./decision-logRecord a technical or product decision, alternatives, and rationale for future agents./dependency-pinningAudit Docker, CI, and language dependencies for SHA/digest pinning and cooldowns.