Source: https://github.com/aipoch/medical-research-skills
File Security Toolkit
When to Use
- Use this skill when you need encrypt/decrypt local files, redact sensitive information in documents, and validate password strength when handling private data or preparing files for sharing in a reproducible workflow.
- Use this skill when a others task needs a packaged method instead of ad-hoc freeform output.
- Use this skill when the user expects a concrete deliverable, validation step, or file-based result.
- Use this skill when
scripts/file_security.py is the most direct path to complete the request.
- Use this skill when you need the
file-security-toolkit package behavior rather than a generic answer.
Key Features
- Scope-focused workflow aligned to: Encrypt/decrypt local files, redact sensitive information in documents, and validate password strength when handling private data or preparing files for sharing.
- Packaged executable path(s):
scripts/file_security.py.
- Structured execution path designed to keep outputs consistent and reviewable.
Dependencies
Python: 3.10+. Repository baseline for current packaged skills.
Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.
Example Usage
cd "20260316/scientific-skills/Others/file-security-toolkit"
python -m py_compile scripts/file_security.py
python scripts/file_security.py --help
Example run plan:
- Confirm the user input, output path, and any required config values.
- Edit the in-file
CONFIG block or documented parameters if the script uses fixed settings.
- Run
python scripts/file_security.py with the validated inputs.
- Review the generated output and return the final artifact with any assumptions called out.
Implementation Details
- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.
- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.
- Primary implementation surface:
scripts/file_security.py.
- Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.
- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.
1. When to Use
Use this skill when you need to:
- Encrypt and archive a folder (or multiple files) into a password-protected ZIP (AES-256) before sharing or storing.
- Encrypt a single file with a password (without creating a ZIP archive).
- Redact sensitive information (e.g., emails, phone numbers, IDs) from documents before distribution.
- Validate whether a password meets basic strength requirements before using it for encryption.
2. Key Features
- ZIP AES-256 encryption/decryption for files and folders (
zip-encrypt, zip-decrypt).
- Single-file password encryption/decryption (
file-encrypt, file-decrypt).
- Privacy redaction for common document formats (
redact):
- Supported:
txt, md, csv, docx, pptx
- Detects and removes/masks: email addresses, phone numbers, ID numbers, and name/address keywords.
- Password strength checking (
check-password) based on simple composition rules.
- Local-only processing: operates on user-specified paths; no network access.
3. Dependencies
Install dependencies with:
python -m pip install pyzipper cryptography python-docx python-pptx pillow
Python version is not specified in the source document. Ensure your environment supports the listed packages.
4. Example Usage
Entry point script:
python scripts/file_security.py --help
Check password strength
python scripts/file_security.py check-password --password "Abcdefg1"
Encrypt / decrypt a single file
python scripts/file_security.py file-encrypt \
--input sample.txt \
--output sample.txt.enc \
--password "Abcdefg1"
python scripts/file_security.py file-decrypt \
--input sample.txt.enc \
--output sample_out.txt \
--password "Abcdefg1"
Encrypt / decrypt a folder or files as ZIP (AES-256)
python scripts/file_security.py zip-encrypt \
--input ./my_folder \
--output ./my_folder.zip \
--password "Abcdefg1"
python scripts/file_security.py zip-decrypt \
--input ./my_folder.zip \
--output ./my_folder_out \
--password "Abcdefg1"
Redact sensitive information in documents
python scripts/file_security.py redact \
--input ./docs/input.docx \
--output ./docs/input.redacted.docx
5. Implementation Details
Commands and behavior
zip-encrypt / zip-decrypt
- Creates or extracts a ZIP archive using AES-256 encryption.
- Intended for encrypting multiple files or folders as a single archive.
file-encrypt / file-decrypt
- Encrypts/decrypts the contents of one file using a user-provided password.
- Output is written to the specified path; the original file is not modified unless you overwrite it.
redact
- Processes supported file types:
txt, md, csv, docx, pptx.
- Applies redaction rules targeting:
- Email addresses
- Phone numbers
- ID numbers
- Name/address keywords
- Produces a redacted output file at the specified location.
check-password
- Validates password strength using basic rules:
- Length >= 8
- Contains uppercase letters
- Contains lowercase letters
- Contains numbers
Security constraints (operational)
- No network access: the script only processes local files.
- Path-scoped I/O: reads only from user-provided input paths and writes only to user-provided output paths.
- No sensitive logging: avoids printing raw document content to logs.
- No credential retention: does not store passwords/keys.
1---2name: file-security-toolkit3description: Encrypt/decrypt local files, redact sensitive information in documents, and validate password strength when handling private data or preparing files for sharing.4license: MIT5---6> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
7# File Security Toolkit
8
9## When to Use
10
11- Use this skill when you need encrypt/decrypt local files, redact sensitive information in documents, and validate password strength when handling private data or preparing files for sharing in a reproducible workflow.
12- Use this skill when a others task needs a packaged method instead of ad-hoc freeform output.
13- Use this skill when the user expects a concrete deliverable, validation step, or file-based result.
14- Use this skill when `scripts/file_security.py` is the most direct path to complete the request.
15- Use this skill when you need the `file-security-toolkit` package behavior rather than a generic answer.
16
17## Key Features
18
19- Scope-focused workflow aligned to: Encrypt/decrypt local files, redact sensitive information in documents, and validate password strength when handling private data or preparing files for sharing.
20- Packaged executable path(s): `scripts/file_security.py`.
21- Structured execution path designed to keep outputs consistent and reviewable.
22
23## Dependencies
24
25- `Python`: `3.10+`. Repository baseline for current packaged skills.
26- `Third-party packages`: `not explicitly version-pinned in this skill package`. Add pinned versions if this skill needs stricter environment control.
27
28## Example Usage
29
30```bash
31cd "20260316/scientific-skills/Others/file-security-toolkit"
32python -m py_compile scripts/file_security.py
33python scripts/file_security.py --help
34```
35
36Example run plan:
371. Confirm the user input, output path, and any required config values.
382. Edit the in-file `CONFIG` block or documented parameters if the script uses fixed settings.
393. Run `python scripts/file_security.py` with the validated inputs.
404. Review the generated output and return the final artifact with any assumptions called out.
41
42## Implementation Details
43
44- Execution model: validate the request, choose the packaged workflow, and produce a bounded deliverable.
45- Input controls: confirm the source files, scope limits, output format, and acceptance criteria before running any script.
46- Primary implementation surface: `scripts/file_security.py`.
47- Parameters to clarify first: input path, output path, scope filters, thresholds, and any domain-specific constraints.
48- Output discipline: keep results reproducible, identify assumptions explicitly, and avoid undocumented side effects.
49
50## 1. When to Use
51Use this skill when you need to:
52
53- Encrypt and archive a folder (or multiple files) into a password-protected ZIP (AES-256) before sharing or storing.
54- Encrypt a single file with a password (without creating a ZIP archive).
55- Redact sensitive information (e.g., emails, phone numbers, IDs) from documents before distribution.
56- Validate whether a password meets basic strength requirements before using it for encryption.
57
58## 2. Key Features
59- **ZIP AES-256 encryption/decryption** for files and folders (`zip-encrypt`, `zip-decrypt`).
60- **Single-file password encryption/decryption** (`file-encrypt`, `file-decrypt`).
61- **Privacy redaction** for common document formats (`redact`):
62 - Supported: `txt`, `md`, `csv`, `docx`, `pptx`
63 - Detects and removes/masks: email addresses, phone numbers, ID numbers, and name/address keywords.
64- **Password strength checking** (`check-password`) based on simple composition rules.
65- **Local-only processing**: operates on user-specified paths; no network access.
66
67## 3. Dependencies
68Install dependencies with:
69
70```bash
71python -m pip install pyzipper cryptography python-docx python-pptx pillow
72```
73
74> Python version is not specified in the source document. Ensure your environment supports the listed packages.
75
76## 4. Example Usage
77Entry point script:
78
79```bash
80python scripts/file_security.py --help
81```
82
83### Check password strength
84```bash
85python scripts/file_security.py check-password --password "Abcdefg1"
86```
87
88### Encrypt / decrypt a single file
89```bash
90python scripts/file_security.py file-encrypt \
91 --input sample.txt \
92 --output sample.txt.enc \
93 --password "Abcdefg1"
94
95python scripts/file_security.py file-decrypt \
96 --input sample.txt.enc \
97 --output sample_out.txt \
98 --password "Abcdefg1"
99```
100
101### Encrypt / decrypt a folder or files as ZIP (AES-256)
102```bash
103python scripts/file_security.py zip-encrypt \
104 --input ./my_folder \
105 --output ./my_folder.zip \
106 --password "Abcdefg1"
107
108python scripts/file_security.py zip-decrypt \
109 --input ./my_folder.zip \
110 --output ./my_folder_out \
111 --password "Abcdefg1"
112```
113
114### Redact sensitive information in documents
115```bash
116python scripts/file_security.py redact \
117 --input ./docs/input.docx \
118 --output ./docs/input.redacted.docx
119```
120
121## 5. Implementation Details
122
123### Commands and behavior
124- **`zip-encrypt` / `zip-decrypt`**
125 - Creates or extracts a ZIP archive using **AES-256** encryption.
126 - Intended for encrypting **multiple files or folders** as a single archive.
127- **`file-encrypt` / `file-decrypt`**
128 - Encrypts/decrypts the contents of **one file** using a user-provided password.
129 - Output is written to the specified path; the original file is not modified unless you overwrite it.
130- **`redact`**
131 - Processes supported file types: `txt`, `md`, `csv`, `docx`, `pptx`.
132 - Applies redaction rules targeting:
133 - Email addresses
134 - Phone numbers
135 - ID numbers
136 - Name/address keywords
137 - Produces a redacted output file at the specified location.
138- **`check-password`**
139 - Validates password strength using basic rules:
140 - Length **>= 8**
141 - Contains **uppercase** letters
142 - Contains **lowercase** letters
143 - Contains **numbers**
144
145### Security constraints (operational)
146- **No network access**: the script only processes local files.
147- **Path-scoped I/O**: reads only from user-provided input paths and writes only to user-provided output paths.
148- **No sensitive logging**: avoids printing raw document content to logs.
149- **No credential retention**: does not store passwords/keys.