From ibmi-agent-skills
Analyze IBM i SQL application behavior including error logs, statement parsing, SQLCODE lookups, and system limits. Use when user asks about: (1) SQL errors in applications or error log analysis, (2) most frequent SQL errors, (3) parsing SQL statements to find referenced objects, (4) looking up SQLCODE meanings, (5) properly delimiting SQL identifiers, (6) system size limits for files or indexes, or (7) objects approaching maximum capacity.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ibmi-agent-skills:database-applicationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze SQL application behavior including error logs, statement parsing, SQLCODE reference, SQL naming utilities, and system limit monitoring.
Analyze SQL application behavior including error logs, statement parsing, SQLCODE reference, SQL naming utilities, and system limit monitoring.
The ibmi CLI is the primary tool for executing database application 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/database-application, ~/.claude/skills/database-application
# List all database application tools
ibmi tools --tools "$SKILL_DIR/tools/" --toolset database_application_default
# Run a specific tool
ibmi tool list_sql_error_log --tools "$SKILL_DIR/tools/"
# Run with parameters
ibmi tool get_sqlcode_info --tools "$SKILL_DIR/tools/" --sqlcode -204
# Ad-hoc SQL for custom queries
ibmi sql "SELECT * FROM QSYS2.SQL_ERROR_LOG ORDER BY LOGGED_TIME DESC FETCH FIRST 10 ROWS ONLY"
ibmi tool list_sql_error_log --tools "$SKILL_DIR/tools/"
ibmi tool list_sql_error_log --tools "$SKILL_DIR/tools/" --program-name MYPGM --program-library MYLIB
ibmi tool get_sqlcode_info --tools "$SKILL_DIR/tools/" --sqlcode -204
ibmi tool parse_sql_statement --tools "$SKILL_DIR/tools/" --sql-statement "SELECT * FROM MYLIB.ORDERS JOIN MYLIB.CUSTOMERS ON ORDERS.CUSTID = CUSTOMERS.ID"
ibmi tool get_system_limits_near_max --tools "$SKILL_DIR/tools/" --threshold-pct 75
The tools/database-application.yaml file provides 7 ready-to-use tools:
| Tool | Description |
|---|---|
list_sql_error_log | SQL error log entries with program and statement details |
get_sql_error_summary | Error counts grouped by SQLCODE |
parse_sql_statement | Extract referenced objects from SQL text |
get_sqlcode_info | Look up message text for a SQLCODE |
delimit_name | Check if a SQL identifier needs quoting |
get_system_limits | System limit tracking for objects and jobs |
get_system_limits_near_max | Objects approaching their capacity maximums |
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
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub ajshedivy/ibmi-agent-skills --plugin ibmi-all