Agent skill
csv-url-parser
Parse URLs in CSV files and extract query parameters as new columns. Use when working with CSV files containing URLs that need parameter extraction and analysis.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/csv-url-parser
SKILL.md
CSV URL Parser
This skill extracts query parameters from URLs in CSV files and adds them as new columns.
Instructions
- Identify CSV files: Look for CSV files in the current directory or specified path
- Analyze URL column: Find the column containing URLs (looks for 'url' or 'URL' headers)
- Extract parameters: Parse all query parameters from URLs
- Create new columns: Add parameter names as new column headers
- Process data: Fill new columns with parameter values (multiple values joined with '|')
- Save results: Update the CSV file with new columns
Implementation
The skill uses Ruby to process CSV files. Run the processing script:
ruby scripts/process_csv.rb [file1.csv file2.csv ...]
If no files are specified, it processes all CSV files in the current directory.
The script will:
- Read CSV files with headers
- Extract query parameters from URLs using URI parsing
- Handle multiple values for the same parameter (joined with '|')
- Preserve original data while adding new parameter columns
- Handle malformed URLs gracefully
For detailed examples, see EXAMPLES.md.
Usage Examples
Process all CSV files in current directory:
Parse URLs in my CSV files
Process specific CSV file:
Extract URL parameters from data.csv
Analyze URL parameters:
Show me what parameters are in the URLs from this CSV
Requirements
- Ruby with standard libraries (CSV, URI, CGI)
- CSV files must have headers
- URL column should be named 'url' or 'URL'
Output
- Original CSV file updated with new parameter columns
- Multiple parameter values separated by '|'
- Preserves all original data
- Handles empty/missing parameters gracefully
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?