分享一套适配ZCode自用安全Skills(附自定义模型思考透传)

分享一套适配ZCode自用安全Skills(附自定义模型思考透传)

ad1a1b718320260905210849

 

因为有个本地qwen3.8,晚上睡觉可以无限火力的让他自己去嗷嗷苦干,所以就适配了一下ZCode的Plugin模块+隐式二级传递。ZCode用起来感觉还行主要是自定义化程度适中,自己没有时间去重新写一套dsh的plugin,也不喜欢在主力机器上面装cc和codex

个人一共整合了
https://github.com/P4nda0s/reverse-skills
https://github.com/wgpsec/AboutSecurity
https://github.com/yaklang/hack-skills

其中hack-skills作为板块大类内的方法论总结与指导,二级目录下的subskills由狼队的AboutSecurity作为场景刻画与行动指南,实测效果尚佳。Skills的作用在于给低参数量模型提供一套现成的好学生作业来照抄,具体的使用效果以使用者自身水平下发的目标准确性为主。

reverse-skills作为mobile板块内单独的reverse板块,因为写frida的总结很到位,很多国模记忆里的frida写法都是老一套的,用skills强制规范会到位不少。

不同的Agent请自行适配。

ad1a1b718320260905212255


ZCode Win 3.10.2 自定义模型 思考程度透传分析思路

`resources\glm\zcode.cjs`

  1. 白名单 = F1ozcode.cjs 里 modelId→能力默认的数组,由 K$(resolveModelCapabilityDefaults) / qmr(applyModelCapabilityDefaults) 在每次目录加载时对所有 provider按 matches 逐条套用。 原 18 条里没有匹配 custom-models 的条目。
  2. Patch A(F1o 追加 1 条,自寻址、幂等):匹配 custom-models,anthropic, levels=[low,medium,xhigh,off]defaultLevel=medium(默认开启深度思考)。
  3. Patch B(anthropic builder thinking 门,@~4202946)
    • 原代码:$=ue==="enabled"||ue==="adaptive" → 仅 enabled/adaptive 才把 thinking 写进请求体; 当 type==="disabled"(即 off 档)时,thinking 块被省略
    • 改为:$=ue==="enabled"||ue==="adaptive"||ue==="disabled" → 让 off 档把 thinking:{type:"disabled"} 显式写到线上
  4. wire(claude-effort 方式,每档)
    • low/medium/xhigh → anthropic:{effort:<level>, thinking:{type:"enabled", budgetTokens:4000/8000/32000}} → 请求体产出 thinking:{type:"enabled",budget_tokens:N} + output_config:{effort:<level>}
    • off → anthropic:{thinking:{type:"disabled"}} → 请求体产出 thinking:{type:"disabled"}(Patch B 后)。
  5. 预算沿用 ZCode 内置 Claude 约定(k1o/y1o):low=4000、medium=8000、xhigh=32000。
  6. 实测(live API,test-custom-off.js,走 ai.example.com
    • 后端 model 字段 = qwen3.8-27b(证实 custom-models 就是 qwen3.8)。
    • off 关键发现:请求体省略 thinking 字段时,后端默认开启思考(has_thinking_block=true); 只有显式发 thinking:{type:"disabled"} 才真正关闭(has_thinking_block=falseoutput_tokens=2,text=OK)。
    • 不同 effort/budget 会缩放思考长度:low(4000)→22、medium(8000)→22、xhigh(32000)→22(短提示词下差异小); 在更长的任务提示词下,之前实测为 low 27 / medium 122 / xhigh 245(test-custom-api.js)。

1. Patch A:F1o 白名单条目(逐字,与 patcher 内一致)

{defaults:{replaceReasoning:!0,supportsReasoning:!0,reasoning:{enabled:!0,levels:["low","medium","xhigh","off"],defaultLevel:"medium",providerOptionsByLevel:{low:{anthropic:{effort:"low",thinking:{type:"enabled",budgetTokens:4000}}},medium:{anthropic:{effort:"medium",thinking:{type:"enabled",budgetTokens:8000}}},xhigh:{anthropic:{effort:"xhigh",thinking:{type:"enabled",budgetTokens:32000}}},off:{anthropic:{thinking:{type:"disabled"}}}}}},id:"custom-models-reasoning-depth",matches:(({modelId:e})=>e.toLowerCase().includes("custom-models"))}
  • 插入点:F1o=[ …原始 18 条… 的右 ] 之前(自寻址:定位唯一 F1o=[ 锚点 + 括号匹配到 ])。
  • 幂等 marker:id:"custom-models-reasoning-depth"
  • 匹配器:includes("custom-models")(大小写不敏感)。

2. Patch B:anthropic builder thinking 门(逐字)

锚点(唯一,@4202946): $=ue==="enabled"||ue==="adaptive"
替换为              : $=ue==="enabled"||ue==="adaptive"||ue==="disabled"
  • 为什么需要:ZCode 的 anthropic 请求 builder 只在 type∈{enabled,adaptive} 时把 thinking 写进 body。 off 档传的是 thinking:{type:"disabled"},原本会被 builder 丢弃 → 请求体无 thinking 字段 → 后端(qwen3.8-27b)默认开启思考,off 并未真正关闭。Patch B 让门放行 disabled,从而 off 档把 thinking:{type:"disabled"} 显式写到线上,实现「不开启思考 = 直接回答」。
  • 影响面:该 builder 是通用 anthropic builder,改动后所有 anthropic 模型在 type="disabled" 时会显式发送 thinking:{type:"disabled"} —— 这是 Anthropic API 关闭 extended thinking 的标准写法,对其他模型更安全。
分享一套适配ZCode自用安全Skills(附自定义模型思考透传)-棉花糖会员站
分享一套适配ZCode自用安全Skills(附自定义模型思考透传)
此内容为付费阅读,请付费后查看
会员专属资源
您暂无购买权限,请先开通会员
付费阅读
已售 59
© 版权声明
THE END
喜欢就支持一下吧
点赞45 分享
评论 共3条

请登录后发表评论

    请登录后查看评论内容