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