欢迎回来

登录 EAKE AI,继续您的智能之旅

忘记密码?
还没有账号?立即注册

Claude Code 插件开发

2026-05-20 · Skills中心

编写 Hermes-Agent Skills(仓库内)

概述

SKILL.md 可以放在两个位置:

  1. 用户本地:~/.hermes/skills///SKILL.md — 个人使用,不共享。通过 skill_manage(action='create') 创建。
  2. 仓库内(本技能讨论的情况):/home/bb/hermes-agent/skills///SKILL.md — 提交并随包分发。使用 write_file + git addskill_manage(action='create') 不会写入该目录树。
  3. 何时使用

    • 用户要求你「在这个分支 / 仓库 / 提交里」添加一个技能
    • 你正在提交一个应随 hermes-agent 分发的可复用工作流
    • 你正在编辑 /home/bb/hermes-agent/skills/ 下的现有技能(小改动用 patch,重写用 write_fileskill_manage 对仓库内技能仍可执行 patch,但不支持 create

    必需的前置元数据(Frontmatter)

    权威来源:tools/skill_manager_tool.py::_validate_frontmatter。硬性要求:

    • --- 作为文件开头(前面不能有空白行)。
    • 在正文之前以 --- 结束。
    • 可解析为 YAML 映射。
    • 必须包含 name 字段。
    • 必须包含 description 字段,且 ≤ 1024 字符MAX_DESCRIPTION_LENGTH)。
    • 结束 --- 之后正文不能为空。

    skills/software-development/ 下所有技能共用的结构范式:

    
    ---
    name: my-skill-name               # lowercase, hyphens, ≤64 chars (MAX_NAME_LENGTH)
    description: Use when . .
    version: 1.0.0
    author: Hermes Agent
    license: MIT
    metadata:
      hermes:
        tags: [short, descriptive, tags]
        related_skills: [other-skill, another-skill]
    ---
    

    version / author / license / metadata 不由验证器强制,但每个同类技能都有——省略会让你的技能显得突兀。

    大小限制

    • 描述:≤ 1024 字符(强制)。
    • 完整 SKILL.md:≤ 100,000 字符(以 MAX_SKILL_CONTENT_CHARS 强制,约 3.6 万 tokens)。
    • software-development/ 中的同类技能为 8-14k 字符。以这个范围为目标。如果超过 20k,拆分为 references/*.md 并从 SKILL.md 引用。

    对齐同类结构

    每个仓库内技能大致遵循:

    
    # 
    
    ## Overview
    One or two paragraphs: what and why.
    
    ## When to Use
    - Bulleted triggers
    - "Don't use for:" counter-triggers
    
    ## 
    - Quick-reference tables are common
    - Code blocks with exact commands
    - Hermes-specific recipes (tests via scripts/run_tests.sh, ui-tui paths, etc.)
    
    ## Common Pitfalls
    Numbered list of mistakes and their fixes.
    
    ## Verification Checklist
    - [ ] Checkbox list of post-action verifications
    
    ## One-Shot Recipes (optional)
    Named scenarios → concrete command sequences.
    </code></pre>
    <p>并非每个章节都必需,但 <code>Overview</code> + <code>When to Use</code> + 可执行的正文 + pitfalls 是让技能看起来像同类的底线。</p>
    <h2>目录放置</h2>
    <pre><code>
    skills///SKILL.md
    </code></pre>
    <p>仓库中现有的分类(用 <code>ls skills/</code> 确认):<code>autonomous-ai-agents</code>、<code>creative</code>、<code>data-science</code>、<code>devops</code>、<code>dogfood</code>、<code>email</code>、<code>gaming</code>、<code>github</code>、<code>leisure</code>、<code>mcp</code>、<code>media</code>、<code>mlops/*</code>、<code>note-taking</code>、<code>productivity</code>、<code>red-teaming</code>、<code>research</code>、<code>smart-home</code>、<code>social-media</code>、<code>software-development</code>。</p>
    <p>选择最接近的现有分类。不要随意发明新的顶级分类。</p>
    <h2>工作流</h2>
    <ol>
    <li><strong>调研同类</strong>:查看目标分类下的同类技能:</li>
    <pre><code>
       ls skills//
    </code></pre>
    </ul>
    <p>   阅读 2-3 个同类 SKILL.md,以对齐语气和结构。</p>
    <ol>
    <li><strong>检查验证器约束</strong>:如有疑问,查看 <code>tools/skill_manager_tool.py</code>。</li>
    <li><strong>起草</strong>:用 <code>write_file</code> 写入 <code>skills///SKILL.md</code>。</li>
    <li><strong>本地验证</strong>:</li>
    <pre><code class="language-python">
       import yaml, re, pathlib
       content = pathlib.Path("skills///SKILL.md").read_text()
       assert content.startswith("---")
       m = re.search(r'n---s*n', content[3:])
       fm = yaml.safe_load(content[3:m.start()+3])
       assert "name" in fm and "description" in fm
       assert len(fm["description"]) <= 1024
       assert len(content) <= 100_000
    </code></pre>
    <li><strong>Git add + commit</strong>:在当前分支上提交。</li>
    <li><strong>注意:</strong>当前会话的技能加载器是有缓存的——<code>skill_view</code> / <code>skills_list</code> 在新会话之前看不到新技能。这是预期行为,不是 bug。</li>
    </ul>
    <h2>交叉引用其他技能</h2>
    <p><code>metadata.hermes.related_skills</code> 在加载时合并两棵目录树(仓库内 <code>skills/</code> 和 <code>~/.hermes/skills/</code>)。你可以从仓库内技能引用用户本地技能,但其他全新克隆仓库的用户将无法解析它。仓库内技能之间最好只引用仓库内技能。如果某个被频繁引用的技能只存在于 <code>~/.hermes/skills/</code>,考虑把它提升到仓库中。</p>
    <h2>编辑现有仓库内技能</h2>
    <ul>
    <li><strong>小修小补(错别字、新增 pitfall、收紧触发条件):</strong><code>skill_manage(action='patch', name=..., old_string=..., new_string=...)</code> 对仓库内技能同样适用。</li>
    <li><strong>重大重写:</strong>用 <code>write_file</code> 重写整个 SKILL.md。<code>skill_manage(action='edit')</code> 也可以,但需要提供完整的全新内容。</li>
    <li><strong>添加辅助文件:</strong>用 <code>write_file</code> 写入 <code>skills///references/.md</code>、<code>templates/</code> 或 <code>scripts/</code>。<code>skill_manage(action='write_file')</code> 也可以,并且会强制 references/templates/scripts/assets 子目录白名单。</li>
    <li><strong>始终提交</strong>你的编辑——仓库内技能是源码,不是运行时状态。</li>
    </ul>
    <h2>常见误区(Common Pitfalls)</h2>
    <ol>
    <li><strong>用 <code>skill_manage(action='create')</code> 创建仓库内技能。</strong>它会写入 <code>~/.hermes/skills/</code>,而不是仓库目录树。仓库内创建请使用 <code>write_file</code>。</li>
    </ul>
    <ol>
    <li><strong><code>---</code> 前面有前导空白。</strong>验证器检查 <code>content.startswith("---")</code>;任何前导空行或 BOM 都会导致验证失败。</li>
    </ul>
    <ol>
    <li><strong>描述过于笼统。</strong>同类技能的描述以「Use when ...」开头,描述的是*触发类别*,而不是某一个任务。「Use when debugging X」优于「Debug X」。</li>
    </ul>
    <ol>
    <li><strong>忘记 author/license/metadata 块。</strong>虽不由验证器强制,但每个同类都有;省略会让技能看起来像半成品。</li>
    </ul>
    <ol>
    <li><strong>写了一个与同类重复的技能。</strong>创建之前,先 <code>ls skills//</code> 并打开 2-3 个同类。优先扩展现有技能,而不是创建一个狭窄的兄弟技能。</li>
    </ul>
    <ol>
    <li><strong>期望当前会话能看到新技能。</strong>它看不到。技能加载器在会话开始时初始化。请在新会话中验证,或使用精确路径通过 <code>skill_view</code> 验证。</li>
    </ul>
    <ol>
    <li><strong>链接到仓库内不存在的技能。</strong><code>related_skills: [some-user-local-skill]</code> 对你有用,但对其他克隆者会失效。优先只引用仓库内技能。</li>
    </ul>
    <h2>验证清单</h2>
    <ul>
    <li>[ ] 文件位于 <code>skills///SKILL.md</code>(而不是 <code>~/.hermes/skills/</code>)</li>
    <li>[ ] Frontmatter 从第 0 字节开始是 <code>---</code>,并以 <code>---</code> 结束</li>
    <li>[ ] <code>name</code>、<code>description</code>、<code>version</code>、<code>author</code>、<code>license</code>、<code>metadata.hermes.{tags, related_skills}</code> 全部存在</li>
    <li>[ ] name ≤ 64 字符,小写 + 连字符</li>
    <li>[ ] description ≤ 1024 字符且以「Use when ...」开头</li>
    <li>[ ] 文件总长 ≤ 100,000 字符(目标 8-15k)</li>
    <li>[ ] 结构:<code># Title</code> → <code>## Overview</code> → <code>## When to Use</code> → 正文 → <code>## Common Pitfalls</code> → <code>## Verification Checklist</code></li>
    <li>[ ] <code>related_skills</code> 引用的技能在仓库内可解析(或明确允许用户本地)</li>
    <li>[ ] 已在目标分支完成 <code>git add skills/// && git commit</code></li>
    </ul>
        </div>
    
        <!-- Tags -->
    
        <!-- Navigation -->
        <div class="detail-nav">
          <a href="https://agent.eake.cn/2026/05/20/chongdang-php-jieshiqi/" class="detail-nav-link">← 充当 PHP 解…</a>
          <a href="https://agent.eake.cn/2026/05/20/post-617/" class="detail-nav-link">系统化调试 →</a>
        </div>
    
      </div>
    </div>
    
    <style>
    .detail-page { text-align:center; }
    .detail-wrap { max-width:800px; margin:0 auto; text-align:left; }
    
    /* Badge */
    .detail-badge { text-align:center; margin-bottom:10px; }
    .detail-cat-badge {
      display:inline-block; padding:4px 14px; border-radius:20px; font-size:0.78rem;
      background:rgba(0,240,255,0.12); color:#00f0ff; border:1px solid rgba(0,240,255,0.2);
    }
    
    /* Title */
    .detail-title {
      text-align:center; font-size:clamp(1.5rem,4vw,2.2rem); color:#e8e8e8;
      font-weight:700; line-height:1.4; margin-bottom:10px;
    }
    
    /* Meta */
    .detail-meta {
      text-align:center; color:#64748b; font-size:0.85rem; margin-bottom:20px;
      display:flex; justify-content:center; gap:8px; flex-wrap:wrap;
    }
    .detail-meta-dot { color:#334155; }
    
    /* Featured Image */
    .detail-featured {
      text-align:center; margin-bottom:20px;
    }
    .detail-featured img {
      max-width:100%; height:auto; border-radius:12px;
      border:1px solid rgba(255,255,255,0.07);
    }
    
    /* ========== Article Content - 护眼配色 v4 ========== */
    .detail-content {
      color:#e8e8e8;
      line-height:2;
      font-size:1rem;
      max-width:720px;
      margin:0 auto 24px;
    }
    .detail-content h2 {
      color:#e8e8e8;
      font-size:1.3rem;
      font-weight:600;
      margin:32px 0 14px;
      padding-bottom:10px;
      border-bottom:1px solid rgba(168,85,247,0.25);
    }
    .detail-content h3 {
      color:#e8e8e8;
      font-size:1.1rem;
      margin:24px 0 10px;
    }
    .detail-content h4 {
      color:#d8d8d8;
      font-size:1rem;
      margin:20px 0 8px;
    }
    .detail-content p {
      margin-bottom:16px;
    }
    .detail-content ul,
    .detail-content ol {
      margin:0 0 18px 24px;
    }
    .detail-content li {
      margin-bottom:8px;
      line-height:1.8;
    }
    .detail-content code {
      background:rgba(103,232,249,0.06);
      padding:2px 8px;
      border-radius:4px;
      font-size:0.88em;
      color:#67e8f9;
      border:1px solid rgba(103,232,249,0.12);
    }
    .detail-content pre {
      background:rgba(0,0,0,0.5);
      border:1px solid rgba(255,255,255,0.06);
      border-radius:8px;
      padding:16px 20px;
      overflow-x:auto;
      margin-bottom:18px;
      font-size:0.85rem;
      line-height:1.6;
    }
    .detail-content pre code {
      background:none;
      padding:0;
      color:#e8e8e8;
    }
    .detail-content blockquote {
      border-left:3px solid #a855f7;
      margin:0 0 18px;
      padding:12px 20px;
      background:rgba(168,85,247,0.06);
      border-radius:0 6px 6px 0;
      color:#c8c8c8;
      font-style:italic;
    }
    .detail-content a {
      color:#67e8f9;
      text-decoration:none;
    }
    .detail-content a:hover {
      color:#a5f3fc;
      text-decoration:underline;
    }
    .detail-content img {
      display:block;
      width:1024px;
      max-width:100%;
      height:540px;
      object-fit:cover;
      margin:20px auto;
      border-radius:8px;
      border:1px solid rgba(0,240,255,0.15);
    }
    .detail-content table {
      width:100%;
      border-collapse:collapse;
      margin-bottom:18px;
      font-size:0.9rem;
      border:1px solid rgba(255,255,255,0.08);
    }
    .detail-content table th {
      background:rgba(168,85,247,0.1);
      color:#e8e8e8;
      padding:10px 14px;
      text-align:left;
      border:1px solid rgba(255,255,255,0.08);
      font-weight:600;
    }
    .detail-content table td {
      padding:9px 14px;
      border:1px solid rgba(255,255,255,0.06);
      color:#d8d8d8;
    }
    .detail-content table tr:nth-child(even) td {
      background:rgba(255,255,255,0.025);
    }
    .detail-content table tr.table-separator td {
      padding:2px;
      background:none;
      border:none;
    }
    /* ========== End Article Content ========== */
    
    /* Tags */
    .detail-tags {
      text-align:center; margin-bottom:20px;
      display:flex; justify-content:center; gap:8px; flex-wrap:wrap;
    }
    .detail-tag {
      display:inline-block; padding:4px 12px; border-radius:16px; font-size:0.78rem;
      background:rgba(168,85,247,0.1); color:#a855f7; border:1px solid rgba(168,85,247,0.2);
    }
    
    /* Navigation */
    .detail-nav {
      display:flex; justify-content:space-between; align-items:center;
      padding-top:24px; border-top:1px solid rgba(255,255,255,0.07);
      margin-top:8px;
    }
    .detail-nav-link {
      color:#00f0ff; text-decoration:none; font-size:0.88rem;
      max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
      transition:color 0.2s;
    }
    .detail-nav-link:hover { color:#a855f7; }
    
    /* Empty */
    .detail-empty { text-align:center; padding:60px 0; color:#64748b; }
    .detail-empty p { margin-bottom:12px; font-size:1.1rem; }
    
    /* Mobile */
    @media (max-width:768px) {
      .detail-wrap { padding:0 16px; }
      .detail-content { font-size:0.92rem; }
      .detail-title { font-size:1.4rem; }
    }
    
    /* ========== Copy Button for Code Blocks ========== */
    .detail-content pre {
      position: relative;
      padding-top: 36px !important;
    }
    .copy-code-btn {
      position: absolute;
      top: 8px;
      right: 10px;
      background: rgba(168,85,247,0.18);
      border: 1px solid rgba(168,85,247,0.35);
      color: #c084fc;
      padding: 3px 11px;
      font-size: 12px;
      cursor: pointer;
      border-radius: 4px;
      z-index: 10;
      user-select: none;
      transition: all 0.2s;
      font-family: inherit;
    }
    .copy-code-btn:hover {
      background: rgba(168,85,247,0.32);
      color: #e9d5ff;
      border-color: rgba(168,85,247,0.6);
    }
    .copy-code-btn.copied {
      background: rgba(16,185,129,0.2);
      border-color: rgba(16,185,129,0.4);
      color: #6ee7b7;
    }
    
    </style>
    
    
    
        <!-- Comments -->
        <div class="detail-comments">
          <h2 class="detail-comments-title">
            <i class="fa-regular fa-comments"></i>评论区
          </h2>
          
    
    
    	<div id="respond" class="comment-respond">
    		<h3 id="reply-title" class="comment-reply-title">发表评论 <small><a rel="nofollow" id="cancel-comment-reply-link" href="/2026/05/20/claude-code-4/#respond" style="display:none;">取消回复</a></small></h3><form action="https://agent.eake.cn/wp-comments-post.php" method="post" id="commentform" class="comment-form"><p class="comment-form-comment"><label for="comment">评论内容 <span class="required">*</span></label><textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required></textarea></p><p class="comment-form-author"><label for="author">昵称 <span class="required">*</span></label><input id="author" name="author" type="text" value="" size="30" maxlength="245" aria-required="true" required /></p>
    <p class="comment-form-email"><label for="email">邮箱 <span class="required">*</span></label><input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-required="true" required /></p>
    <p class="comment-form-url"><label for="url">网站</label><input id="url" name="url" type="url" value="" size="30" maxlength="200" /></p>
    <p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes" /> <label for="wp-comment-cookies-consent">在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。</label></p>
    <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment" /> <input type='hidden' name='comment_post_ID' value='592' id='comment_post_ID' />
    <input type='hidden' name='comment_parent' id='comment_parent' value='0' />
    </p><p style="display: none !important;" class="akismet-fields-container" data-prefix="ak_"><label>Δ<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="55"/><script>
    document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() );
    </script>
    </p></form>	</div><!-- #respond -->
    	    </div>
    
    
    
    <script>
    document.addEventListener('DOMContentLoaded', function() {
      var pres = document.querySelectorAll('.detail-content pre');
      pres.forEach(function(pre) {
        var btn = document.createElement('button');
        btn.className = 'copy-code-btn';
        btn.textContent = '复制代码';
        btn.onclick = function() {
          var code = pre.querySelector('code');
          var text = code ? code.innerText : pre.innerText;
          navigator.clipboard.writeText(text).then(function() {
            btn.textContent = '已复制 ✓';
            btn.classList.add('copied');
            setTimeout(function() {
              btn.textContent = '复制代码';
              btn.classList.remove('copied');
            }, 2000);
          }).catch(function() {
            btn.textContent = '复制失败';
            setTimeout(function() {
              btn.textContent = '复制代码';
            }, 2000);
          });
        };
        pre.style.position = 'relative';
        pre.insertBefore(btn, pre.firstChild);
      });
    });
    </script>
    
    
    <!-- footer --><footer class="site-footer" style="background:rgba(11,11,26,0.6);border-top:1px solid rgba(0,240,255,0.15);padding:32px 24px 24px;margin-top:48px;"><div class="footer-inner" style="max-width:1200px;margin:0 auto;text-align:center;"><nav class="footer-nav" style="list-style:none;padding:0;margin:0 0 12px;display:flex;justify-content:center;gap:24px;flex-wrap:wrap;"><li id="menu-item-900" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-900"><a href="https://agent.eake.cn/about">关于我们</a></li>
    <li id="menu-item-901" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-901"><a href="https://agent.eake.cn/contact">联系方式</a></li>
    <li id="menu-item-902" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-902"><a href="https://agent.eake.cn/privacy">隐私政策</a></li>
    <a href="https://agent.eake.cn/product-center/">产品中心</a><style>.site-footer a{color:#888;text-decoration:none;font-size:13px;transition:color .2s}.site-footer a:hover{color:#00f0ff}</style></nav><p class="icp" style="text-align:center;font-size:12px;color:#666;margin:5px 0;"><a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow" style="color: #666;">滇ICP备20001752号</a> | 
                <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=53018102000085" target="_blank" rel="nofollow" style="color: #666;">滇公网安备 53018102000085号</a></p><p class="copyright" style="text-align:center;color:#888;font-size:12px;margin:5px 0;">© 2026 亚蓝信息技术有限公司 | 邮箱:eakecn@qq.com</p></div></footer><script type="speculationrules">
    {"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/wp-content/uploads/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/ylan-agent/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]}
    </script>
    <script>
    window.chatModalConfig = {
        ajaxurl: 'https://agent.eake.cn/wp-admin/admin-ajax.php',
        nonce: '8284a9fe11',
        isLoggedIn: false,
        models: [{"name":"AI Agent \u865a\u62df\u4fe1\u7528\u5361","label":"AI Agent \u865a\u62df\u4fe1\u7528\u5361"},{"name":"Claude 3.5 Haiku \u2014 \u6781\u901f\u63a8\u7406\u6a21\u578b","label":"Claude 3.5 Haiku \u2014 \u6781\u901f\u63a8\u7406\u6a21\u578b"},{"name":"Claude 4 Opus and Sonnet 4","label":"Claude 4 Opus and Sonnet 4"},{"name":"Claude Opus 4 \u2014 Anthropic\u6700\u5f3a\u63a8\u7406\u6a21\u578b","label":"Claude Opus 4 \u2014 Anthropic\u6700\u5f3a\u63a8\u7406\u6a21\u578b"},{"name":"Command A \u2014 Cohere \u4f01\u4e1a\u7ea7RAG\u6a21\u578b","label":"Command A \u2014 Cohere \u4f01\u4e1a\u7ea7RAG\u6a21\u578b"},{"name":"DeepSeek R1 \u2014 \u5f00\u6e90\u63a8\u7406\u6a21\u578b","label":"DeepSeek R1 \u2014 \u5f00\u6e90\u63a8\u7406\u6a21\u578b"},{"name":"DeepSeek V4","label":"DeepSeek V4"},{"name":"DeepSeek-R1-0528 \u2014 \u6df1\u5ea6\u63a8\u7406\u5f00\u6e90\u6a21\u578b\u66f4\u65b0","label":"DeepSeek-R1-0528 \u2014 \u6df1\u5ea6\u63a8\u7406\u5f00\u6e90\u6a21\u578b\u66f4\u65b0"},{"name":"Doubao Seed 2.0 Pro \u2014 \u5b57\u8282\u65d7\u8230\u63a8\u7406\u6a21\u578b","label":"Doubao Seed 2.0 Pro \u2014 \u5b57\u8282\u65d7\u8230\u63a8\u7406\u6a21\u578b"},{"name":"Doubao-Seed-1.6-Flash \u2014 \u706b\u5c71\u5f15\u64ce\u6781\u901f\u63a8\u7406\u6a21\u578b","label":"Doubao-Seed-1.6-Flash \u2014 \u706b\u5c71\u5f15\u64ce\u6781\u901f\u63a8\u7406\u6a21\u578b"},{"name":"Gemini 2.0 Flash","label":"Gemini 2.0 Flash"},{"name":"Gemini 2.5 Pro \u2014 Google\u6700\u5f3a\u601d\u8003\u6a21\u578b","label":"Gemini 2.5 Pro \u2014 Google\u6700\u5f3a\u601d\u8003\u6a21\u578b"},{"name":"Gemini 2.5 Pro\/Flash \u2014 Google\u6700\u5f3a\u63a8\u7406\u6a21\u578b","label":"Gemini 2.5 Pro\/Flash \u2014 Google\u6700\u5f3a\u63a8\u7406\u6a21\u578b"},{"name":"Gemini 3.5 Flash \u2014 Google\u6781\u901f\u591a\u6a21\u6001\u6a21\u578b","label":"Gemini 3.5 Flash \u2014 Google\u6781\u901f\u591a\u6a21\u6001\u6a21\u578b"},{"name":"GLM-5.1","label":"GLM-5.1"},{"name":"Google Jules \u4efb\u52a1\u59d4\u6d3e","label":"Google Jules \u4efb\u52a1\u59d4\u6d3e"},{"name":"GPT-4.1 \u2014 OpenAI\u6700\u65b0\u65d7\u8230\u6a21\u578b\u652f\u6301\u767e\u4e07Token","label":"GPT-4.1 \u2014 OpenAI\u6700\u65b0\u65d7\u8230\u6a21\u578b\u652f\u6301\u767e\u4e07Token"},{"name":"GPT-4.1 \u7cfb\u5217 \u2014 \u767e\u4e07\u7ea7\u4e0a\u4e0b\u6587\u7a97\u53e3","label":"GPT-4.1 \u7cfb\u5217 \u2014 \u767e\u4e07\u7ea7\u4e0a\u4e0b\u6587\u7a97\u53e3"},{"name":"GPT-4o \u2014 OpenAI \u65d7\u8230\u591a\u6a21\u6001\u6a21\u578b","label":"GPT-4o \u2014 OpenAI \u65d7\u8230\u591a\u6a21\u6001\u6a21\u578b"},{"name":"GPT-5.5 Instant","label":"GPT-5.5 Instant"},{"name":"Grok 3 \u2014 xAI \u524d\u4ee3\u65d7\u8230\u6a21\u578b","label":"Grok 3 \u2014 xAI \u524d\u4ee3\u65d7\u8230\u6a21\u578b"},{"name":"Grok 4","label":"Grok 4"},{"name":"Kimi K2.6","label":"Kimi K2.6"},{"name":"Kimi K3","label":"Kimi K3"},{"name":"Ling-2.6-1T \u4e07\u4ebf\u53c2\u6570\u6a21\u578b","label":"Ling-2.6-1T \u4e07\u4ebf\u53c2\u6570\u6a21\u578b"},{"name":"Llama 4 Maverick \u2014 Meta \u5f00\u6e90\u591a\u6a21\u6001\u65d7\u8230","label":"Llama 4 Maverick \u2014 Meta \u5f00\u6e90\u591a\u6a21\u6001\u65d7\u8230"},{"name":"Llama 4 Maverick \u2014 Meta\u5f00\u6e90\u591a\u6a21\u6001\u5927\u6a21\u578b","label":"Llama 4 Maverick \u2014 Meta\u5f00\u6e90\u591a\u6a21\u6001\u5927\u6a21\u578b"},{"name":"Llama 4 Scout","label":"Llama 4 Scout"},{"name":"Manus AI \u4efb\u52a1\u59d4\u6d3e","label":"Manus AI \u4efb\u52a1\u59d4\u6d3e"},{"name":"MiniMax-abab","label":"MiniMax-abab"},{"name":"Mistral Large 2 \u5927\u6a21\u578b","label":"Mistral Large 2 \u5927\u6a21\u578b"},{"name":"Mistral Medium 3 \u2014 \u4f01\u4e1a\u7ea7AI\u6a21\u578b","label":"Mistral Medium 3 \u2014 \u4f01\u4e1a\u7ea7AI\u6a21\u578b"},{"name":"Mistral Medium 3 \u2014 \u6b27\u6d32AI\u65d7\u8230\u6a21\u578b","label":"Mistral Medium 3 \u2014 \u6b27\u6d32AI\u65d7\u8230\u6a21\u578b"},{"name":"o3 \u2014 OpenAI \u6df1\u5ea6\u63a8\u7406\u6a21\u578b","label":"o3 \u2014 OpenAI \u6df1\u5ea6\u63a8\u7406\u6a21\u578b"},{"name":"o4-mini \u2014 OpenAI \u8f7b\u91cf\u63a8\u7406\u6a21\u578b","label":"o4-mini \u2014 OpenAI \u8f7b\u91cf\u63a8\u7406\u6a21\u578b"},{"name":"Qwen 3.6","label":"Qwen 3.6"},{"name":"Qwen3 235B-A22B \u2014 MoE\u5f00\u6e90\u65d7\u8230","label":"Qwen3 235B-A22B \u2014 MoE\u5f00\u6e90\u65d7\u8230"},{"name":"Qwen3 235B-A22B \u2014 \u963f\u91ccMoE\u5f00\u6e90\u65d7\u8230","label":"Qwen3 235B-A22B \u2014 \u963f\u91ccMoE\u5f00\u6e90\u65d7\u8230"},{"name":"Qwen3 \u7cfb\u5217 \u2014 \u6df7\u5408\u601d\u7ef4\u5f00\u6e90\u65d7\u8230","label":"Qwen3 \u7cfb\u5217 \u2014 \u6df7\u5408\u601d\u7ef4\u5f00\u6e90\u65d7\u8230"},{"name":"\u591a\u667a\u80fd\u4f53\u793e\u4f1a\u6a21\u62df","label":"\u591a\u667a\u80fd\u4f53\u793e\u4f1a\u6a21\u62df"},{"name":"\u6587\u5fc3\u5927\u6a21\u578b 5.1","label":"\u6587\u5fc3\u5927\u6a21\u578b 5.1"},{"name":"\u8682\u8681 Ring-2.6-1T","label":"\u8682\u8681 Ring-2.6-1T"},{"name":"\u8baf\u98de\u661f\u706b X1 Turbo","label":"\u8baf\u98de\u661f\u706b X1 Turbo"}],
        rateLimit: { used: 0, max: 3 }
    };
    </script><script id="ylan-doubao-model-js-after">
    (function(){
        var MODEL_ID = 'doubao-seed-1-6-flash';
        var MODEL_LABEL = '🫘 豆包 Doubao-Seed-1.6-Flash(轻量)';
    
        // ---------- UI 层:把所有 AI 模型下拉框统一为豆包 ----------
        function makeDoubaoOnly(sel){
            if(!sel || sel.dataset.doubaoOnly) return;
            sel.dataset.doubaoOnly = '1';
            while(sel.options.length > 0){ sel.remove(0); }
            var opt = document.createElement('option');
            opt.value = MODEL_ID;
            opt.textContent = MODEL_LABEL;
            sel.appendChild(opt);
            sel.value = MODEL_ID;
            sel.dispatchEvent(new Event('change', {bubbles: true}));
        }
    
        var MODEL_HINTS = /(qwen|deepseek|doubao|glm|kimi|moonshot|ernie|hunyuan|gpt|claude|gemini|llama|minimax|baichuan|spark|yi-|o1|model)/i;
        function looksLikeModelSelect(sel){
            if(!sel || !sel.options || sel.options.length === 0) return false;
            var name = (sel.id || '') + ' ' + (sel.name || '');
            if(/model/i.test(name)) return true;
            var hits = 0;
            for(var i = 0; i < sel.options.length; i++){
                var v = (sel.options[i].value || '') + ' ' + (sel.options[i].textContent || '');
                if(MODEL_HINTS.test(v)) hits++;
            }
            return hits >= Math.ceil(sel.options.length / 2);
        }
    
        function scanSelects(root){
            var sels = (root || document).querySelectorAll('select');
            for(var i = 0; i < sels.length; i++){
                if(looksLikeModelSelect(sels[i])) makeDoubaoOnly(sels[i]);
            }
        }
    
        // ---------- 请求层兜底:ai_chat 的 model 参数一律改写为豆包 ----------
        function patchNetwork(){
            var rewriteBody = function(body){
                if(!body || typeof body !== 'string') return body;
                if(body.indexOf('model=') === -1) return body;
                return body.replace(/(^|&)model=[^&]*/g, '$1model=' + MODEL_ID);
            };
    
            var ox = XMLHttpRequest.prototype.open;
            XMLHttpRequest.prototype.open = function(m, u){
                this._doubaoUrl = u;
                return ox.apply(this, arguments);
            };
            var os = XMLHttpRequest.prototype.send;
            XMLHttpRequest.prototype.send = function(body){
                try{
                    if(this._doubaoUrl && String(this._doubaoUrl).indexOf('admin-ajax') !== -1 && body && typeof body === 'string'){
                        body = rewriteBody(body);
                        arguments.length ? (arguments[0] = body) : null;
                    }
                }catch(e){}
                return os.apply(this, arguments.length ? arguments : [body]);
            };
    
            if(window.fetch){
                var of = window.fetch;
                window.fetch = function(){
                    var args = arguments;
                    try{
                        var url = String(typeof args[0] === 'string' ? args[0] : (args[0] && args[0].url));
                        if(url.indexOf('admin-ajax') !== -1 && args[1] && args[1].body){
                            var b = args[1].body;
                            if(typeof b === 'string'){
                                args[1].body = rewriteBody(b);
                            } else if(b && typeof b.get === 'function' && b.get('model')){
                                b.set('model', MODEL_ID);
                            }
                        }
                    }catch(e){}
                    return of.apply(this, args);
                };
            }
        }
    
        function boot(){
            patchNetwork();
            scanSelects(document);
            var mo = new MutationObserver(function(){ scanSelects(document); });
            mo.observe(document.documentElement, {childList: true, subtree: true});
            var tries = 0;
            var timer = setInterval(function(){
                tries++;
                scanSelects(document);
                if(tries > 100){ clearInterval(timer); }
            }, 1000);
        }
    
        if(document.readyState === 'loading'){
            document.addEventListener('DOMContentLoaded', boot);
        } else {
            boot();
        }
    })();
    //# sourceURL=ylan-doubao-model-js-after
    </script>
    <script id="visitor-tracker-js-after">
    jQuery(document).ready(function() {
            var startTime = Date.now();
            var currentPage = window.location.href;
            var referrer = document.referrer || '';
    
            // 首次访问记录(仅一次)
            jQuery.post('https://agent.eake.cn/wp-admin/admin-ajax.php', {
                'action': 'log_visitor_duration',
                'nonce': 'a3a218a696',
                'page': currentPage,
                'referrer': referrer,
                'duration': 0,
                'is_pv': 0
            });
    
            // PV轨迹:页面可见时记录
            var pvLogged = false;
            var logPV = function() {
                if (!pvLogged) {
                    pvLogged = true;
                    jQuery.post('https://agent.eake.cn/wp-admin/admin-ajax.php', {
                        'action': 'log_visitor_duration',
                        'nonce': 'a3a218a696',
                        'page': currentPage,
                        'referrer': referrer,
                        'duration': 0,
                        'is_pv': 1
                    });
                }
            };
            if (document.readyState === 'complete') logPV();
            else window.addEventListener('load', logPV);
    
            // 离开时更新停留时长
            jQuery(window).on('beforeunload', function() {
                var duration = Math.floor((Date.now() - startTime) / 1000);
                var data = {
                    'action': 'log_visitor_duration',
                    'nonce': 'a3a218a696',
                    'page': currentPage,
                    'referrer': referrer,
                    'duration': duration,
                    'is_pv': 0
                };
                if (navigator.sendBeacon) {
                    var blob = new Blob([jQuery.param(data)], {'type': 'application/x-www-form-urlencoded'});
                    navigator.sendBeacon('https://agent.eake.cn/wp-admin/admin-ajax.php', blob);
                }
            });
        });
        
    //# sourceURL=visitor-tracker-js-after
    </script>
    <script id="ylan-agent-js-js" src="https://agent.eake.cn/wp-content/themes/ylan-agent/agent.js?ver=1.0.0"></script>
    <script id="marked-js-js" src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
    <script id="hljs-js-js" src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>
    <script id="chat-modal-js-js" src="https://agent.eake.cn/wp-content/themes/ylan-agent/chat-modal.js?ver=20260502v1"></script>
    <script id="wp-emoji-settings" type="application/json">
    {"baseUrl":"https://s.w.org/images/core/emoji/17.0.2/72x72/","ext":".png","svgUrl":"https://s.w.org/images/core/emoji/17.0.2/svg/","svgExt":".svg","source":{"concatemoji":"https://agent.eake.cn/wp-includes/js/wp-emoji-release.min.js?ver=7.1"}}
    </script>
    <script type="module">
    /*! This file is auto-generated */
    var e="script#wp-emoji-settings",t=document.querySelector(e);if(!(t instanceof HTMLScriptElement))throw new Error("Element missing: "+e);const r=JSON.parse(t.text),s=(window._wpemojiSettings=r,"wpEmojiSettingsSupports"),o=["flag","emoji"];function i(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(s,JSON.stringify(t))}catch(e){}}function c(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0);const r=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);return t.every((e,t)=>e===r[t])}function p(e,t){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var n=e.getImageData(16,16,1,1);for(let e=0;e<n.data.length;e++)if(0!==n.data[e])return!1;return!0}function u(e,t,n,r){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\udde8\ud83c\uddf6","\ud83c\udde8\u200b\ud83c\uddf6")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!r(e,"\ud83e\u1fac8")}return!1}function f(e,t,n,r){let a;const s=(a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):document.createElement("canvas")).getContext("2d",{willReadFrequently:!0}),o=(s.textBaseline="top",s.font="600 32px Arial",{});return e.forEach(e=>{o[e]=t(s,e,n,r)}),o}function a(e){var t=document.createElement("script");t.src=e,t.defer=!0,document.head.appendChild(t)}r.supports={everything:!0,everythingExceptFlag:!0},new Promise(t=>{let n=function(){try{var e=JSON.parse(sessionStorage.getItem(s));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(o),u.toString(),c.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"});const a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=e=>{i(n=e.data),a.terminate(),t(n)})}catch(e){}i(n=f(o,u,c,p))}t(n)}).then(e=>{for(const n in e)r.supports[n]=e[n],r.supports.everything=r.supports.everything&&r.supports[n],"flag"!==n&&(r.supports.everythingExceptFlag=r.supports.everythingExceptFlag&&r.supports[n]);var t;r.supports.everythingExceptFlag=r.supports.everythingExceptFlag&&!r.supports.flag,r.supports.everything||((t=r.source||{}).concatemoji?a(t.concatemoji):t.wpemoji&&t.twemoji&&(a(t.twemoji),a(t.wpemoji)))});
    //# sourceURL=https://agent.eake.cn/wp-includes/js/wp-emoji-loader.min.js
    </script>
    </body></html>