Using Agent Skills
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
Agent skill
by davidYichengWei in davidYichengWei/agentic-engineering-framework
Turns mistakes you correct into proposed updates to persistent Rules and Skills so the same error does not recur in later sessions, triggered automatically or with /reflect.
SKILL.md written in Chinese; this summary is our English description.
$ npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install davidYichengWei/agentic-engineering-framework self-refinement --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/self-refinement .claude/skills/self-refinement && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "self-refinement" agent skill from https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinement into .claude/skills/self-refinement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-refinement", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinementType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install davidYichengWei/agentic-engineering-framework self-refinement --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/self-refinement .agents/skills/self-refinement && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "self-refinement" agent skill from https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinement into .agents/skills/self-refinement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-refinement", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install davidYichengWei/agentic-engineering-framework self-refinement --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/self-refinement .cursor/skills/self-refinement && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "self-refinement" agent skill from https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinement into .cursor/skills/self-refinement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-refinement", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/davidYichengWei/agentic-engineering-framework.git --path skills/self-refinement--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install davidYichengWei/agentic-engineering-framework self-refinement --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/self-refinement .gemini/skills/self-refinement && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "self-refinement" agent skill from https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinement into .gemini/skills/self-refinement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-refinement", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install davidYichengWei/agentic-engineering-framework self-refinementInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/self-refinement .github/skills/self-refinement && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "self-refinement" agent skill from https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinement into .github/skills/self-refinement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-refinement", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install davidYichengWei/agentic-engineering-framework self-refinement --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/self-refinement .opencode/skills/self-refinement && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "self-refinement" agent skill from https://github.com/davidYichengWei/agentic-engineering-framework/tree/main/skills/self-refinement into .opencode/skills/self-refinement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-refinement", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
self-refinementTurns mistakes you correct into proposed updates to persistent Rules and Skills so the same error does not recur in later sessions, triggered automatically or with /reflect.
A model keeps no memory across sessions, so a mistake corrected in one session can reappear in the next. This skill moves the lesson into persistent context. It triggers in two ways: automatically when you correct the agent in a pattern-like way, in which case it finishes the current correction first and then appends at most three lightweight suggestions to the end of its reply, or manually with `/reflect`, which reviews the whole conversation for corrected mistake patterns.
Each case follows one loop. The agent identifies the wrong output, the intended direction and the gap, diagnoses the root cause as a missing rule, missing knowledge, a skipped workflow step or a wrong thinking pattern, searches existing Rules and Skills to decide between amending and creating, and writes a suggestion naming the cause and target file. Nothing is changed without your confirmation; you can accept all suggestions or pick some. A reference file holds typical examples.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 1f7ac0f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Self-Refinement from Corrections loads about 575 tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 153 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from davidYichengWei/agentic-engineering-framework at commit 1f7ac0f, republished under its MIT licence (© davidYichengWei). 153 words, ~575 tokens.
.claude/skills/self-refinement/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.从错误中构建反馈闭环:将非结构化的错误经验转化为结构化的持久化上下文(Rules/Skills),防止同类错误在新会话中重复发生。
原理:LLM 没有跨会话的持久记忆——会话 A 中被纠正的错误,在会话 B 中会以相同概率再次发生。唯一的解法是将错误经验外化为持久化的上下文。
触发条件:AI 在协作过程中被用户纠正(用户否定了 AI 的输出并给出了正确方向)。
行为:
输出格式:
---
💡 **经验沉淀建议**
刚才的纠正揭示了一个可沉淀的模式:
- **错误模式**:[简述 AI 犯的错]
- **根因**:[规范缺失 / 知识缺失 / 流程遗漏 / 模式错误]
- **建议**:[更新 Rule/Skill 的具体操作]
是否需要我执行?(回复"沉淀"执行,或忽略继续当前工作)设计原则:
触发条件:用户通过 /reflect Command 主动发起。
行为:
无论自动还是手动触发,共享同一个核心流程:
回顾对话中 AI 被纠正的场景,提取:
| 根因类别 | 定义 | 典型表现 |
|---|---|---|
| 规范缺失 | 现有 Rules/Skills 中没有覆盖该场景 | AI 不知道项目的特定约定 |
| 知识缺失 | AI 缺少项目特定的领域知识 | AI 对某个模块的行为/限制不了解 |
| 流程遗漏 | Workflow Skill 中缺少关键步骤或检查点 | AI 跳过了应有的验证步骤 |
| 模式错误 | AI 应用了错误的思维模式 | AI 用类比代替第一性原理推导 |
搜索现有 Skills 和 Rules:
每条建议包含:
### 建议 N: [简短标题]
- **根因**:[规范缺失 / 知识缺失 / 流程遗漏 / 模式错误]
- **目标文件**:`[Rules/Skills 文件路径]`
- **操作**:[新建 / 在 X 位置添加 / 修改 Y 内容]
- **具体内容**:[要添加或修改的具体文本]
建议数量:≤ 3 条。多于 3 条时,按影响范围排序取 Top 3。
以上是本次经验沉淀建议,请选择:
- **全部执行** → 我将依次执行所有建议
- **选择执行** → 告诉我执行哪几条(如"执行 1 和 3")
- **跳过** → 不执行任何建议用户确认后,更新现有文件或创建新文件,并写入对应的 Rules/Skills 更新内容。
| 规则 | 说明 |
|---|---|
| 建议优先 | 不自主执行任何 Rules/Skills 修改,必须经用户确认 |
| 不打断 | 自动触发时,建议附在回复末尾,不打断当前工作流 |
| 轻量化 | 自动触发时,建议控制在 3 条以内,每条不超过 5 行 |
| 可追溯 | 每条建议明确标注根因类别和目标文件 |
| 不重复 | 执行前检索现有 Rules/Skills,避免重复添加相似规则 |
| ❌ 错误做法 | ✅ 正确做法 |
|---|---|
| 被纠正后立即修改 Rules/Skills | 先完成当前任务,再提建议 |
| 输出冗长分析 / 建议过于宽泛 | 每条建议 ≤ 5 行,具体到文件和内容 |
| 自主执行变更 / 打断工作流 | 等用户确认;附在回复末尾 |
© davidYichengWei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/self-refinement of davidYichengWei/agentic-engineering-framework.
Open the folder on GitHubat commit 1f7ac0f
Self-Refinement from Corrections next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Self-Refinement from Corrections this skilldavidYichengWei/agentic-engineering-framework | 158 | — | ~575 | Automated safety check: Pass | MIT | |
| Using Agent Skillsaddyosmani/agent-skills | 102k | 4 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Task Observerrebelytics/one-skill-to-rule-them-all | 3.2k | 1 repos | ~12k | Automated safety check: Pass | CC-BY-4.0 | |
| SkillOpt Sleep Cyclemicrosoft/SkillOpt | 18k | — | ~2.3k | Automated safety check: Pass | MIT | |
| CLAUDE.md Improveranthropics/claude-plugins-official | 37k | 5 repos | ~1.5k | Automated safety check: Pass | Apache-2.0 |
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
rebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities.
microsoft/SkillOpt
Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.
anthropics/claude-plugins-official
Finds every CLAUDE.md file in a repository, scores each against quality criteria, shows a report, then makes targeted updates after you approve.
microsoft/SkillOpt
Runs a nightly or on-demand sleep cycle for a local Codex agent: review past sessions, replay recurring tasks and stage validated skill and memory edits for adoption.
davidYichengWei/agentic-engineering-framework
Gives architecture design principles for system design discussions and code review: module boundaries, dependency direction, data ownership and interface rules, plus a checklist.
davidYichengWei/agentic-engineering-framework
A checklist of language-neutral rules for writing and reviewing code: naming, function design, control flow, resource safety, comments and logging.
davidYichengWei/agentic-engineering-framework
Chinese-language checklists for component-level design: class and module structure, public interfaces, data models, concurrency and error handling.
davidYichengWei/agentic-engineering-framework
Chinese-language guide to writing and improving SKILL.md files: frontmatter rules, concise writing, progressive disclosure, common patterns and a pre-release checklist.
davidYichengWei/agentic-engineering-framework
Diagnoses compile errors, runtime exceptions, failing tests, pipeline failures and production alerts from code and logs, giving a root cause before any fix.
davidYichengWei/agentic-engineering-framework
代码文件修改的统一入口。当用户请求任何代码变更(新功能、优化、Bug 修复、重构)时必须首先调用此 skill。仅适用于代码文件(如 .cc/.cpp/.h/.go/.py 等),修改 .md 等非代码文件时不需要调用。它会评估复杂度、检查 spec.md、生成 tasks.md、并逐个任务执行。
Categories
Turns mistakes you correct into proposed updates to persistent Rules and Skills so the same error does not recur in later sessions, triggered automatically or with /reflect. A model keeps no memory across sessions, so a mistake corrected in one session can reappear in the next. This skill moves the lesson into persistent context.
Self-Refinement from Corrections fits situations like: the agent repeats a mistake you already corrected in an earlier session; reviewing a conversation to capture lessons as rules or skill updates; deciding whether a correction belongs in a Rule, a Skill or project knowledge.
Run `npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a claude-code`. Or copy the skill folder (skills/self-refinement in davidYichengWei/agentic-engineering-framework) into .claude/skills/self-refinement in your project. Claude Code loads it when a task matches its description.
Run `npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a codex`. Or copy the skill folder (skills/self-refinement in davidYichengWei/agentic-engineering-framework) into .agents/skills/self-refinement in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davidYichengWei/agentic-engineering-framework --skill self-refinement -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-refinement, .gemini/skills/self-refinement, .github/skills/self-refinement and .opencode/skills/self-refinement in your project.
SKILL.md names no scripts, command-line tools or credentials: Self-Refinement from Corrections is instructions for the agent only. Our summary lists: A project with Rules or Skills files the agent can update.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Self-Refinement from Corrections is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 575 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Self-Refinement from Corrections: Using Agent Skills (addyosmani/agent-skills, 102k stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars), Task Observer (rebelytics/one-skill-to-rule-them-all, 3.2k stars) and SkillOpt Sleep Cycle (microsoft/SkillOpt, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
davidYichengWei (a GitHub user) maintains it in davidYichengWei/agentic-engineering-framework, which has 158 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on March 25, 2026.
Source: davidYichengWei/agentic-engineering-framework on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.