skills/spool/SKILL.md
Manage and analyze spooled files, output queues, and printer configurations on IBM i via SQL services. Use when user asks about: (1) listing or searching output queues, (2) viewing spooled file entries by queue, user, or status, (3) reading spool file content, (4) identifying top spool consumers or old spool files, (5) printer file definitions, (6) spool storage analysis, (7) replacing WRKSPLF, WRKOUTQ, WRKOBJLCK commands, or (8) any spool file management task.
npx skillsauth add ajshedivy/ibmi-agent-skills spoolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Manage and analyze spooled files, output queues, and printer configurations using SQL services from QSYS2 and SYSTOOLS.
The ibmi CLI is the primary tool for executing spool queries. Set SKILL_DIR to this skill's installed location (the directory containing this SKILL.md file):
# SKILL_DIR = directory containing this SKILL.md
# Examples: ./skills/spool, ~/.claude/skills/spool
# List all spool tools
ibmi tools --tools "$SKILL_DIR/tools/" --toolset spool_default
# Run a specific tool
ibmi tool list_output_queues --tools "$SKILL_DIR/tools/"
# Ad-hoc SQL for custom queries
ibmi sql "SELECT * FROM QSYS2.OUTPUT_QUEUE_ENTRIES_BASIC WHERE USER_NAME = 'MYUSER'"
ibmi tool list_output_queues --tools "$SKILL_DIR/tools/"
ibmi tool list_spool_files_basic --tools "$SKILL_DIR/tools/" --user-filter MYUSER
ibmi tool find_old_spool_files --tools "$SKILL_DIR/tools/" --days-old 90
SELECT ORDINAL_POSITION, SPOOLED_DATA
FROM TABLE(SYSTOOLS.SPOOLED_FILE_DATA(
JOB_NAME => '123456/MYUSER/MYJOB',
SPOOLED_FILE_NAME => 'QPJOBLOG'))
ORDER BY ORDINAL_POSITION;
SELECT USER_NAME, COUNT(*) AS TOTAL_FILES,
SUM(TOTAL_PAGES) AS TOTAL_PAGES, SUM(SIZE) AS TOTAL_SIZE
FROM QSYS2.OUTPUT_QUEUE_ENTRIES_BASIC
GROUP BY USER_NAME
ORDER BY TOTAL_SIZE DESC
FETCH FIRST 10 ROWS ONLY;
The tools/spool.yaml file provides 9 ready-to-use tools:
| Tool | Description |
|------|-------------|
| list_output_queues | Output queues with file counts, writer status, and configuration |
| list_output_queue_entries | Spool files in a specific output queue |
| list_spool_files_basic | System-wide spool file search by user and status |
| get_spooled_file_info | Detailed spool file attributes for a job |
| read_spooled_file_data | Read spool file text content line by line |
| top_spool_consumers | Top spool storage consumers by user |
| find_old_spool_files | Find spool files older than N days |
| get_printer_file_info | Printer file definitions on the system |
| spool_storage_summary | System-wide spool storage summary with status counts |
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" # Execute
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" --dry-run # Preview SQL
ibmi tools show <tool_name> --tools "$SKILL_DIR/tools/" # View details
tools
Query, monitor, and analyze jobs on IBM i using SQL table functions via the ibmi CLI. Use when user asks about: (1) finding jobs by status, user, subsystem, or type, (2) monitoring active job performance (CPU, I/O, memory), (3) detecting long-running SQL statements, (4) analyzing lock contention, (5) checking job queues, (6) scheduled jobs, (7) job logs, (8) replacing WRKACTJOB, WRKUSRJOB, WRKSBSJOB, WRKSBMJOB commands, or (9) any IBM i work management task.
testing
Monitor IBM i system health including CPU, memory, disk, ASPs, system limits, and network status via SQL services. Use when user asks about: (1) CPU utilization or system status, (2) memory pool sizes or page faults, (3) disk capacity or ASP usage, (4) system limits approaching thresholds, (5) TCP/IP connections and network status, (6) system activity overview, (7) replacing WRKSYSSTS, WRKDSKSTS, WRKTCPSTS commands, or (8) any system health monitoring task.
development
Monitor and analyze IBM i storage resources including ASPs, disk units, temporary storage, user storage consumption, and NVMe devices via SQL services. Use when user asks about: (1) ASP capacity, usage, or health, (2) disk unit status or I/O performance, (3) temporary storage consumption by jobs, (4) storage used per user profile, (5) NVMe device health, (6) IASP vary operations, or (7) replacing WRKDSKSTS, WRKSYSSTS storage info, or WRKSTG commands.
development
Assess IBM i security posture including user privileges, object authorities, vulnerability detection, and function usage via SQL services. Use when user asks about: (1) user profiles with special authorities or limited capabilities, (2) object privileges and *PUBLIC authority exposure, (3) files vulnerable to trigger, rename, or library list attacks, (4) user impersonation vulnerabilities, (5) group profile membership, (6) function usage and access control, (7) security audit and compliance, or (8) replacing WRKOBJAUT, DSPUSRPRF, DSPAUTL commands.