agent data_extraction template risk: high
Folder Secrets Extractor and Notes Organizer
Analyzes all files in a specified folder to extract sensitive data like API keys and credentials into secrets.md with source references. Identifies top topics across files, organiz…
- Policy sensitive
- Human review
- External action: high
PROMPT
Analyze all files in the folder named '${main_folder}` located at `${path_to_folder}`/ and perform the following tasks:
## Task 1: Extract Sensitive Data
Review every file thoroughly and identify all sensitive information including API keys, passwords, tokens, credentials, private keys, secrets, connection strings, and any other confidential data. Create a new file called `secrets.md` containing all discovered sensitive information with clear references to their source files.
## Task 2: Organize by Topic
After completing the secrets extraction, analyze the content of each file again. Many files contain multiple unrelated notes written at different times. Your job is to:
1. Identify the '${topic_max}' most prominent topics across all files based on content frequency and importance
2. Create '${topic_max}' new markdown files, one for each topic, named `${topic:#}.md` where you choose descriptive topic names
3. For each note segment in the original files:
- Copy it to the appropriate topic file
- Add a reference number in the original file next to that note (e.g., `${topic:2}` or `→ Security:2`)
- This reference helps verify the migration later
## Task 3: Archive Original Files
Once all notes from an original file have been copied to their respective topic files and reference numbers added, move that original file into a new folder called `${archive_folder:old}`.
## Expected Final Structure
```
${main_folder}/
├── secrets.md (1 file)
├── ${topic:1}.md (topic files total)
├── ${topic:2}.md
├── ..... (more topic files)
├── ${topic:#}.md
└── ${archive_folder:old}/
└── (all original files)
```
## Important Guidelines
- Be thorough in your analysis—read every file completely
- Maintain the original content when copying to topic files
- Choose topic names that accurately reflect the content clusters you find
- Ensure every note segment gets categorized
- Keep reference numbers clear and consistent
- Only move files to the archive folder after confirming all content has been properly migrated
Begin with `${path_to_folder}` and let me know when you need clarification on any ambiguous content during the organization process.
INPUTS
- main_folder REQUIRED
-
name of the folder containing files to analyze
- path_to_folder REQUIRED
-
base path to the location of the main_folder
- topic_max REQUIRED
-
maximum number of prominent topics to create files for
e.g. 5
- archive_folder
-
name of folder for archiving original files (default 'old')
e.g. old
REQUIRED CONTEXT
- files in folder at path_to_folder/main_folder
ROLES & RULES
- Read every file completely.
- Maintain original content when copying to topic files.
- Choose topic names that accurately reflect content clusters.
- Ensure every note segment gets categorized.
- Keep reference numbers clear and consistent.
- Only move files to archive after confirming migration
EXPECTED OUTPUT
- Format
- markdown
- Schema
- directory_tree · secrets.md, topic files, archive_folder:old
- Constraints
-
- create secrets.md with source references
- create topic markdown files with original content and references
- add reference numbers to original files
- move originals to archive folder
- match expected final structure
SUCCESS CRITERIA
- Extract all sensitive information into secrets.md
- Identify top topics and create corresponding md files
- Copy all note segments to topic files with references
- Archive original files after migration
FAILURE MODES
- Overlooking sensitive data in files
- Mis categorizing notes into wrong topics
- Incomplete copying leading to data loss
- Inconsistent or unclear references
- Archiving before full migration
CAVEATS
- Dependencies
-
- Requires access to folder at ${path_to_folder}/${main_folder}
- Requires value for ${topic_max}
- Requires values for placeholders like ${topic:#} and ${archive_folder:old}
- Missing context
-
- Values for placeholders like 'main_folder', 'path_to_folder', 'topic_max', 'archive_folder'.
- Mechanism for accessing/reading files at 'path_to_folder' (LLMs cannot directly access local files).
- Handling of non-text files or binary files.
- Edge cases for sensitive data detection.
- Ambiguities
-
- What constitutes a 'note segment'?
- Criteria for 'prominent topics based on content frequency and importance' are vague.
- Inconsistent reference formats: '${topic:2}' vs '→ Security:2'.
- Typo in expected structure: '${topic:1}.md (topic files total)'.
QUALITY
- OVERALL
- 0.80
- CLARITY
- 0.80
- SPECIFICITY
- 0.70
- REUSABILITY
- 0.90
- COMPLETENESS
- 0.70
IMPROVEMENT SUGGESTIONS
- Define 'note segment' explicitly, e.g., 'a contiguous block of related content separated by dates or headings'.
- Specify topic selection criteria, e.g., 'use keyword frequency, TF-IDF, or clustering algorithms'.
- Standardize reference format, e.g., '→ [TopicName]:[RefNum]'.
- Correct expected structure to clearly show total topic files, e.g., '[topic1].md, [topic2].md, ..., up to ${topic_max}.md'.
- Add instructions for file access, e.g., 'Assume files are provided as text input or use a tool for reading'.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR AGENT
- ELV PDF Symbol Counter Skillagentdata_extraction
- Comprehensive Codebase Bug Analysis and Fixeragentanalysis
- Xcode MCP Usage Guidelines for Agentsagenttool_use
- Xcode MCP Usage Guidelinesagenttool_use
- Rapid App MVP Prototyperagentcoding
- Local Documentation Online Sync Automatoragentoperations
- HashiCorp Packer Golden Image Expertagentoperations
- Xquik X/Twitter API Integration Skillagenttool_use
- MoltPass Client for AI Agent Identitiesagentsecurity
- AI-First Design Handoff Specs Generatoragentcoding