来源信息
- 仓库
- brycewang-stanford/Auto-Empirical-Research-Skills
- 最近来源活动
- 2026年7月22日 09:27
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 3,291
- 分支
- 432
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
菜单
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills --skill project-structure命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | project-structure |
| description | Project directory organization and script naming conventions for research |
This document outlines the standardized structure for research project code organization. Use this as a template for organizing future research projects.
Project Root/
├── Code/ # All analysis scripts
│ ├── [Numbered]_[Descriptive].py # Data processing scripts (Python)
│ ├── AN_[Number]_[Descriptive].py # Analysis scripts (Python)
│ ├── AN_[Number]_[Descriptive].do # Analysis scripts (Stata)
│ ├── LogFiles/ # Stata log files
│ └── README.md # Project documentation
├── Data/ # All data files
│ ├── Raw/ # Original, unprocessed data
│ ├── Intermediate/ # Partially processed data
│ └── Clean/ # Final, analysis-ready datasets
└── Results/ # Analysis outputs
├── Tables/ # Regression tables, summary stats
└── Figures/ # Plots, charts, visualizations
Format: [Number]_[DescriptiveName].py
Examples:
0_ExtractCreditAgreements.py1a_CleanCompAnnualCRSP.py1b_ProcessDealscanCompustat.py2_MergeAgreementsCompCRSP.py3a_ExtractLoanOfficerNames.py4a1_ExtractLoanTerms.py4b_CleanLoanOfficerPanel.pyNumbering Logic:
Python Analysis Scripts:
AN_[Number]_[DescriptiveName].pyAN_1a_DescribeSample.pyAN_1b_DescribeSample_NoLinkedin.pyAN_1c_DescribeSample_Dealscan_Aggregated.pyStata Analysis Scripts:
AN_[Number]_[DescriptiveName].doAN_2a_MainRegressions_ChatGPT.doAN_2b_MainRegressions_ChatGPT_NoLinkedin.doAN_2c_MainRegressions_Dealscan_NoLinkedin.doAN_2d_MainRegressions_Dealscan_NoLinkedin_Aggregated.doAN_2e_MainRegressions_Dealscan_Secured.doAN_2f_MainRegressions_Dealscan_Covenants.doAnalysis Numbering Logic:
Standard Structure:
"""
[Script Name]
[Brief Description]
[Detailed description of what the script does]
"""
import pandas as pd
import numpy as np
from pathlib import Path
# Other imports as needed
def get_project_root():
"""Automatically detect the project root directory."""
return Path(__file__).parent.absolute()
def [main_function]():
"""Main processing function."""
# Script logic here
pass
if __name__ == "__main__":
[main_function]()
Key Features:
get_project_root() function for path managementStandard Structure:
/***********
Globals for Paths
***********/
*** Change repodir and overleafdir paths for different users
global repodir "/path/to/project/root"
global datadir "$repodir/Data"
global rawdir "$datadir/Raw"
global cleandir "$datadir/Clean"
global tabdir "$repodir/Results/Tables"
global figdir "$repodir/Results/Figures"
global logdir "$repodir/Code/LogFiles"
* Start logging
log using "$logdir/[ScriptName].log", replace
/***********
[Analysis Section]
***********/
* Analysis code here
* Close log file
log close
Key Features:
Standard Structure:
"""
[Script Name]
[Brief Description]
This script [detailed description] based on the analysis
in [corresponding Stata do file]
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from pathlib import Path
def get_project_root():
"""Automatically detect the project root directory."""
return Path(__file__).parent.absolute()
def load_data():
"""Load the cleaned data."""
# Data loading logic
pass
def [analysis_function]():
"""Perform specific analysis."""
# Analysis logic
pass
def main():
"""Main analysis function."""
# Orchestrate all analyses
pass
if __name__ == "__main__":
main()
loan_officer_final_panel_chatgpt_cleaned.csvdealscan_merged_tranche_level.csvcomp_crspa_merged.csvRaw Data → Intermediate Processing → Clean Data → Analysis
(Scripts 0-4) (Scripts AN_1-AN_4)
Use descriptive suffixes for different versions:
_ChatGPT.py (uses ChatGPT-extracted data)_NoLinkedin.py (excludes LinkedIn variables)_Dealscan.py (uses Dealscan data)_Aggregated.py (uses aggregated data)get_project_root() for Python scriptsFor a new research project, create this structure:
NewProject/
├── Code/
│ ├── 0_ExtractRawData.py
│ ├── 1a_CleanDatasetA.py
│ ├── 1b_CleanDatasetB.py
│ ├── 2_MergeDatasets.py
│ ├── 3_ExtractFeatures.py
│ ├── 4_PrepareAnalysisData.py
│ ├── AN_1a_DescribeSample.py
│ ├── AN_2a_MainRegressions.do
│ ├── AN_2b_RobustnessTests.do
│ ├── LogFiles/
│ └── README.md
├── Data/
│ ├── Raw/
│ ├── Intermediate/
│ └── Clean/
└── Results/
├── Tables/
└── Figures/
This structure ensures: