feat: 重组为标准 skill 包结构 + 修复 verify.sh bash 3.2 兼容

- 新增 .claude/skills/new-project/SKILL.md(标准 skill 格式)
- install-skill.sh 安装时组装 SKILL.md + verify.sh,单一源无重复
- verify.sh 改用索引数组替代 declare -A,兼容 macOS bash 3.2
- log_pass/log_skip 显式 return 0,避免 set -e 下非 verbose 误退出
- README 改为 skill 优先;补全 copier.yml/scripts/template 入库
This commit is contained in:
baozaotumao
2026-06-01 21:19:45 -07:00
parent 167fa10dde
commit 39fe248f9f
53 changed files with 3744 additions and 55 deletions
+60
View File
@@ -0,0 +1,60 @@
[project]
name = "{{ project_slug }}-backend"
version = "0.1.0"
description = "{{ description }} — backend service"
requires-python = ">={{ python_version }}"
dependencies = [
"fastapi",
"uvicorn[standard]",
"sqlalchemy[asyncio]",
{%- if database == 'sqlite' %}
"aiosqlite",
"alembic",
{%- elif database == 'postgresql' %}
"asyncpg",
"alembic",
{%- endif %}
"loguru",
"pydantic-settings",
"websockets",
]
[dependency-groups]
dev = [
"pytest",
"httpx",
"pytest-asyncio",
"pytest-cov",
"mypy",
"ruff",
"pip-audit",
]
[tool.ruff.lint]
select = ["E", "F", "N", "T20", "I", "C901", "ANN", "S", "PLR"]
ignore = ["ANN101", "ANN102"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["ANN"]
[tool.mypy]
strict = true
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "--cov=src --cov-report=term-missing --cov-fail-under=80"
asyncio_mode = "auto"
[tool.importlinter]
root_packages = ["src"]
[[tool.importlinter.contracts]]
name = "Layered architecture"
type = "layers"
layers = ["src.infrastructure", "src.application", "src.domain"]
[[tool.importlinter.contracts]]
name = "Domain zero IO"
type = "forbidden"
source_modules = ["src.domain"]
forbidden_modules = ["fastapi", "sqlalchemy", "httpx", "subprocess"]