feat: 增加搜索功能的代码过滤选项,支持排除特定文件扩展名和仅返回代码文件

This commit is contained in:
catlog22
2026-01-06 23:19:47 +08:00
parent ef770ff29b
commit 1298fdd20f
5 changed files with 131 additions and 31 deletions

View File

@@ -2,9 +2,20 @@
用于生成新 Skill 入口文件的模板。
## 模板结构
## ⚠️ 重要YAML Front Matter 规范
> **CRITICAL**: SKILL.md 文件必须以 YAML front matter 开头,即以 `---` 作为文件第一行。
>
> **禁止**使用以下格式:
> - `# Title` 然后 `## Metadata` + yaml 代码块 ❌
> - 任何在 `---` 之前的内容 ❌
>
> **正确格式**:文件第一行必须是 `---`
## 可直接应用的模板
以下是完整的 SKILL.md 模板。生成时**直接复制应用**,将 `{{变量}}` 替换为实际值:
```markdown
---
name: {{skill_name}}
description: {{description}}. Triggers on {{triggers}}.
@@ -33,9 +44,9 @@ allowed-tools: {{allowed_tools}}
\`\`\`javascript
const timestamp = new Date().toISOString().slice(0,19).replace(/[-:T]/g, '');
const workDir = `{{output_location}}`;
const workDir = \`{{output_location}}\`;
Bash(`mkdir -p "${workDir}"`);
Bash(\`mkdir -p "\${workDir}"\`);
{{additional_dirs}}
\`\`\`
@@ -48,7 +59,8 @@ Bash(`mkdir -p "${workDir}"`);
## Reference Documents
{{reference_table}}
```
---
## 变量说明