Skip to content

Conversation

@edenreich
Copy link
Contributor

Add new write_to_csv skill that enables the agent to export extracted data to CSV files, completing data collection workflows.

Features

  • Write structured data to CSV files with custom headers
  • Support for both creating new files and appending to existing ones
  • Proper error handling for file operations and data validation
  • Integration with existing extract_data skill for end-to-end workflows
  • Comprehensive test suite with 15+ test cases

Example Workflow

  1. navigate_to_url → Navigate to target website
  2. extract_data → Collect pricing/product data
  3. write_to_csv → Export data to structured file

Resolves #24

Generated with Claude Code

claude bot and others added 2 commits September 20, 2025 16:35
- Add write_to_csv skill definition to agent.yaml with comprehensive schema
- Implement CSV writing functionality with support for:
  - Custom headers and file paths
  - Append mode for existing files
  - Data validation and error handling
  - Directory auto-creation
- Register skill in main.go for A2A server integration
- Add comprehensive test suite with 15+ test cases
- Include integration demo documentation
- Enables end-to-end workflows: navigate → extract_data → write_to_csv

Resolves #24

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
@edenreich
Copy link
Contributor Author

@claude Prepare this pull request for a review - remove all inline comments (above variables declarations, for loops - whatever that is inside of a function or method body) and ensure new lines at the end of the files you've changed.

I already see that file_path should be removed from the skill and should be configurable via environment variables defaulting to /tmp/playwright (please also adjust screenshots to the same default path for consistency).

@claude
Copy link
Contributor

claude bot commented Sep 24, 2025

Claude finished @edenreich's task —— View job


Preparing PR for Review ✅

Working on preparing this PR for review as requested:

  • Analyze current implementation and changed files
  • Remove inline comments from function/method bodies
  • Add data files directory configuration to config.go
  • Update write_to_csv skill to use environment variable for file paths
  • Update agent.yaml to remove file_path from write_to_csv schema
  • Update screenshot configuration to use consistent /tmp/playwright default
  • Update write_to_csv tests to work with new signature
  • Ensure newlines at end of all changed files
  • Run linting and tests if available
  • Commit changes to PR branch

✅ Changes Completed Successfully

Refactored file path configuration:

  • Removed file_path parameter from write_to_csv skill schema
  • Added BROWSER_DATA_FILES_DIR environment variable with default /tmp/playwright
  • Updated screenshot directory to use consistent /tmp/playwright default for uniformity
  • Changed skill to accept filename parameter instead of full file path
  • Files are now automatically saved to configured data directory

Code cleanup:

  • Removed all inline comments from function/method bodies as requested
  • Ensured proper newlines at end of all files
  • Updated tests to work with new signature
  • All tests passing ✅
  • Linting clean ✅

Commit: da25618

The PR is now ready for review with the requested changes implemented.

- Remove file_path parameter from write_to_csv skill schema
- Add BROWSER_DATA_FILES_DIR environment variable (default: /tmp/playwright)
- Update screenshot directory to use consistent /tmp/playwright default
- Change skill to accept filename parameter instead of full file path
- Files are automatically saved to configured data directory
- Remove inline comments from function bodies
- Update tests to work with new signature
- All tests passing, lint clean

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
claude bot and others added 5 commits September 24, 2025 00:57
- Replace separate data_files_dir and screenshots_dir with single data_dir
- Update agent.yaml to use single data_dir: "/tmp/playwright" 
- Update config.go to use DataDir field instead of separate fields
- Update write_to_csv and take_screenshot skills to use combined directory
- Update all test files to use new configuration structure
- All tests passing and linting clean

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…gent URL configuration

Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ions

Signed-off-by: Eden Reich <eden.reich@gmail.com>
… configuration

Signed-off-by: Eden Reich <eden.reich@gmail.com>
@edenreich edenreich merged commit 5b7509f into main Sep 24, 2025
1 of 2 checks passed
@edenreich edenreich deleted the claude/issue-24-20250920-1630 branch September 24, 2025 03:19
ig-semantic-release-bot bot pushed a commit that referenced this pull request Sep 26, 2025
## [0.2.0](v0.1.3...v0.2.0) (2025-09-26)

### ✨ Features

* **skills:** Add write_to_csv skill for data export workflows ([#25](#25)) ([5b7509f](5b7509f)), closes [#24](#24)

### ♻️ Improvements

* Update agent metadata to use agent-card.json and increment ADL CLI version to 0.21.6 ([#33](#33)) ([7d91dde](7d91dde))
@ig-semantic-release-bot
Copy link

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add CSV export skill for data collection workflows

2 participants