irule-datagroup

Extracts inline lookup patterns from Tcl iRules into BIG-IP data-groups.

59|6|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/bitwisecook/tcl-lsp --skill irule-datagroup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: irule-datagroup
Source: https://github.com/bitwisecook/tcl-lsp/tree/main/ai/claude/skills/irule-datagroup
Command: npx skills add https://github.com/bitwisecook/tcl-lsp --skill irule-datagroup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tcl_ai.py, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of identifying and extracting inline lookup patterns within Tcl iRules, converting them into efficient BIG-IP data-groups for improved performance and maintainability.

Core Features & Use Cases

  • Pattern Identification: Detects various lookup patterns like if/elseif chains and switch statements.
  • Data-Group Conversion: Generates both the iRule code using class match/class lookup and the corresponding tmsh data-group definitions.
  • Type Awareness: Infers and correctly handles string, IP/CIDR, and integer data-group types.
  • Use Case: Refactor a complex iRule with numerous hardcoded IP addresses into a single IP data-group, making it easier to manage and update network access rules.

Quick Start

Use the irule-datagroup skill to analyze the iRule file named 'my_irule.tcl' for data-group extraction opportunities.

Frequently Asked Questions about irule-datagroup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize BIG-IP iRules by converting if-chains to data-groups?

Data-group conversion improves iRule performance by replacing lengthy if/elseif chains and switch statements with efficient class match and class lookup commands. This reduces per-connection processing overhead and centralizes lookup data management.

Can I automatically extract hardcoded IP addresses from Tcl iRules into a data-group?

Yes, automated extraction can identify hardcoded IP addresses in Tcl iRules and infer their type to generate a matching IP data-group. It produces both the refactored iRule code and the corresponding tmsh data-group definitions for immediate deployment.

What lookup patterns can be converted to BIG-IP data-groups?

You can convert if/elseif chains and switch statements into BIG-IP data-groups. The analysis identifies these inline lookup patterns and extracts them into type-aware data-groups for strings, IP/CIDR blocks, and integers using class match commands.

Does iRule data-group extraction support both string and integer types?

Yes, iRule data-group extraction supports string, integer, and IP/CIDR network types. The analysis infers the correct data-group type from the extracted values to ensure accurate class match and class lookup operations.

What is the best way to refactor complex Tcl iRules for network access rules?

The best way to refactor complex Tcl iRules is to extract numerous hardcoded network access values into a single data-group. This simplifies management and updates while generating the necessary tmsh definitions and optimized iRule code simultaneously.