为 Django 项目执行发布前校验流程,涵盖迁移、测试、安全与部署检查。
该技能材料显示其本质是面向 Django 项目的提示型验证清单,未声明需要密钥或远程端点,且有开源与较高社区采用度作为正面证据。整体风险较低,但其内容包含本地命令执行、代码修改、测试/迁移/安全扫描等操作指引,实际使用时仍会触及本地代码与环境,因此相关维度应留意。
材料声明无需密钥/环境变量,未要求用户提供第三方 API token;README 仅检查如 DJANGO_SECRET_KEY 是否已配置,未显示会收集、上传或复用凭证。
未声明任何远程端点,系统检查项也标记为 prompt-only;文档虽提到可运行 pip-audit、safety 等工具,但材料本身未指定数据外发目标或将用户数据发送至不明服务。
README 包含大量本地命令示例,如 manage.py、pytest、ruff --fix、black、isort、bandit、gitleaks 与 migrate;这属于常规开发/验证能力,但会触发本机进程执行,并可能修改代码、数据库或生成报告文件。
其验证流程面向整个 Django 项目目录,涉及读取源码、配置、迁移、测试数据与环境变量状态,并可能写入格式化结果、迁移变更、覆盖率与扫描报告;未见超出声明用途的过度授权迹象。
来源为 GitHub 开源仓库,且社区采用度很高(约 210k stars),这些都是明显的降风险因素;虽许可证未声明、维护状态未知,但基于现有材料未见闭源外发、误导安装或可疑注入等高风险红旗。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "django-verification" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/django-verification/SKILL.md 2. 保存为 ~/.claude/skills/django-verification/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为我的 Django 项目执行发布前校验流程:检查迁移是否完整,运行 lint,执行测试并生成覆盖率报告,扫描常见安全问题,并给出部署就绪性结论和修复建议。
返回一份发布前检查报告,包含各项结果、覆盖率、安全风险、是否可部署及修复建议。
针对这次 Django 代码变更做一轮 PR 前验证:确认模型变更对应迁移文件,检查代码风格,运行相关测试,标出潜在安全隐患,并总结是否适合提交 PR。
输出一份面向 PR 的校验摘要,指出阻塞问题、通过项以及建议补充的修改。
请为 Django 项目设计一套自动化校验流程,要求包含迁移检查、lint、测试覆盖率、安全扫描和部署前检查,并说明每一步失败时应如何处理。
得到一套可落地的 Django CI 校验方案,包含步骤顺序、检查项与失败处理建议。
Run before PRs, after major changes, and pre-deploy to ensure Django application quality and security.
# Verify Python version
python --version # Should match project requirements
# Check virtual environment
which python
pip list --outdated
# Verify environment variables
python -c "import os; import environ; print('DJANGO_SECRET_KEY set' if os.environ.get('DJANGO_SECRET_KEY') else 'MISSING: DJANGO_SECRET_KEY')"
If environment is misconfigured, stop and fix.
# Type checking
mypy . --config-file pyproject.toml
# Linting with ruff
ruff check . --fix
# Formatting with black
black . --check
black . # Auto-fix
# Import sorting
isort . --check-only
isort . # Auto-fix
# Django-specific checks
python manage.py check --deploy
Common issues:
# Check for unapplied migrations
python manage.py showmigrations
# Create missing migrations
python manage.py makemigrations --check
# Dry-run migration application
python manage.py migrate --plan
# Apply migrations (test environment)
python manage.py migrate
# Check for migration conflicts
python manage.py makemigrations --merge # Only if conflicts exist
Report:
# Run all tests with pytest
pytest --cov=apps --cov-report=html --cov-report=term-missing --reuse-db
# Run specific app tests
pytest apps/users/tests/
# Run with markers
pytest -m "not slow" # Skip slow tests
pytest -m integration # Only integration tests
# Coverage report
open htmlcov/index.html
Report:
Coverage targets:
| Component | Target |
|---|---|
| Models | 90%+ |
| Serializers | 85%+ |
| Views | 80%+ |
| Services | 90%+ |
| Overall | 80%+ |
# Dependency vulnerabilities
pip-audit
safety check --full-report
# Django security checks
python manage.py check --deploy
# Bandit security linter
bandit -r . -f json -o bandit-report.json
# Secret scanning (if gitleaks is installed)
gitleaks detect --source . --verbose
# Environment variable check
python -c "from django.core.exceptions import ImproperlyConfigured; from django.conf import settings; settings.DEBUG"
Report:
# Check for model issues
python manage.py check
# Collect static files
python manage.py collectstatic --noinput --clear
# Create superuser (if needed for tests)
echo "from apps.users.models import User; User.objects.create_superuser('[email protected]', 'admin')" | python manage.py shell
# Database integrity
python manage.py check --database default
# Cache verification (if using Redis)
python -c "from django.core.cache import cache; cache.set('test', 'value', 10); print(cache.get('test'))"
# Django Debug Toolbar output (check for N+1 queries)
# Run in dev mode with DEBUG=True and access a page
# Look for duplicate queries in SQL panel
# Query count analysis
django-admin debugsqlshell # If django-debug-sqlshell installed
# Check for missing indexes
python manage.py shell << EOF
…
帮助团队为医疗应用设计符合PHI/PII要求的数据安全与合规方案
通过逐步细化检索上下文,提升子代理任务理解与结果质量。
帮助你设计与优化 Spring Boot 后端架构、接口与服务实现。
基于多源网页检索与综合分析,生成带引用和来源标注的深度研究报告
用于管理 Uncloud 集群,完成部署、入口配置、扩缩容与运维排障。
为 KMP 项目提供 Compose 多平台界面架构、导航、主题与性能实践。
用于 Laravel 项目的环境检查、测试、安全扫描与发布验收
为 Spring Boot 项目执行构建、测试、扫描与变更复核的发布前验证流程
为 Quarkus 项目执行发布前验证闭环,涵盖构建、测试、扫描与差异审查。
用不同模型独立核验产物,发现同源检查遗漏的问题
为 Claude Code 会话提供系统化校验流程,帮助检查结果正确性与质量。
提供可调用的依赖审计核验结论,帮助快速判断项目组件风险。