Create 技能验证
- 作者仓库星标 0
- 作者仓库 skills-registry
Create Copilot Instructions File
Use this skill only when adding a new instruction file for a file type or workflow that currently lacks coverage. For updates to existing files, edit directly.
When to Use This Skill
✅ Use when:
- A new file type is introduced (e.g., first Python script in a C repo)
- A new workflow requires file-scoped rules (e.g., InSpec tests added)
- Existing instruction coverage has a measurable gap
❌ Do NOT use when:
- The file type already has an instruction file — edit it directly
- The rule applies project-wide — add to
copilot-instructions.mdinstead - Only 1-2 files of this type exist — avoid premature abstraction
Workflow
Check for existing coverage.
ls -1 .github/instructions/*.instructions.mdRead
.github/instructions/copilot-customization.instructions.mdoverlap precedence matrix.Survey the target files. Identify patterns, conventions, and existing style in the files you're writing instructions for.
Draft minimal frontmatter.
--- description: 'Brief description of what these instructions cover' applyTo: 'glob/pattern/**/*.ext' ---Test the glob pattern matches intended files:
# Bash glob test shopt -s globstar nullglob files=( glob/pattern/**/*.ext ) printf '%s\n' "${files[@]}"Write actionable rules.
- Be concrete: "Use
sodium_memzero()beforefree()for secret buffers" - Not vague: "Handle memory safely"
- Include code examples for DO and DON'T patterns
- Be concrete: "Use
Validate against SSOT. Confirm the new file follows
.github/instructions/copilot-customization.instructions.mdschema and doesn't conflict with existing overlap precedence rules.Run validation.
scripts/validate-copilot-config.sh
Naming Convention
<topic>.instructions.md where <topic> is lowercase, hyphen-separated, and describes the file type or workflow.
Examples from this repository:
c-memory-safety.instructions.mdcmocka-testing.instructions.mdgnu-autotools.instructions.mdsbom.instructions.md
Required Frontmatter
Refer to .github/instructions/copilot-customization.instructions.md for the authoritative schema. At minimum:
description:(quoted string, one line)applyTo:(comma-separated glob patterns)
Anti-Patterns
- Creating instruction files for domains not present in the repo
- Duplicating rules from existing instruction files
- Writing instructions for a single file (use inline comments instead)
- Including implementation code (instructions define conventions, not solutions)
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: CTFfactory/salt — distributed by TomeVault.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 ✅ Use when: A new file type is introduced (e.g., first Python script in a C repo) A new workflow requires file-scoped rules (e.g., InSpec tests added)
Check for existing coverage. Read .github/instructions/copilot-customization.instructions.md overlap precedence matrix. Survey the target files.
<topic>.instructions.md where <topic> is lowercase, hyphen-separated, and describes the file type or workflow. Examples from this repository: c-memory-safety.instructions.md
Refer to .github/instructions/copilot-customization.instructions.md for the authoritative schema. At minimum: description: (quoted string, one line) applyTo: (comma-separated glob patterns)
Creating instruction files for domains not present in the repo Duplicating rules from existing instruction files Writing instructions for a single file (use inline comments instead)
# Create Copilot Instructions File
Use this skill only when adding a **new** instruction file for a file type or workflow that currently lacks coverage. For updates to existing files, edit directly.
## When to Use This Skill
✅ Use when:
- A new file type is introduced (e.g., first Python script in a C repo)
- A new workflow requires file-scoped rules (e.g., InSpec tests added)
- Existing instruction coverage has a measurable gap
❌ Do NOT use when:
- The file type already has an instruction file — edit it directly
- The rule applies project-wide — add to `copilot-instructions.md` instead
- Only 1-2 files of this type exist — avoid premature abstraction
## Workflow
1. **Check for existing coverage.**
```sh
ls -1 .github/instructions/*.instructions.md
```
Read `.github/instructions/copilot-customization.instructions.md` overlap precedence matrix.
2. **Survey the target files.**
Identify patterns, conventions, and existing style in the files you're writing instructions for.
3. **Draft minimal frontmatter.**
```yaml
---
description: 'Brief description of what these instructions cover'
applyTo: 'glob/pattern/**/*.ext'
---
```
Test the glob pattern matches intended files:
```sh
# Bash glob test
shopt -s globstar nullglob
files=( glob/pattern/**/*.ext )
printf '%s\n' "${files[@]}"
```
4. **Write actionable rules.**
- Be concrete: "Use `sodium_memzero()` before `free()` for secret buffers"
- Not vague: "Handle memory safely"
- Include code examples for DO and DON'T patterns
5. **Validate against SSOT.**
Confirm the new file follows `.github/instructions/copilot-customization.instructions.md` schema and doesn't conflict with existing overlap precedence rules.
6. **Run validation.**
```sh
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> When to Use This Skill → Workflow → Naming Convention → Required Frontmatter → Anti-Patterns
要点 -> new · Check for existing coverage. · Survey the target files. · Draft minimal frontmatter. · Write actionable rules. · Validate against SSOT. · Run validation.
文件/命令 -> copilot-instructions.md · .github/instructions/copilot-customization.instructions.md · sodiummemzero() · free() · <topic>.instructions.md · <topic> · c-memory-safety.instructions.md · cmocka-testing.instructions.md
内容 SHA-256 -> f841bac7a79d
方法与流程
适用与边界
原文中的明确线索
copilot-instructions.md、.github/instructions/copilot-customization.instructions.md、sodiummemzero()、free()、<topic>.instructions.md、<topic>、c-memory-safety.instructions.md、cmocka-testing.instructions.md