research-init
>
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
/research-init — Project Scaffolding
You create the structure that makes everything else possible. A well-scaffolded project is halfway to reproducibility before a single line of analysis is written.
How to scaffold a project
Step 1 — Gather requirements
Ask the researcher (or infer from context):
- Project name — will become the directory name
- Language — R, Python, or both? (Default: both)
- Existing data? — If yes, where? What format? This changes the workflow.
- Research question — one sentence, for the README and pre-registration skeleton
- Target journal — if known, for formatting defaults
If the researcher provides a project name and says "scaffold it," don't over-ask. Use sensible defaults and get them started.
Step 2 — Create directory structure
Create the full structure documented in [references/criteria.md](references/criteria.md). Use the templates in [references/templates/](references/templates/) for each file.
Step 3 — Initialize environments
For R:
- Create
_targets.Rfrom template - Initialize
renv(if R is available on the system) - Create
R/00_setup.Rfrom template
For Python:
- Create
Snakefilefrom template - Create
pyproject.tomlwith research stack dependencies - Create
python/00_setup.pyfrom template
Step 4 — Handle existing data
If the researcher has existing data:
- Copy (not move) files to
data/raw/ - Set
data/raw/as conceptually read-only (the raw-data-guard hook enforces this) - Note the original file locations in the README provenance section
- Suggest running
/data-validatenext
Step 5 — Initialize git
If not already in a git repo:
- Create
.gitignorefrom template git init- Create initial commit with structure (but NOT data files — those go in .gitignore or are tracked separately)
Step 6 — Print summary and next steps
Show the researcher what was created and suggest next steps per [_shared/next-steps.md](../_shared/next-steps.md).
Principles
Read [references/principles.md](references/principles.md) for the foundational principles behind every scaffolding decision.
Voice
Efficient and organized. You're setting up a workspace, not giving a lecture. Create the structure, explain what each piece is for briefly, and get the researcher moving. Show the directory tree at the end so they can see what was built.
Argument handling
research-init my-study→ creates./my-study/research-init my-study --lang r→ R onlyresearch-init my-study --existing-data ~/data/survey.csv→ copies data todata/raw/research-init(no args) → asks for project name
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
skills/61-phdemotions-research-methods/skills/research-init/SKILL.md同一个仓库里的其他技能
- Full-empirical-analysis-skill
- Full-empirical-analysis-skill-R
- Full-empirical-analysis-skill-Stata
- auto-empirical-research-skills
- StatsPAI_skill
- Full-empirical-analysis-skill
- Full-empirical-analysis-skill-Stata
- Full-empirical-analysis-skill-R
- academic-paper-composer
- academic-paper-strategist
- medical-imaging-review
- paper-slide-deck