ifs
IBM i Integrated File System (IFS) Operations
Browse, search, read, and inspect files in the IFS including authorities, locks, and server shares using QSYS2 SQL services.
Available Tools
The ibmi CLI is the primary tool for IFS operations. 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/ifs, ~/.claude/skills/ifs
ibmi tools --tools "$SKILL_DIR/tools/" --toolset ifs_default
ibmi tool list_ifs_directory --tools "$SKILL_DIR/tools/" --path /home
ibmi sql "SELECT PATH_NAME, DATA_SIZE FROM TABLE(QSYS2.IFS_OBJECT_STATISTICS(START_PATH_NAME => '/tmp', SUBTREE_DIRECTORIES => 'NO'))"
Service Selection Guide
Browsing & Search
- QSYS2.IFS_OBJECT_STATISTICS -- List directory contents, search by name, find large files
- QSYS2.SERVER_SHARE_INFO -- NetServer file and print shares
Security & Locks
- QSYS2.IFS_OBJECT_PRIVILEGES -- Authority settings for IFS objects
- QSYS2.IFS_OBJECT_LOCK_INFO -- Lock information and job contention
Content
- QSYS2.IFS_READ -- Read text file contents line by line
Key Capabilities
File Browsing
- Directory Listing -- List contents of any IFS directory with type, size, owner
- Recursive Search -- Find files matching name patterns across directory trees
- Large File Detection -- Identify biggest files consuming disk space
Security Analysis
- Authority Review -- Check read/write/execute authorities per user
- Lock Diagnosis -- Identify which jobs hold locks on files
- Owner Information -- Track file ownership across the IFS
Content Access
- Text File Reading -- Read configuration files, logs, scripts
- Share Management -- View NetServer shares and connection counts
Common Use Cases
- Browse directories -- List contents of /home, /tmp, or application paths
- Find files -- Search for configuration files, logs, or specific extensions
- Disk space analysis -- Find largest files in a directory tree
- Authority audit -- Check who has access to sensitive files
- Lock troubleshooting -- Identify jobs blocking file access
- Read config files -- View application configuration or properties files
- Share inventory -- List all NetServer file shares
Quick Examples
List root directory
ibmi tool list_ifs_directory --tools "$SKILL_DIR/tools/" --path /
Search for log files
ibmi tool search_ifs_by_name --tools "$SKILL_DIR/tools/" --path /home --name-pattern '%.log'
Read a text file
ibmi tool read_ifs_file --tools "$SKILL_DIR/tools/" --path /etc/hosts
Check file authorities
ibmi tool get_ifs_object_authorities --tools "$SKILL_DIR/tools/" --path /home/myuser
Pre-built Tools
The tools/ifs.yaml file provides 8 ready-to-use tools:
| Tool | Description |
|---|---|
list_ifs_directory |
List directory contents with type, size, owner |
get_ifs_object_info |
Detailed object info including journaling and CCSID |
search_ifs_by_name |
Recursive file search by name pattern |
list_ifs_large_objects |
Find largest files in a directory tree |
get_ifs_object_authorities |
Authority settings for IFS objects |
read_ifs_file |
Read text file contents line by line |
list_ifs_object_locks |
Lock information for file contention diagnosis |
list_server_shares |
NetServer file and print shares |
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
Reference Documentation
- IFS Services Catalog -- Available SQL services
- Example SQL Patterns -- Working query examples
- IBM IFS_OBJECT_STATISTICS -- Table function documentation
More from ajshedivy/ibmi-agent-skills
work-management
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.
12system-health
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.
4database-performance
Monitor IBM i database performance including index statistics, maintained temporary indexes (MTIs), database monitors, query supervisor thresholds, and materialized query tables. Use when user asks about: (1) index usage or unused indexes, (2) maintained temporary indexes and whether to create permanent indexes, (3) database monitor configuration, (4) query supervisor thresholds, (5) MQT statistics and refresh status, or (6) tables with high MTI overhead.
3template-skill
Replace with description of the skill and when Claude should use it.
3skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
3ibmi
Core skill for working with IBM i systems via the ibmi CLI and ibmi-mcp-server. Provides text-to-SQL methodology, iterative querying best practices, schema discovery, and SQL validation patterns for Db2 for i. Use as the foundation for ANY IBM i task — install this skill first, then add domain-specific skills (ibmi-database, ibmi-system) as needed.
3