Agent Skillsrohitg00/pro-workflow › learn-rule

learn-rule

GitHub

用于捕获并持久化学习规则。当用户要求记住教训或发生错误时,自动识别问题、分类并格式化规则,经用户确认后存入记忆,支持按Wiki范围限制规则作用域。

skills/learn-rule/SKILL.md rohitg00/pro-workflow

Trigger Scenarios

用户说'remember this'、'add to rules'等指令 系统或用户识别出具体错误后

Install

npx skills add rohitg00/pro-workflow --skill learn-rule -g -y
More Options

Use without installing

npx skills use rohitg00/pro-workflow@learn-rule

指定 Agent (Claude Code)

npx skills add rohitg00/pro-workflow --skill learn-rule -a claude-code -g -y

安装 repo 全部 skill

npx skills add rohitg00/pro-workflow --all -g -y

预览 repo 内 skill

npx skills add rohitg00/pro-workflow --list

SKILL.md

Frontmatter
{
    "name": "learn-rule",
    "description": "Capture a correction or lesson as a persistent learning rule with category, mistake, and correction. Stores, categorises, and retrieves rules for future sessions. Use after mistakes or when the user says \"remember this\", \"don't forget\", \"note this\", or \"learn from this\".",
    "user-invocable": true
}

Learn Rule

Capture a lesson from the current session into permanent memory.

Trigger

Use when the user says "remember this", "add to rules", "don't do that again", or after a mistake is identified.

Workflow

  1. Identify the lesson — what mistake was made? What should happen instead?
  2. Format the rule with full context.
  3. Propose the addition and wait for user approval.
  4. After approval, persist to LEARNED section or project memory.

Format

[LEARN] Category: One-line rule
Mistake: What went wrong
Correction: How it was fixed

Wiki-scoped rules

Append Wiki: <slug> to bind the rule to a single pro-workflow wiki. The rule loads only when that wiki is in scope, avoiding cross-project pollution:

[LEARN] Editing: Cite a sources.md row before adding any wiki claim.
Wiki: agent-memory

The capture hook auto-detects Wiki: <slug> and links the learning to that wiki via learnings_wiki.

Categories

Category Examples
Navigation File paths, finding code, wrong file edited
Editing Code changes, patterns, wrong approach
Testing Test approaches, coverage gaps, flaky tests
Git Commits, branches, merge issues
Quality Lint, types, style violations
Context When to clarify, missing requirements
Architecture Design decisions, wrong abstractions
Performance Optimization, O(n^2) loops, memory

Example

Recent mistake: Edited wrong utils.ts file

[LEARN] Navigation: Confirm full path when multiple files share a name.

Add to LEARNED section? (y/n)

Guardrails

  • Always wait for user approval before persisting.
  • Keep rules to one line — specific and actionable.
  • Bad: "Write good code". Good: "Always use snake_case for database columns".
  • Include the mistake context so the rule makes sense later.

Output

  • The proposed [LEARN] rule with category
  • Confirmation after persisting

Version History

  • 7f7209d Current 2026-07-24 11:40

Same Skill Collection

skills/agent-teams/SKILL.md
skills/auto-setup/SKILL.md
skills/batch-orchestration/SKILL.md
skills/bug-capture/SKILL.md
skills/compact-guard/SKILL.md
skills/context-engineering/SKILL.md
skills/context-optimizer/SKILL.md
skills/cost-tracker/SKILL.md
skills/design-engineering/SKILL.md
skills/deslop/SKILL.md
skills/domain-modeling/SKILL.md
skills/file-watcher/SKILL.md
skills/improve-architecture/SKILL.md
skills/insights/SKILL.md
skills/llm-council/SKILL.md
skills/llm-gate/SKILL.md
skills/mcp-audit/SKILL.md
skills/orchestrate/SKILL.md
skills/parallel-worktrees/SKILL.md
skills/permission-tuner/SKILL.md
skills/plan-interrogate/SKILL.md
skills/replay-learnings/SKILL.md
skills/safe-mode/SKILL.md
skills/session-handoff/SKILL.md
skills/skill-router/SKILL.md
skills/smart-commit/SKILL.md
skills/sprint-status/SKILL.md
skills/tdd/SKILL.md
skills/thoroughness-scoring/SKILL.md
skills/token-efficiency/SKILL.md
skills/wiki-builder/SKILL.md
skills/wiki-query/SKILL.md
skills/wiki-research-loop/SKILL.md
skills/wiki-viewer/SKILL.md
skills/wrap-up/SKILL.md
skills/writing-guidelines/SKILL.md
skills/pro-workflow/SKILL.md
skills/skill-optimizer/SKILL.md
skills/survey-generator/SKILL.md

Metadata

Files
0
Version
7f7209d
Hash
f24dbc4d
Indexed
2026-07-24 11:40

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 00:34
浙ICP备14020137号-1 $Гость$