path-and-io
Skill86 starsChanged 52 days agoMITView on GitHub
Use this when reading from or writing to local files — including constructing file paths with pathlib, creating directories, choosing output locations, and using path utilities from src/analysis_project/paths.py.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analysis-reportingSkill
- causal-inference-diagnosticsSkill
- dataframe-polarsSkill
- notebook-workflowSkill
- plan-analysisSkill
- predictive-modeling-diagnosticsSkill
- prepare-prSkill
- python-project-opsSkill
- python-styleSkill
- review-sqlSkill
- run-edaSkill
- run-modelingSkill
- safe-data-handlingSkill
- simulation-optimization-diagnosticsSkill
- sql-analysisSkill
- statistical-inference-diagnosticsSkill
- statistical-ml-reviewSkill
- summarize-analysisSkill
- sync-agent-docsSkill
- unsupervised-eda-diagnosticsSkill
- update-agent-docsSkill
- visualizationSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when reading from or writing to local files.
- Very specific: line 12
Use pathlib.Path for all file path operations.
- Distinctive: line 14
Prefer paths relative to repository root or configured directories.
- Very specific: line 15
Use the path utilities in src/analysis_project/paths.py.
- Very specific: line 16
Do not: write outputs into raw data directories (data/raw/, data/external/).
- Very specific: line 17
Create parent directories explicitly when writing outputs: path.parent.mkdir(parents=True, exist_ok=True).
- Distinctive: line 18
Use descriptive file names.
- Distinctive: line 20
Avoid overwriting existing outputs unless explicitly requested.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Path and I/O
Use this skill when reading from or writing to local files.
Rules
- Use
pathlib.Pathfor all file path operations. - Do not hard-code absolute local paths.
- Prefer paths relative to repository root or configured directories.
- Use the path utilities in
src/analysis_project/paths.py. - Do not write outputs into raw data directories (
data/raw/,data/external/). - Create parent directories explicitly when writing outputs:
path.parent.mkdir(parents=True, exist_ok=True). - Use descriptive file names.
- Include dates or run identifiers when outputs are time-dependent.
- Avoid overwriting existing outputs unless explicitly requested.
Available Utilities
src/analysis_project/paths.py provides:
get_repo_root()— リポジトリルートのPathdata_dir()—data/ディレクトリのPathoutputs_dir()—outputs/ディレクトリのPathensure_parent_dir(path)— 親ディレクトリを作成してパスを返す
Examples
from analysis_project.paths import data_dir, outputs_dir, ensure_parent_dir
# 入力データの読み込み
input_path = data_dir() / "raw" / "titanic" / "train.csv"
# 出力パスを構成して書き込み
output_path = outputs_dir() / "tables" / "summary_2024q1.csv"
ensure_parent_dir(output_path)
df.write_csv(output_path)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

