Sync third-party and MCP marketplace plugins
Constraint: Public skills are published only by explicit administrator action unless they are tracked third-party market sources. Confidence: high Scope-risk: narrow Directive: Keep private/internal skills out of the public marketplace and preserve normal incremental market Git history. Tested: Marketplace validation passed.
This commit is contained in:
@@ -615,6 +615,11 @@
|
||||
"grill-me": "在用户明确要求严格追问、压力测试或彻底澄清计划、设计、决策或想法时使用。",
|
||||
"grilling": "在用户希望通过分轮问题压力测试计划、决策或想法,或使用 grill 相关触发语时使用。"
|
||||
},
|
||||
"skillFrontmatterRemovals": {
|
||||
"grill-me": [
|
||||
"disable-model-invocation"
|
||||
]
|
||||
},
|
||||
"includeRootFiles": [
|
||||
"LICENSE"
|
||||
]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: grill-me
|
||||
description: "在用户明确要求严格追问、压力测试或彻底澄清计划、设计、决策或想法时使用。"
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
Run a `/grilling` session.
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"name": "playwright浏览器自动化操作",
|
||||
"version": "20260605",
|
||||
"keySource": "none",
|
||||
"syncedAt": "2026-08-13T08:40:25Z"
|
||||
"syncedAt": "2026-08-13T08:44:49Z"
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user