check-rule-extract

Extracts pre-operation validation rules from Controllers into an Excel workbook via parallel subagents.

1|Updated Sep 11, 2026
One-click install
npx skills add https://github.com/lldwb/lldwb-claude-skills --skill check-rule-extract-lldwb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-rule-extract
Source: https://github.com/lldwb/lldwb-claude-skills/tree/main/skills/check-rule-extract
Command: npx skills add https://github.com/lldwb/lldwb-claude-skills --skill check-rule-extract-lldwb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires xlrd, openpyxl, and includes scripts (resource) and references (resource) components.

What problem does it solve? Manually tracing pre-operation validation rules (save, delete, lock, unlock) scattered across Controllers, Services, and Validators is slow and error-prone, especially when results must be delivered as a structured business-control spreadsheet. This Skill orchestrates the whole extraction: it locates Controllers from menu entries, dispatches one isolated subagent per Controller to trace validation logic, and merges the fragments into a formatted .xlsx workbook. ## Core Features & Use Cases - Menu-to-Controller resolution: Accepts a full menu path, menu name, or Controller class name, resolves targets through a menu-permission data source, and confirms the scope list before dispatching. - Parallel subagent orchestration: Runs a fixed concurrency window (default 5, hard cap) of isolated subagents that recursively trace Service/Validator method bodies without overflowing context, with per-Controller retry and resume-from-checkpoint support. - Scripted Excel generation: Merges markdown fragments into a styled .xlsx via build_check_xlsx.py, with an 11-column default template, optional --template JSON override, and automatic role lookup for permission-control entries. - Use Case: Ask to extract the pre-operation checks for the menu "系统管理-用户管理-用户查询"; the Skill confirms the scope, traces every interface's validation logic in parallel, and delivers a business-control workbook with role annotations and a source manifest. ## Quick Start Use the check-rule-extract skill to extract the pre-operation validation rules for the menu 用户查询 and generate the Excel workbook.

Frequently Asked Questions about check-rule-extract

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

FAQPage Schema
How do I extract validation rules from Java Controllers into Excel?

Run the skill with a menu path, menu name, or Controller class name as the scope argument. It dispatches one subagent per Controller to trace Service and Validator validation logic, then merges the fragments into a formatted .xlsx workbook using the build_check_xlsx.py script.

How to generate a business control checklist from backend code?

Provide the target menu or Controller names and the skill traces each interface's pre-operation checks, including permission annotations, admin checks, and whitelists. The output workbook lists one control rule per row with function point, trigger timing, logic type, and prompt message columns.

Can I customize the Excel output columns and styling?

Yes, pass a template JSON via the --template option to override headers, column widths, header row count, freeze panes, and header fill color. Without a template, the script uses a built-in generic 11-column layout with frozen header and styled cells.

Does the extraction modify any business code?

No, the skill is strictly read-only against business code. Subagents only read Controller, Service, and Validator sources and write markdown fragments to a gitignored task directory; the only other write is the final xlsx workbook.

What happens if extraction of one Controller fails?

A failed Controller is retried up to two times without blocking other units. If it still fails, it is marked as needing manual intervention and listed in the final summary, while completed fragments are preserved for resume on rerun.

What Python dependencies are required for the xlsx generation?

The script requires xlrd (version 2.x) to read legacy .xls menu-permission detail sheets and openpyxl (version 3.1+) to generate the .xlsx workbook. Install both with pip install -r requirements.txt.