diff --git a/config/external-sources.json b/config/external-sources.json index f4fadddf..1fa2a41a 100644 --- a/config/external-sources.json +++ b/config/external-sources.json @@ -615,6 +615,11 @@ "grill-me": "在用户明确要求严格追问、压力测试或彻底澄清计划、设计、决策或想法时使用。", "grilling": "在用户希望通过分轮问题压力测试计划、决策或想法,或使用 grill 相关触发语时使用。" }, + "skillFrontmatterRemovals": { + "grill-me": [ + "disable-model-invocation" + ] + }, "includeRootFiles": [ "LICENSE" ] diff --git a/plugins/codex/plugins/grill-me/skills/grill-me/SKILL.md b/plugins/codex/plugins/grill-me/skills/grill-me/SKILL.md index 5913c282..c50d919b 100644 --- a/plugins/codex/plugins/grill-me/skills/grill-me/SKILL.md +++ b/plugins/codex/plugins/grill-me/skills/grill-me/SKILL.md @@ -1,7 +1,6 @@ --- name: grill-me description: "在用户明确要求严格追问、压力测试或彻底澄清计划、设计、决策或想法时使用。" -disable-model-invocation: true --- Run a `/grilling` session. diff --git a/plugins/codex/plugins/mcp-playwright/MCP_SOURCE.json b/plugins/codex/plugins/mcp-playwright/MCP_SOURCE.json index 17406499..2e6ac0e2 100644 --- a/plugins/codex/plugins/mcp-playwright/MCP_SOURCE.json +++ b/plugins/codex/plugins/mcp-playwright/MCP_SOURCE.json @@ -3,5 +3,5 @@ "name": "playwright浏览器自动化操作", "version": "20260605", "keySource": "none", - "syncedAt": "2026-08-13T08:40:25Z" + "syncedAt": "2026-08-13T08:44:49Z" } diff --git a/scripts/sync_external_plugins.ps1 b/scripts/sync_external_plugins.ps1 index 57acf47e..b3dcf2ce 100644 --- a/scripts/sync_external_plugins.ps1 +++ b/scripts/sync_external_plugins.ps1 @@ -585,6 +585,60 @@ function Set-SkillFrontmatterValue { Write-Utf8NoBomText -Path $SkillFile -Text (($lines -join "`n") + "`n") } +function Remove-SkillFrontmatterFields { + param( + [string]$SkillFile, + [object]$Fields + ) + $fieldNames = @($Fields | ForEach-Object { ([string]$_).Trim() } | Where-Object { $_ }) + if ($fieldNames.Count -eq 0) { + return + } + foreach ($fieldName in $fieldNames) { + if ($fieldName -notmatch '^[A-Za-z0-9_-]+$') { + throw "skillFrontmatterRemovals contains invalid field name: $fieldName" + } + } + $lines = @(Get-Content -LiteralPath $SkillFile) + if ($lines.Count -lt 3 -or $lines[0] -ne "---") { + return + } + $endIndex = -1 + for ($i = 1; $i -lt $lines.Count; $i++) { + if ($lines[$i] -eq "---") { + $endIndex = $i + break + } + } + if ($endIndex -lt 0) { + return + } + $kept = @($lines[0]) + $skipContinuation = $false + for ($i = 1; $i -lt $endIndex; $i++) { + $line = $lines[$i] + if ($skipContinuation) { + if (-not $line.Trim() -or $line -match '^\s') { + continue + } + $skipContinuation = $false + } + $remove = $false + foreach ($fieldName in $fieldNames) { + if ($line -match "^$([regex]::Escape($fieldName))\s*:") { + $remove = $true + $skipContinuation = $true + break + } + } + if (-not $remove) { + $kept += $line + } + } + $kept += $lines[$endIndex..($lines.Count - 1)] + Write-Utf8NoBomText -Path $SkillFile -Text (($kept -join "`n") + "`n") +} + function Apply-LocalOverrides { param( [string]$PluginDir, @@ -611,6 +665,16 @@ function Apply-LocalOverrides { Set-SkillFrontmatterValue -SkillFile $skillFile -Key "description" -Value $property.Value } } + if ($Source.PSObject.Properties.Name -contains "skillFrontmatterRemovals" -and $Source.skillFrontmatterRemovals) { + $skillsRoot = Join-Path $PluginDir "skills" + foreach ($property in $Source.skillFrontmatterRemovals.PSObject.Properties) { + $skillFile = Join-Path (Join-Path $skillsRoot $property.Name) "SKILL.md" + if (-not (Test-Path -LiteralPath $skillFile)) { + throw "skillFrontmatterRemovals references missing skill: $skillFile" + } + Remove-SkillFrontmatterFields -SkillFile $skillFile -Fields $property.Value + } + } } function Get-Clone {