agentleFS
atsushi-greenatsushi-green/ds-ai-coding-skills/.claude/skills/safe-data-handling/SKILL.md

safe-data-handling

Skill86 starsChanged 52 days agoMITView on GitHub

Use this when reading, writing, moving, copying, modifying, deleting, or generating data files — including any operation that touches data/raw, data/external, data/interim, data/processed, or outputs directories.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill before reading, writing, moving, modifying, deleting, or generating data files.

    line 8
  2. Distinctive:

    Never: commit raw data, credentials, API keys, tokens, or customer-level records.

    line 12
  3. Very specific:

    Treat data/raw/ and data/external/ as immutable.

    line 14
  4. Very specific:

    Write derived data to data/interim/, data/processed/, or outputs/.

    line 15
  5. Very specific:

    Before writing output, confirm the target path is not under data/raw/ or data/external/.

    line 16
  6. Distinctive:

    Do not include personally identifiable information (PII) or customer-level records in committed files.

    line 37
  7. Very specific:

    If analysis requires customer-level data, keep it in data/raw/ (gitignored) and never commit.

    line 38
  8. Distinctive:

    When in doubt, ask before writing customer-level data to any path.

    line 40
  9. Distinctive:

    Do not hard-code API keys, tokens, or passwords in code or notebook outputs.

    line 46

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Safe Data Handling

Use this skill before reading, writing, moving, modifying, deleting, or generating data files.

Hard Rules

  • Never commit raw data, credentials, API keys, tokens, or customer-level records.
  • Never directly modify, overwrite, delete, or regenerate raw data.
  • Treat data/raw/ and data/external/ as immutable.
  • Write derived data to data/interim/, data/processed/, or outputs/.
  • Before writing output, confirm the target path is not under data/raw/ or data/external/.

Recommended Workflow

  1. Identify whether input data is raw, external, interim, processed, or output.
  2. Read raw/external data as immutable input — never modify the source.
  3. Write generated artifacts to a separate output path (data/interim/, data/processed/, or outputs/).
  4. Summarize files read and written at the end of the operation.

Directory Roles

DirectoryRoleMutable?
data/raw/Original source dataNo
data/external/Third-party reference dataNo
data/interim/Intermediate transformsYes
data/processed/Final cleaned/derived dataYes
outputs/Figures, tables, reportsYes

PII and Customer-Level Records

  • Do not include personally identifiable information (PII) or customer-level records in committed files.
  • If analysis requires customer-level data, keep it in data/raw/ (gitignored) and never commit.
  • Aggregated or anonymized outputs are acceptable for data/processed/ or outputs/.
  • When in doubt, ask before writing customer-level data to any path.
  • Analysis outputs must not allow individuals to be re-identified.

Credentials and Secrets

  • .env is gitignored. .env.example lists key names only — never real values.
  • Do not hard-code API keys, tokens, or passwords in code or notebook outputs.
  • Load secrets from environment variables with python-dotenv.

Verification

data/raw/ and data/external/ are gitignored, and CI enforces the rules above:

uv run python scripts/check_no_raw_data_commit.py    # rawデータのコミットを検知
uv run python scripts/check_no_sensitive_patterns.py # 秘密情報のパターンを検知

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.