Agent SkillsasJEI/vscode › update-skills

update-skills

GitHub

用于在会话中发现重大模式、陷阱或领域知识时,将其捕获为持久化的技能或指令。适用于用户要求学习、发现需调试的约束或识别未文档化的可复用知识场景。

src/vs/sessions/skills/update-skills/SKILL.md asJEI/vscode

触发场景

用户明确说 learn! 发现显著的模式或约束 识别到未文档化的可复用领域知识 用户纠正揭示通用原则

安装

npx skills add asJEI/vscode --skill update-skills -g -y
更多选项

非标准路径

npx skills add https://github.com/asJEI/vscode/tree/main/src/vs/sessions/skills/update-skills -g -y

不安装直接使用

npx skills use asJEI/vscode@update-skills

指定 Agent (Claude Code)

npx skills add asJEI/vscode --skill update-skills -a claude-code -g -y

安装 repo 全部 skill

npx skills add asJEI/vscode --all -g -y

预览 repo 内 skill

npx skills add asJEI/vscode --list

SKILL.md

Frontmatter
{
    "name": "update-skills",
    "description": "Create or update repository skills and instructions when major learnings are discovered during a session. Use when the user says \"learn!\", when a significant pattern or pitfall is identified, or when reusable domain knowledge should be captured for future sessions."
}

Update Skills & Instructions

When a major repository learning is discovered — a recurring pattern, a non-obvious pitfall, a crucial architectural constraint, or domain knowledge that would save future sessions significant time — capture it as a skill or instruction so it persists across sessions.

When to Use

  • The user explicitly says "learn!" or asks to capture a learning
  • You discover a significant pattern or constraint that cost meaningful debugging time
  • You identify reusable domain knowledge that isn't documented anywhere in the repo
  • A correction from the user reveals a general principle worth preserving

Decision: Skill vs Instruction vs Learning

Add a learning to an existing instruction when:

  • The insight is small (1-4 sentences) and fits naturally into an existing instruction file
  • It refines or extends an existing guideline
  • Follow the pattern in .github/instructions/learnings.instructions.md

Create or update a skill (.github/skills/{name}/SKILL.md or .agents/skills/{name}/SKILL.md) when:

  • The knowledge is substantial (multi-step procedure, detailed guidelines, or rich examples)
  • It covers a distinct domain area (e.g., "how to debug X", "patterns for Y")
  • Future sessions should be able to invoke it by name

Create or update an instruction (.github/instructions/{name}.instructions.md) when:

  • The rule should apply automatically based on file patterns (applyTo) or globally
  • It's a coding convention, architectural constraint, or process rule
  • It doesn't need to be invoked on demand

Procedure

1. Identify the Learning

Reflect on what went wrong or what was discovered:

  • What was the problem or unexpected behavior?
  • Why was it a problem? (root cause, not symptoms)
  • How was it fixed or what's the correct approach?
  • Can it be generalized beyond this specific instance?

2. Check for Existing Files

Before creating new files, search for existing skills and instructions that might be the right home:

# Check existing skills
ls .github/skills/ .agents/skills/ 2>/dev/null

# Check existing instructions
ls .github/instructions/ 2>/dev/null

# Search for related content
grep -r "related-keyword" .github/skills/ .github/instructions/ .agents/skills/

3a. Add to Existing File

If an appropriate file exists, add the learning to its ## Learnings section (create the section if it doesn't exist). Each learning should be 1-4 sentences.

3b. Create a New Skill

If the knowledge warrants a standalone skill:

  1. Choose the location:
    • .github/skills/{name}/SKILL.md for project-level skills (committed to repo)
    • .agents/skills/{name}/SKILL.md for agent-specific skills
  2. Create the directory and SKILL.md with frontmatter:
---
name: {skill-name}
description: {One-line description of when and why to use this skill.}
---

# {Skill Title}

{Body with guidelines, procedures, examples, and learnings.}
  1. The name field must match the parent folder name exactly.
  2. Include concrete examples — skills with examples are far more useful than abstract rules.

3c. Create a New Instruction

If the knowledge should apply automatically:

---
description: {When these instructions should be loaded}
applyTo: '{glob pattern}' # optional — auto-load when matching files are attached
---

{Content of the instruction.}

4. Quality Checks

Before saving:

  • Is the learning general enough to help future sessions, not just this one?
  • Is it specific enough to be actionable, not just a vague principle?
  • Does it include a concrete example of right vs wrong?
  • Does it avoid duplicating knowledge already captured elsewhere?
  • Is the description clear enough that the agent will know when to invoke/apply it?

5. Inform the User

After creating or updating the file:

  • Summarize what was captured and where
  • Explain why this location was chosen
  • Note if any existing content was updated vs new content created

版本历史

  • ce4db66 当前 2026-07-19 08:58

同 Skill 集合

.agents/skills/launch/SKILL.md
.github/skills/accessibility/SKILL.md
.github/skills/add-policy/SKILL.md
.github/skills/agent-host-e2e-tests/SKILL.md
.github/skills/agent-host-logs/SKILL.md
.github/skills/author-contributions/SKILL.md
.github/skills/auto-perf-optimize/SKILL.md
.github/skills/azure-pipelines/SKILL.md
.github/skills/chat-customizations-editor/SKILL.md
.github/skills/chat-perf/SKILL.md
.github/skills/code-oss-logs/SKILL.md
.github/skills/component-fixtures/SKILL.md
.github/skills/cpu-profile-analysis/SKILL.md
.github/skills/design-philosophy/SKILL.md
.github/skills/fix-ci-failures/SKILL.md
.github/skills/fix-errors/SKILL.md
.github/skills/heap-snapshot-analysis/SKILL.md
.github/skills/hygiene/SKILL.md
.github/skills/integrated-browser/SKILL.md
.github/skills/integration-tests/SKILL.md
.github/skills/memory-leak-audit/SKILL.md
.github/skills/otel/SKILL.md
.github/skills/sessions/SKILL.md
.github/skills/smoke-tests/SKILL.md
.github/skills/symbolicate-crash-dump/SKILL.md
.github/skills/tool-rename-deprecation/SKILL.md
.github/skills/unit-tests/SKILL.md
.github/skills/update-screenshots/SKILL.md
.github/skills/ux-css-layout/SKILL.md
.github/skills/ux-theming/SKILL.md
.github/skills/vscode-dev-workbench/SKILL.md
extensions/copilot/.agents/skills/anthropic-sdk-upgrader/SKILL.md
extensions/copilot/.agents/skills/launch/SKILL.md
src/vs/sessions/skills/act-on-feedback/SKILL.md
src/vs/sessions/skills/code-review/SKILL.md
src/vs/sessions/skills/commit/SKILL.md
src/vs/sessions/skills/create-draft-pr/SKILL.md
src/vs/sessions/skills/create-pr/SKILL.md
src/vs/sessions/skills/fix-ci/SKILL.md
src/vs/sessions/skills/generate-run-commands/SKILL.md
src/vs/sessions/skills/merge/SKILL.md
src/vs/sessions/skills/sync-upstream/SKILL.md
src/vs/sessions/skills/sync/SKILL.md
src/vs/sessions/skills/troubleshoot/SKILL.md
src/vs/sessions/skills/update-pr/SKILL.md
extensions/copilot/.agents/skills/github-copilot-upgrader/SKILL.md

元信息

文件数
0
版本
ce4db66
Hash
f5c7bb3e
收录时间
2026-07-19 08:58

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 10:09
浙ICP备14020137号-1 $访客地图$