一键导入
scaffold-config
Scaffolds the canonical src/config/ layer — Settings, env loader, file I/O utilities, and rotating logger. One command, zero boilerplate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffolds the canonical src/config/ layer — Settings, env loader, file I/O utilities, and rotating logger. One command, zero boilerplate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffolds battle-tested helper modules — exception hierarchy, retry logic, date utilities, port management, FastAPI middleware, and async database layer.
Bootstraps a complete Python project skeleton — directories, config layer, helpers, rules, and a FastAPI-ready main.py. One command, zero boilerplate.
Scaffolds a complete Next.js frontend (web/) or React Chrome Extension (extension/) with 11 built-in themes, layout components, and FastAPI API client integrations.
Ensure every project remains compliant with these standards, use the built-in `linter` tool. It scans codebase for violations of the architecture rules using AST parsing.
this is human-skills dispatcher
Generate G2 v5 chart code. Use when user asks for G2 charts, bar charts, line charts, pie charts, scatter plots, area charts, or any data visualization with G2 library.
| name | scaffold-config |
| description | Scaffolds the canonical src/config/ layer — Settings, env loader, file I/O utilities, and rotating logger. One command, zero boilerplate. |
"One command. Zero boilerplate."
Scaffolds the canonical src/config/ layer into any Python project. This layer is the Single Source of Truth for all configuration — settings, environment variables, file operations, and logging.
human-skills '{
"tool_name": "setconfig",
"tool_args": {
"destination": "/path/to/your_project/src/config"
}
}'
human-skills '{
"tool_name": "setconfig",
"tool_args": {
"destination": "/path/to/your_project/src/config",
"override": "true"
}
}'
config/
├── __init__.py ← Auto-loads dotenv, exports EVERYTHING
├── paths.py ← PROJECT_ROOT auto-detection
├── files.py ← read/write/json/delete utilities
├── dotenv.py ← load/set/get/remove .env values
├── settings.py ← Settings class and instance
└── logger.py ← Unified Rotating Logger setup
flowchart TB
ENV[".env"] -. data .-> DOTENV
subgraph CONFIG["config/"]
PATHS["paths.py\nauto-detects PROJECT_ROOT"]
DOTENV["dotenv.py\nload · set · get · remove"]
FILES["files.py\nread · write · json · delete"]
SETTINGS["settings.py\nSettings class & instance"]
CINIT["__init__.py\nsingle export point"]
PATHS --> DOTENV
PATHS --> FILES
PATHS --> SETTINGS
FILES --> SETTINGS
DOTENV --> SETTINGS
SETTINGS --> CINIT
end
CINIT --> REST["rest of the project\nschema · helpers · core · providers · services"]
config/ is always copied whole into every project — never modifiedsrc/config/settings.py — not the templatepaths.py auto-detects PROJECT_ROOT via marker files — no hardcodingdotenv.py uses os.environ.setdefault — never overwrites already-set varsSettings are resolved relative to PROJECT_ROOT| Need | Function | Import |
|---|---|---|
| Check existence | exists(rel) | from src.config import exists |
| Read file as str | read_text(rel) | from src.config import read_text |
| Read file as dict | read_json(rel) | from src.config import read_json |
| Write str to file | write_text(rel, content) | from src.config import write_text |
| Write dict to file | write_json(rel, data) | from src.config import write_json |
| Create directories | ensure_dir(rel) | from src.config import ensure_dir |
| Delete file or dir | delete(rel) | from src.config import delete |
| List / glob files | list_files(rel, pattern) | from src.config import list_files |
| Absolute path str | get_abs_path(rel) | from src.config import get_abs_path |
| Setup logger | setup_logger(path, name) | from src.config import setup_logger |
| Access settings | Settings.FIELD | from src.config import Settings |
After scaffolding: add project-specific fields to
settings.pyand fill.envfrom.env.example.
See .agents/rules/config-path-rules.md and .agents/rules/config-usage-rules.md for strict usage patterns. from pathlib import Path is FORBIDDEN outside config/.