$npx -y skills add agentscope-ai/QwenPaw --skill file_reader-enRead and summarize text-based file types only. Prefer read_file for text formats; use execute_shell_command for type detection when needed. PDF/Office/images/archives are handled by other skills.
| 1 | # File Reader Toolbox |
| 2 | |
| 3 | Use this skill when the user asks to read or summarize local text-based files. PDFs, Office documents, images, audio, and video are out of scope for this skill and should be handled by their dedicated skills/tools. |
| 4 | |
| 5 | ## Quick Type Check |
| 6 | |
| 7 | Use a type probe before reading: |
| 8 | |
| 9 | ```bash |
| 10 | file -b --mime-type "/path/to/file" |
| 11 | ``` |
| 12 | |
| 13 | If the file is large, avoid dumping the whole content; extract a small, relevant portion and summarize. |
| 14 | |
| 15 | ## Text-Based Files (use read_file) |
| 16 | |
| 17 | Preferred for: `.txt`, `.md`, `.json`, `.yaml/.yml`, `.csv/.tsv`, `.log`, `.sql`, `ini`, `toml`, `py`, `js`, `html`, `xml` source code. |
| 18 | |
| 19 | Steps: |
| 20 | |
| 21 | 1. Use `read_file` to fetch content. |
| 22 | 2. Summarize key sections or show the relevant slice requested by the user. |
| 23 | 3. For JSON/YAML, list top-level keys and important fields. |
| 24 | 4. For CSV/TSV, show header + first few rows, then summarize columns. |
| 25 | |
| 26 | ## Large Logs |
| 27 | |
| 28 | If the file is huge, use a tail window: |
| 29 | |
| 30 | ```bash |
| 31 | tail -n 200 "/path/to/file.log" |
| 32 | ``` |
| 33 | |
| 34 | Summarize the last errors/warnings and notable patterns. |
| 35 | |
| 36 | ## Out of Scope |
| 37 | |
| 38 | Do not handle the following in this skill (they are covered by other skills): |
| 39 | |
| 40 | |
| 41 | - Office (docx/xlsx/pptx) |
| 42 | - Images |
| 43 | - Audio/Video |
| 44 | |
| 45 | ## Safety and Behavior |
| 46 | |
| 47 | - Never execute untrusted files. |
| 48 | - Prefer reading the smallest portion necessary. |
| 49 | - If a tool is missing, explain the limitation and ask the user for an alternate format. |