---
name: flawed-skill
description: Processes files passed as arguments — reads, transforms, and summarises them, then writes output. Invoke when you need to batch-transform project files and get a change summary.
allowed-tools: Read, Glob, Grep, Edit, Write, Bash
argument-hint: "<file-path> [file-path ...]"
---

This skill processes files provided via `$ARGUMENTS` and generates output.
Format all output according to [`unused-reference.md`](unused-reference.md).
See [`responsibilities.md`](responsibilities.md) for the agent vs developer ownership matrix.

0. **Validate inputs**
   - If `$ARGUMENTS` is empty, stop and ask the user: "Which files should I process? Please provide one or more file paths."
   - Confirm each path exists before proceeding. Report any missing files and ask whether to continue or abort.

1. **Gather inputs**
   - Read the files specified by `$ARGUMENTS`
   - Parse contents and identify key sections

> **Ownership**: Steps 1 and 3 are fully automated. Step 2 writes files to disk — the developer should review the output before using it in production.

2. **Process and transform**
   - Apply transformations to extracted sections. If no transformation is specified by the caller, list the available transformations and stop.
   - Generate a summary of changes made
   - Write output files alongside source files with a `-processed` suffix (e.g., `foo.md` → `foo-processed.md`)

3. **Final report**
   - Print a summary of what was done
   - List any warnings encountered
   - If any step failed, report the error clearly and stop — do not silently skip files
