Initial commit
This commit is contained in:
77
skills/file.compare/README.md
Normal file
77
skills/file.compare/README.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# file.compare
|
||||
|
||||
Compare two files and generate detailed diff reports showing line-by-line differences
|
||||
|
||||
## Overview
|
||||
|
||||
**Purpose:** Compare two files and generate detailed diff reports showing line-by-line differences
|
||||
|
||||
**Command:** `/file/compare`
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
python3 skills/file/compare/file_compare.py
|
||||
```
|
||||
|
||||
### With Arguments
|
||||
|
||||
```bash
|
||||
python3 skills/file/compare/file_compare.py \
|
||||
--file_path_1 "value" \
|
||||
--file_path_2 "value" \
|
||||
--output_format_(optional) "value" \
|
||||
--output-format json
|
||||
```
|
||||
|
||||
## Inputs
|
||||
|
||||
- **file_path_1**
|
||||
- **file_path_2**
|
||||
- **output_format (optional)**
|
||||
|
||||
## Outputs
|
||||
|
||||
- **diff_report.json**
|
||||
|
||||
## Artifact Metadata
|
||||
|
||||
### Produces
|
||||
|
||||
- `diff-report`
|
||||
|
||||
## Permissions
|
||||
|
||||
- `filesystem:read`
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
Use Python's difflib to compare files line by line. Support multiple output formats: - unified: Standard unified diff format - context: Context diff format - html: HTML diff with color coding - json: Structured JSON with line-by-line changes Include statistics: - Total lines added - Total lines removed - Total lines modified - Percentage similarity Handle binary files by detecting and reporting as non-text.
|
||||
|
||||
## Integration
|
||||
|
||||
This skill can be used in agents by including it in `skills_available`:
|
||||
|
||||
```yaml
|
||||
name: my.agent
|
||||
skills_available:
|
||||
- file.compare
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Run tests with:
|
||||
|
||||
```bash
|
||||
pytest skills/file/compare/test_file_compare.py -v
|
||||
```
|
||||
|
||||
## Created By
|
||||
|
||||
This skill was generated by **meta.skill**, the skill creator meta-agent.
|
||||
|
||||
---
|
||||
|
||||
*Part of the Betty Framework*
|
||||
Reference in New Issue
Block a user