filament-check
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCheck Filament Rules
检查 Filament 规则
What To Check
检查内容
$ARGUMENTSApp\Admin\Resources\Articles\ArticleResourceApp\Admin\Resources\Articlesapp/Admin/Resources/Articles/app/Admin/Resources/Articles/Schemas/ArticleForm.phpIf is empty, check the Filament files in the current git changes ().
$ARGUMENTSgit statusIf is unclear (no matching file found, or a namespace with more than one meaning), take every candidate that matches into scope, and name in the report which ones you took.
$ARGUMENTS$ARGUMENTSApp\Admin\Resources\Articles\ArticleResourceApp\Admin\Resources\Articlesapp/Admin/Resources/Articles/app/Admin/Resources/Articles/Schemas/ArticleForm.php如果 为空,则检查当前 git 更改中的 Filament 文件()。
$ARGUMENTSgit status如果 不明确(未找到匹配文件,或一个命名空间存在多种含义),则将所有匹配的候选项纳入范围,并在报告中说明纳入了哪些候选项。
$ARGUMENTSRun Flow
执行流程
1. Load the rules
1. 加载规则
Read in full, live, this run. It is the single source of truth: every rule in it is a check item, and a rule it adds, changes, or drops changes your check items with it.
../filament-run/SKILL.mdTurn each rule into a check list entry — what it asks for, and the shape that breaks it.
本次运行中,完整、实时读取 。它是唯一的事实来源:其中的每条规则都是一个检查项;它新增、修改或删除任何规则时,检查项也应随之变化。
../filament-run/SKILL.md将每条规则转换为一个检查清单条目——说明该规则要求什么,以及违反规则的具体形式。
2. Gather the scope
2. 收集检查范围
- Use Glob and Read to list and open every file in scope.
.php - Read each file in full.
- Name the role: Resource / Page / RelationManager / Schema (Form) / Table / Filter / Widget.
- Apply the check list entries from step 1 that the role reaches.
- 使用 Glob 和 Read 列出并打开范围内的每个 文件。
.php - 完整读取每个文件。
- 标注其角色:Resource / Page / RelationManager / Schema (Form) / Table / Filter / Widget。
- 应用步骤 1 中与该角色相关的检查清单条目。
3. Match one by one
3. 逐项匹配
Take the check list from step 1 against the code you read, and mark each rule , , or .
passbreakexempt- — write down
breakand the rule it broke.file_path:line_number - — the role never reaches the rule, or the shape is one Filament itself dictates (the Resource / Page / Schema set of three). An exemption is still a verdict: name the shape that earned it.
exempt
Done when: every file in scope carries an explicit verdict on every rule you loaded in step 1. A rule you did not mention is a rule you did not run.
将步骤 1 的检查清单与已读取的代码进行比对,并将每条规则标记为 、 或 。
passbreakexempt- — 记录
break以及违反的规则。file_path:line_number - — 该角色不涉及此规则,或其形式由 Filament 自身规定(Resource / Page / Schema 这三者组成的结构)。豁免仍然是一个结论:说明获得豁免的具体形式。
exempt
完成标准:范围内的每个文件都必须针对步骤 1 中加载的每条规则给出明确结论。未提及的规则就代表没有执行。
4. Make a report (in English)
4. 生成报告(英文)
- Scope — the files you checked, and the role of each.
- Verdict table — one row per rule from step 1, each /
pass/break.exempt - One section per rule that broke — each break point as , and what the rule asks for instead, quoted from
file_path:line_number.filament-run - Overall judgment — pass / has breaks that need a fix.
- Fix advice — each break point gets one clear, doable fix direction, described in prose.
- 范围 — 检查了哪些文件,以及每个文件的角色。
- 结论表 — 步骤 1 中每条规则占一行,每行标记为 /
pass/break。exempt - 每条被违反的规则单独一节 — 每个违规点标注为 ,并引用
file_path:line_number中的内容,说明该规则原本要求什么。filament-run - 总体结论 — pass / has breaks that need a fix。
- 修复建议 — 每个违规点都应给出一个清晰、可执行的修复方向,并以文字形式说明。
5. Close the check
5. 结束检查
This skill ends at the report — changing code belongs to the or skill. When everything passes, say the good points in short and stop there.
runfixWhen there are breaks, who called for the check decides where the report goes.
- The user asked for it → call the skill to put the fix directions to them one at a time and settle which way to go.
grilling - You or another skill asked for it → the report is yours to reason from. Take it back to the work that called for the check and act on it there.
此 Skill 在报告生成后结束——修改代码属于 或 Skill 的职责。当所有检查均通过时,简要指出做得好的地方,然后结束。
runfix存在违规项时,由发起检查的一方决定报告的提交方式。
- 用户发起检查 → 调用 Skill,逐项向用户提出修复方向,并确定最终采用哪种方案。
grilling - 你或其他 Skill 发起检查 → 报告由你负责分析。将报告带回发起检查的工作,并据此采取行动。