[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G0D8D1AMEAW1FXRBY6VHSQ":3,"skill-same:01M6G0D8D1AMEAW1FXRBY6VHSQ":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6G0D8D1AMEAW1FXRBY6VHSQ","self-improvement",null,"Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpoiley\u002Fwhatisxlistening-to\u002Fskills\u002Fself-improving-agent\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"self improvement","self","user","requests","errors","operation","learnings","task","use","recurring","review","command","tool","knowledge","continuous improvement","api","tasks","2026-11-10 10:12:30",false,"---\nname: self-improvement\ndescription: \"Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.\"\n---\n\n# Self-Improvement Skill\n\nLog learnings and errors to markdown files for continuous improvement. Coding agents can later process these into fixes, and important learnings get promoted to project memory.\n\n## Quick Reference\n\n| Situation | Action |\n|-----------|--------|\n| Command\u002Foperation fails | Log to `.learnings\u002FERRORS.md` |\n| User corrects you | Log to `.learnings\u002FLEARNINGS.md` with category `correction` |\n| User wants missing feature | Log to `.learnings\u002FFEATURE_REQUESTS.md` |\n| API\u002Fexternal tool fails | Log to `.learnings\u002FERRORS.md` with integration details |\n| Knowledge was outdated | Log to `.learnings\u002FLEARNINGS.md` with category `knowledge_gap` |\n| Found better approach | Log to `.learnings\u002FLEARNINGS.md` with category `best_practice` |\n| Similar to existing entry | Link with `**See Also**`, consider priority bump |\n| Broadly applicable learning | Promote to `CLAUDE.md`, `AGENTS.md`, and\u002For `.github\u002Fcopilot-instructions.md` |\n\n## Setup\n\nCreate `.learnings\u002F` directory in project root if it doesn't exist:\n\n```bash\nmkdir -p .learnings\n```\n\nCopy templates from `assets\u002F` or create files with headers.\n\n## Logging Format\n\n### Learning Entry\n\nAppend to `.learnings\u002FLEARNINGS.md`:\n\n```markdown\n## [LRN-YYYYMMDD-XXX] category\n\n**Logged**: ISO-8601 timestamp\n**Priority**: low | medium | high | critical\n**Status**: pending\n**Area**: frontend | backend | infra | tests | docs | config\n\n### Summary\nOne-line description of what was learned\n\n### Details\nFull context: what happened, what was wrong, what's correct\n\n### Suggested Action\nSpecific fix or improvement to make\n\n### Metadata\n- Source: conversation | error | user_feedback\n- Related Files: path\u002Fto\u002Ffile.ext\n- Tags: tag1, tag2\n- See Also: LRN-20250110-001 (if related to existing entry)\n\n---\n```\n\n### Error Entry\n\nAppend to `.learnings\u002FERRORS.md`:\n\n```markdown\n## [ERR-YYYYMMDD-XXX] skill_or_command_name\n\n**Logged**: ISO-8601 timestamp\n**Priority**: high\n**Status**: pending\n**Area**: frontend | backend | infra | tests | docs | config\n\n### Summary\nBrief description of what failed\n\n### Error\n```\nActual error message or output\n```\n\n### Context\n- Command\u002Foperation attempted\n- Input or parameters used\n- Environment details if relevant\n\n### Suggested Fix\nIf identifiable, what might resolve this\n\n### Metadata\n- Reproducible: yes | no | unknown\n- Related Files: path\u002Fto\u002Ffile.ext\n- See Also: ERR-20250110-001 (if recurring)\n\n---\n```\n\n### Feature Request Entry\n\nAppend to `.learnings\u002FFEATURE_REQUESTS.md`:\n\n```markdown\n## [FEAT-YYYYMMDD-XXX] capability_name\n\n**Logged**: ISO-8601 timestamp\n**Priority**: medium\n**Status**: pending\n**Area**: frontend | backend | infra | tests | docs | config\n\n### Requested Capability\nWhat the user wanted to do\n\n### User Context\nWhy they needed it, what problem they're solving\n\n### Complexity Estimate\nsimple | medium | complex\n\n### Suggested Implementation\nHow this could be built, what it might extend\n\n### Metadata\n- Frequency: first_time | recurring\n- Related Features: existing_feature_name\n\n---\n```\n\n## ID Generation\n\nFormat: `TYPE-YYYYMMDD-XXX`\n- TYPE: `LRN` (learning), `ERR` (error), `FEAT` (feature)\n- YYYYMMDD: Current date\n- XXX: Sequential number or random 3 chars (e.g., `001`, `A7B`)\n\nExamples: `LRN-20250115-001`, `ERR-20250115-A3F`, `FEAT-20250115-002`\n\n## Resolving Entries\n\nWhen an issue is fixed, update the entry:\n\n1. Change `**Status**: pending` → `**Status**: resolved`\n2. Add resolution block after Metadata:\n\n```markdown\n### Resolution\n- **Resolved**: 2025-01-16T09:00:00Z\n- **Commit\u002FPR**: abc123 or #42\n- **Notes**: Brief description of what was done\n```\n\nOther status values:\n- `in_progress` - Actively being worked on\n- `wont_fix` - Decided not to address (add reason in Resolution notes)\n- `promoted` - Elevated to CLAUDE.md, AGENTS.md, or .github\u002Fcopilot-instructions.md\n\n## Promoting to Project Memory\n\nWhen a learning is broadly applicable (not a one-off fix), promote it to permanent project memory.\n\n### When to Promote\n\n- Learning applies across multiple files\u002Ffeatures\n- Knowledge any contributor (human or AI) should know\n- Prevents recurring mistakes\n- Documents project-specific conventions\n\n### Promotion Targets\n\n| Target | What Belongs There |\n|--------|-------------------|\n| `CLAUDE.md` | Project facts, conventions, gotchas for all Claude interactions |\n| `AGENTS.md` | Agent-specific workflows, tool usage patterns, automation rules |\n| `.github\u002Fcopilot-instructions.md` | Project context and conventions for GitHub Copilot |\n\n### How to Promote\n\n1. **Distill** the learning into a concise rule or fact\n2. **Add** to appropriate section in target file (create file if needed)\n3. **Update** original entry:\n   - Change `**Status**: pending` → `**Status**: promoted`\n   - Add `**Promoted**: CLAUDE.md`, `AGENTS.md`, or `.github\u002Fcopilot-instructions.md`\n\n### Promotion Examples\n\n**Learning** (verbose):\n> Project uses pnpm workspaces. Attempted `npm install` but failed. \n> Lock file is `pnpm-lock.yaml`. Must use `pnpm install`.\n\n**In CLAUDE.md** (concise):\n```markdown\n## Build & Dependencies\n- Package manager: pnpm (not npm) - use `pnpm install`\n```\n\n**Learning** (verbose):\n> When modifying API endpoints, must regenerate TypeScript client.\n> Forgetting this causes type mismatches at runtime.\n\n**In AGENTS.md** (actionable):\n```markdown\n## After API Changes\n1. Regenerate client: `pnpm run generate:api`\n2. Check for type errors: `pnpm tsc --noEmit`\n```\n\n## Recurring Pattern Detection\n\nIf logging something similar to an existing entry:\n\n1. **Search first**: `grep -r \"keyword\" .learnings\u002F`\n2. **Link entries**: Add `**See Also**: ERR-20250110-001` in Metadata\n3. **Bump priority** if issue keeps recurring\n4. **Consider systemic fix**: Recurring issues often indicate:\n   - Missing documentation (→ promote to CLAUDE.md or .github\u002Fcopilot-instructions.md)\n   - Missing automation (→ add to AGENTS.md)\n   - Architectural problem (→ create tech debt ticket)\n\n## Periodic Review\n\nReview `.learnings\u002F` at natural breakpoints:\n\n### When to Review\n- Before starting a new major task\n- After completing a feature\n- When working in an area with past learnings\n- Weekly during active development\n\n### Quick Status Check\n```bash\n# Count pending items\ngrep -h \"Status\\*\\*: pending\" .learnings\u002F*.md | wc -l\n\n# List pending high-priority items\ngrep -B5 \"Priority\\*\\*: high\" .learnings\u002F*.md | grep \"^## \\[\"\n\n# Find learnings for a specific area\ngrep -l \"Area\\*\\*: backend\" .learnings\u002F*.md\n```\n\n### Review Actions\n- Resolve fixed items\n- Promote applicable learnings\n- Link related entries\n- Escalate recurring issues\n\n## Detection Triggers\n\nAutomatically log when you notice:\n\n**Corrections** (→ learning with `correction` category):\n- \"No, that's not right...\"\n- \"Actually, it should be...\"\n- \"You're wrong about...\"\n- \"That's outdated...\"\n\n**Feature Requests** (→ feature request):\n- \"Can you also...\"\n- \"I wish you could...\"\n- \"Is there a way to...\"\n- \"Why can't you...\"\n\n**Knowledge Gaps** (→ learning with `knowledge_gap` category):\n- User provides information you didn't know\n- Documentation you referenced is outdated\n- API behavior differs from your understanding\n\n**Errors** (→ error entry):\n- Command returns non-zero exit code\n- Exception or stack trace\n- Unexpected output or behavior\n- Timeout or connection failure\n\n## Priority Guidelines\n\n| Priority | When to Use |\n|----------|-------------|\n| `critical` | Blocks core functionality, data loss risk, security issue |\n| `high` | Significant impact, affects common workflows, recurring issue |\n| `medium` | Moderate impact, workaround exists |\n| `low` | Minor inconvenience, edge case, nice-to-have |\n\n## Area Tags\n\nUse to filter learnings by codebase region:\n\n| Area | Scope |\n|------|-------|\n| `frontend` | UI, components, client-side code |\n| `backend` | API, services, server-side code |\n| `infra` | CI\u002FCD, deployment, Docker, cloud |\n| `tests` | Test files, testing utilities, coverage |\n| `docs` | Documentation, comments, READMEs |\n| `config` | Configuration files, environment, settings |\n\n## Best Practices\n\n1. **Log immediately** - context is freshest right after the issue\n2. **Be specific** - future agents need to understand quickly\n3. **Include reproduction steps** - especially for errors\n4. **Link related files** - makes fixes easier\n5. **Suggest concrete fixes** - not just \"investigate\"\n6. **Use consistent categories** - enables filtering\n7. **Promote aggressively** - if in doubt, add to CLAUDE.md or .github\u002Fcopilot-instructions.md\n8. **Review regularly** - stale learnings lose value\n\n## Gitignore Options\n\n**Keep learnings local** (per-developer):\n```gitignore\n.learnings\u002F\n```\n\n**Track learnings in repo** (team-wide):\nDon't add to .gitignore - learnings become shared knowledge.\n\n**Hybrid** (track templates, ignore entries):\n```gitignore\n.learnings\u002F*.md\n!.learnings\u002F.gitkeep\n```\n\n## Hook Integration\n\nEnable automatic reminders through agent hooks. This is **opt-in** - you must explicitly configure hooks.\n\n### Quick Setup (Claude Code \u002F Codex)\n\nCreate `.claude\u002Fsettings.json` in your project:\n\n```json\n{\n  \"hooks\": {\n    \"UserPromptSubmit\": [{\n      \"matcher\": \"\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \".\u002Fskills\u002Fself-improvement\u002Fscripts\u002Factivator.sh\"\n      }]\n    }]\n  }\n}\n```\n\nThis injects a learning evaluation reminder after each prompt (~50-100 tokens overhead).\n\n### Full Setup (With Error Detection)\n\n```json\n{\n  \"hooks\": {\n    \"UserPromptSubmit\": [{\n      \"matcher\": \"\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \".\u002Fskills\u002Fself-improvement\u002Fscripts\u002Factivator.sh\"\n      }]\n    }],\n    \"PostToolUse\": [{\n      \"matcher\": \"Bash\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \".\u002Fskills\u002Fself-improvement\u002Fscripts\u002Ferror-detector.sh\"\n      }]\n    }]\n  }\n}\n```\n\n### Available Hook Scripts\n\n| Script | Hook Type | Purpose |\n|--------|-----------|---------|\n| `scripts\u002Factivator.sh` | UserPromptSubmit | Reminds to evaluate learnings after tasks |\n| `scripts\u002Ferror-detector.sh` | PostToolUse (Bash) | Triggers on command errors |\n\nSee `references\u002Fhooks-setup.md` for detailed configuration and troubleshooting.\n\n## Automatic Skill Extraction\n\nWhen a learning is valuable enough to become a reusable skill, extract it using the provided helper.\n\n### Skill Extraction Criteria\n\nA learning qualifies for skill extraction when ANY of these apply:\n\n| Criterion | Description |\n|-----------|-------------|\n| **Recurring** | Has `See Also` links to 2+ similar issues |\n| **Verified** | Status is `resolved` with working fix |\n| **Non-obvious** | Required actual debugging\u002Finvestigation to discover |\n| **Broadly applicable** | Not project-specific; useful across codebases |\n| **User-flagged** | User says \"save this as a skill\" or similar |\n\n### Extraction Workflow\n\n1. **Identify candidate**: Learning meets extraction criteria\n2. **Run helper** (or create manually):\n   ```bash\n   .\u002Fskills\u002Fself-improvement\u002Fscripts\u002Fextract-skill.sh skill-name --dry-run\n   .\u002Fskills\u002Fself-improvement\u002Fscripts\u002Fextract-skill.sh skill-name\n   ```\n3. **Customize SKILL.md**: Fill in template with learning content\n4. **Update learning**: Set status to `promoted_to_skill`, add `Skill-Path`\n5. **Verify**: Read skill in fresh session to ensure it's self-contained\n\n### Manual Extraction\n\nIf you prefer manual creation:\n\n1. Create `skills\u002F\u003Cskill-name>\u002FSKILL.md`\n2. Use template from `assets\u002FSKILL-TEMPLATE.md`\n3. Follow [Agent Skills spec](https:\u002F\u002Fagentskills.io\u002Fspecification):\n   - YAML frontmatter with `name` and `description`\n   - Name must match folder name\n   - No README.md inside skill folder\n\n### Extraction Detection Triggers\n\nWatch for these signals that a learning should become a skill:\n\n**In conversation:**\n- \"Save this as a skill\"\n- \"I keep running into this\"\n- \"This would be useful for other projects\"\n- \"Remember this pattern\"\n\n**In learning entries:**\n- Multiple `See Also` links (recurring issue)\n- High priority + resolved status\n- Category: `best_practice` with broad applicability\n- User feedback praising the solution\n\n### Skill Quality Gates\n\nBefore extraction, verify:\n\n- [ ] Solution is tested and working\n- [ ] Description is clear without original context\n- [ ] Code examples are self-contained\n- [ ] No project-specific hardcoded values\n- [ ] Follows skill naming conventions (lowercase, hyphens)\n\n## Multi-Agent Support\n\nThis skill works across different AI coding agents with agent-specific activation.\n\n### Claude Code\n\n**Activation**: Hooks (UserPromptSubmit, PostToolUse)\n**Setup**: `.claude\u002Fsettings.json` with hook configuration\n**Detection**: Automatic via hook scripts\n\n### Codex CLI\n\n**Activation**: Hooks (same pattern as Claude Code)\n**Setup**: `.codex\u002Fsettings.json` with hook configuration\n**Detection**: Automatic via hook scripts\n\n### GitHub Copilot\n\n**Activation**: Manual (no hook support)\n**Setup**: Add to `.github\u002Fcopilot-instructions.md`:\n\n```markdown\n## Self-Improvement\n\nAfter solving non-obvious issues, consider logging to `.learnings\u002F`:\n1. Use format from self-improvement skill\n2. Link related entries with See Also\n3. Promote high-value learnings to skills\n\nAsk in chat: \"Should I log this as a learning?\"\n```\n\n**Detection**: Manual review at session end\n\n### Agent-Agnostic Guidance\n\nRegardless of agent, apply self-improvement when you:\n\n1. **Discover something non-obvious** - solution wasn't immediate\n2. **Correct yourself** - initial approach was wrong\n3. **Learn project conventions** - discovered undocumented patterns\n4. **Hit unexpected errors** - especially if diagnosis was difficult\n5. **Find better approaches** - improved on your original solution\n\n### Copilot Chat Integration\n\nFor Copilot users, add this to your prompts when relevant:\n\n> After completing this task, evaluate if any learnings should be logged to `.learnings\u002F` using the self-improvement skill format.\n\nOr use quick prompts:\n- \"Log this to learnings\"\n- \"Create a skill from this solution\"\n- \"Check .learnings\u002F for related issues\"\n","# Self-Improvement Skill\n\nLog learnings and errors to markdown files for continuous improvement. Coding agents can later process these into fixes, and important learnings get promoted to project memory.\n\n## Quick Reference\n\n| Situation | Action |\n|-----------|--------|\n| Command\u002Foperation fails | Log to `.learnings\u002FERRORS.md` |\n| User corrects you | Log to `.learnings\u002FLEARNINGS.md` with category `correction` |\n| User wants missing feature | Log to `.learnings\u002FFEATURE_REQUESTS.md` |\n| API\u002Fexternal tool fails | Log to `.learnings\u002FERRORS.md` with integration details |\n| Knowledge was outdated | Log to `.learnings\u002FLEARNINGS.md` with category `knowledge_gap` |\n| Found better approach | Log to `.learnings\u002FLEARNINGS.md` with category `best_practice` |\n| Similar to existing entry | Link with `**See Also**`, consider priority bump |\n| Broadly applicable learning | Promote to `CLAUDE.md`, `AGENTS.md`, and\u002For `.github\u002Fcopilot-instructions.md` |\n\n## Setup\n\nCreate `.learnings\u002F` directory in project root if it doesn't exist:\n\n```bash\nmkdir -p .learnings\n```\n\nCopy templates from `assets\u002F` or create files with headers.\n\n## Logging Format\n\n### Learning Entry\n\nAppend to `.learnings\u002FLEARNINGS.md`:\n\n```markdown\n## [LRN-YYYYMMDD-XXX] category\n\n**Logged**: ISO-8601 timestamp\n**Priority**: low | medium | high | critical\n**Status**: pending\n**Area**: frontend | backend | infra | tests | docs | config\n\n### Summary\nOne-line description of what was learned\n\n### Details\nFull context: what happened, what was wrong, what's correct\n\n### Suggested Action\nSpecific fix or improvement to make\n\n### Metadata\n- Source: conversation | error | user_feedback\n- Related Files: path\u002Fto\u002Ffile.ext\n- Tags: tag1, tag2\n- See Also: LRN-20250110-001 (if related to existing entry)\n\n---\n```\n\n### Error Entry\n\nAppend to `.learnings\u002FERRORS.md`:\n\n```markdown\n## [ERR-YYYYMMDD-XXX] skill_or_command_name\n\n**Logged**: ISO-8601 timestamp\n**Priority**: high\n**Status**: pending\n**Area**: frontend | backend | infra | tests | docs | config\n\n### Summary\nBrief description of what failed\n\n### Error\n```\nActual error message or output\n```\n\n### Context\n- Command\u002Foperation attempted\n- Input or parameters used\n- Environment details if relevant\n\n### Suggested Fix\nIf identifiable, what might resolve this\n\n### Metadata\n- Reproducible: yes | no | unknown\n- Related Files: path\u002Fto\u002Ffile.ext\n- See Also: ERR-20250110-001 (if recurring)\n\n---\n```\n\n### Feature Request Entry\n\nAppend to `.learnings\u002FFEATURE_REQUESTS.md`:\n\n```markdown\n## [FEAT-YYYYMMDD-XXX] capability_name\n\n**Logged**: ISO-8601 timestamp\n**Priority**: medium\n**Status**: pending\n**Area**: frontend | backend | infra | tests | docs | config\n\n### Requested Capability\nWhat the user wanted to do\n\n### User Context\nWhy they needed it, what problem they're solving\n\n### Complexity Estimate\nsimple | medium | complex\n\n### Suggested Implementation\nHow this could be built, what it might extend\n\n### Metadata\n- Frequency: first_time | recurring\n- Related Features: existing_feature_name\n\n---\n```\n\n## ID Generation\n\nFormat: `TYPE-YYYYMMDD-XXX`\n- TYPE: `LRN` (learning), `ERR` (error), `FEAT` (feature)\n- YYYYMMDD: Current date\n- XXX: Sequential number or random 3 chars (e.g., `001`, `A7B`)\n\nExamples: `LRN-20250115-001`, `ERR-20250115-A3F`, `FEAT-20250115-002`\n\n## Resolving Entries\n\nWhen an issue is fixed, update the entry:\n\n1. Change `**Status**: pending` → `**Status**: resolved`\n2. Add resolution block after Metadata:\n\n```markdown\n### Resolution\n- **Resolved**: 2025-01-16T09:00:00Z\n- **Commit\u002FPR**: abc123 or #42\n- **Notes**: Brief description of what was done\n```\n\nOther status values:\n- `in_progress` - Actively being worked on\n- `wont_fix` - Decided not to address (add reason in Resolution notes)\n- `promoted` - Elevated to CLAUDE.md, AGENTS.md, or .github\u002Fcopilot-instructions.md\n\n## Promoting to Project Memory\n\nWhen a learning is broadly applicable (not a one-off fix), promote it to permanent project memory.\n\n### When to Promote\n\n- Learning applies across multiple files\u002Ffeatures\n- Knowledge any contributor (human or AI) should know\n- Prevents recurring mistakes\n- Documents project-specific conventions\n\n### Promotion Targets\n\n| Target | What Belongs There |\n|--------|-------------------|\n| `CLAUDE.md` | Project facts, conventions, gotchas for all Claude interactions |\n| `AGENTS.md` | Agent-specific workflows, tool usage patterns, automation rules |\n| `.github\u002Fcopilot-instructions.md` | Project context and conventions for GitHub Copilot |\n\n### How to Promote\n\n1. **Distill** the learning into a concise rule or fact\n2. **Add** to appropriate section in target file (create file if needed)\n3. **Update** original entry:\n   - Change `**Status**: pending` → `**Status**: promoted`\n   - Add `**Promoted**: CLAUDE.md`, `AGENTS.md`, or `.github\u002Fcopilot-instructions.md`\n\n### Promotion Examples\n\n**Learning** (verbose):\n> Project uses pnpm workspaces. Attempted `npm install` but failed. \n> Lock file is `pnpm-lock.yaml`. Must use `pnpm install`.\n\n**In CLAUDE.md** (concise):\n```markdown\n## Build & Dependencies\n- Package manager: pnpm (not npm) - use `pnpm install`\n```\n\n**Learning** (verbose):\n> When modifying API endpoints, must regenerate TypeScript client.\n> Forgetting this causes type mismatches at runtime.\n\n**In AGENTS.md** (actionable):\n```markdown\n## After API Changes\n1. Regenerate client: `pnpm run generate:api`\n2. Check for type errors: `pnpm tsc --noEmit`\n```\n\n## Recurring Pattern Detection\n\nIf logging something similar to an existing entry:\n\n1. **Search first**: `grep -r \"keyword\" .learnings\u002F`\n2. **Link entries**: Add `**See Also**: ERR-20250110-001` in Metadata\n3. **Bump priority** if issue keeps recurring\n4. **Consider systemic fix**: Recurring issues often indicate:\n   - Missing documentation (→ promote to CLAUDE.md or .github\u002Fcopilot-instructions.md)\n   - Missing automation (→ add to AGENTS.md)\n   - Architectural problem (→ create tech debt ticket)\n\n## Periodic Review\n\nReview `.learnings\u002F` at natural breakpoints:\n\n### When to Review\n- Before starting a new major task\n- After completing a feature\n- When working in an area with past learnings\n- Weekly during active development\n\n### Quick Status Check\n```bash\n# Count pending items\ngrep -h \"Status\\*\\*: pending\" .learnings\u002F*.md | wc -l\n\n# List pending high-priority items\ngrep -B5 \"Priority\\*\\*: high\" .learnings\u002F*.md | grep \"^## \\[\"\n\n# Find learnings for a specific area\ngrep -l \"Area\\*\\*: backend\" .learnings\u002F*.md\n```\n\n### Review Actions\n- Resolve fixed items\n- Promote applicable learnings\n- Link related entries\n- Escalate recurring issues\n\n## Detection Triggers\n\nAutomatically log when you notice:\n\n**Corrections** (→ learning with `correction` category):\n- \"No, that's not right...\"\n- \"Actually, it should be...\"\n- \"You're wrong about...\"\n- \"That's outdated...\"\n\n**Feature Requests** (→ feature request):\n- \"Can you also...\"\n- \"I wish you could...\"\n- \"Is there a way to...\"\n- \"Why can't you...\"\n\n**Knowledge Gaps** (→ learning with `knowledge_gap` category):\n- User provides information you didn't know\n- Documentation you referenced is outdated\n- API behavior differs from your understanding\n\n**Errors** (→ error entry):\n- Command returns non-zero exit code\n- Exception or stack trace\n- Unexpected output or behavior\n- Timeout or connection failure\n\n## Priority Guidelines\n\n| Priority | When to Use |\n|----------|-------------|\n| `critical` | Blocks core functionality, data loss risk, security issue |\n| `high` | Significant impact, affects common workflows, recurring issue |\n| `medium` | Moderate impact, workaround exists |\n| `low` | Minor inconvenience, edge case, nice-to-have |\n\n## Area Tags\n\nUse to filter learnings by codebase region:\n\n| Area | Scope |\n|------|-------|\n| `frontend` | UI, components, client-side code |\n| `backend` | API, services, server-side code |\n| `infra` | CI\u002FCD, deployment, Docker, cloud |\n| `tests` | Test files, testing utilities, coverage |\n| `docs` | Documentation, comments, READMEs |\n| `config` | Configuration files, environment, settings |\n\n## Best Practices\n\n1. **Log immediately** - context is freshest right after the issue\n2. **Be specific** - future agents need to understand quickly\n3. **Include reproduction steps** - especially for errors\n4. **Link related files** - makes fixes easier\n5. **Suggest concrete fixes** - not just \"investigate\"\n6. **Use consistent categories** - enables filtering\n7. **Promote aggressively** - if in doubt, add to CLAUDE.md or .github\u002Fcopilot-instructions.md\n8. **Review regularly** - stale learnings lose value\n\n## Gitignore Options\n\n**Keep learnings local** (per-developer):\n```gitignore\n.learnings\u002F\n```\n\n**Track learnings in repo** (team-wide):\nDon't add to .gitignore - learnings become shared knowledge.\n\n**Hybrid** (track templates, ignore entries):\n```gitignore\n.learnings\u002F*.md\n!.learnings\u002F.gitkeep\n```\n\n## Hook Integration\n\nEnable automatic reminders through agent hooks. This is **opt-in** - you must explicitly configure hooks.\n\n### Quick Setup (Claude Code \u002F Codex)\n\nCreate `.claude\u002Fsettings.json` in your project:\n\n```json\n{\n  \"hooks\": {\n    \"UserPromptSubmit\": [{\n      \"matcher\": \"\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \".\u002Fskills\u002Fself-improvement\u002Fscripts\u002Factivator.sh\"\n      }]\n    }]\n  }\n}\n```\n\nThis injects a learning evaluation reminder after each prompt (~50-100 tokens overhead).\n\n### Full Setup (With Error Detection)\n\n```json\n{\n  \"hooks\": {\n    \"UserPromptSubmit\": [{\n      \"matcher\": \"\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \".\u002Fskills\u002Fself-improvement\u002Fscripts\u002Factivator.sh\"\n      }]\n    }],\n    \"PostToolUse\": [{\n      \"matcher\": \"Bash\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \".\u002Fskills\u002Fself-improvement\u002Fscripts\u002Ferror-detector.sh\"\n      }]\n    }]\n  }\n}\n```\n\n### Available Hook Scripts\n\n| Script | Hook Type | Purpose |\n|--------|-----------|---------|\n| `scripts\u002Factivator.sh` | UserPromptSubmit | Reminds to evaluate learnings after tasks |\n| `scripts\u002Ferror-detector.sh` | PostToolUse (Bash) | Triggers on command errors |\n\nSee `references\u002Fhooks-setup.md` for detailed configuration and troubleshooting.\n\n## Automatic Skill Extraction\n\nWhen a learning is valuable enough to become a reusable skill, extract it using the provided helper.\n\n### Skill Extraction Criteria\n\nA learning qualifies for skill extraction when ANY of these apply:\n\n| Criterion | Description |\n|-----------|-------------|\n| **Recurring** | Has `See Also` links to 2+ similar issues |\n| **Verified** | Status is `resolved` with working fix |\n| **Non-obvious** | Required actual debugging\u002Finvestigation to discover |\n| **Broadly applicable** | Not project-specific; useful across codebases |\n| **User-flagged** | User says \"save this as a skill\" or similar |\n\n### Extraction Workflow\n\n1. **Identify candidate**: Learning meets extraction criteria\n2. **Run helper** (or create manually):\n   ```bash\n   .\u002Fskills\u002Fself-improvement\u002Fscripts\u002Fextract-skill.sh skill-name --dry-run\n   .\u002Fskills\u002Fself-improvement\u002Fscripts\u002Fextract-skill.sh skill-name\n   ```\n3. **Customize SKILL.md**: Fill in template with learning content\n4. **Update learning**: Set status to `promoted_to_skill`, add `Skill-Path`\n5. **Verify**: Read skill in fresh session to ensure it's self-contained\n\n### Manual Extraction\n\nIf you prefer manual creation:\n\n1. Create `skills\u002F\u003Cskill-name>\u002FSKILL.md`\n2. Use template from `assets\u002FSKILL-TEMPLATE.md`\n3. Follow [Agent Skills spec](https:\u002F\u002Fagentskills.io\u002Fspecification):\n   - YAML frontmatter with `name` and `description`\n   - Name must match folder name\n   - No README.md inside skill folder\n\n### Extraction Detection Triggers\n\nWatch for these signals that a learning should become a skill:\n\n**In conversation:**\n- \"Save this as a skill\"\n- \"I keep running into this\"\n- \"This would be useful for other projects\"\n- \"Remember this pattern\"\n\n**In learning entries:**\n- Multiple `See Also` links (recurring issue)\n- High priority + resolved status\n- Category: `best_practice` with broad applicability\n- User feedback praising the solution\n\n### Skill Quality Gates\n\nBefore extraction, verify:\n\n- [ ] Solution is tested and working\n- [ ] Description is clear without original context\n- [ ] Code examples are self-contained\n- [ ] No project-specific hardcoded values\n- [ ] Follows skill naming conventions (lowercase, hyphens)\n\n## Multi-Agent Support\n\nThis skill works across different AI coding agents with agent-specific activation.\n\n### Claude Code\n\n**Activation**: Hooks (UserPromptSubmit, PostToolUse)\n**Setup**: `.claude\u002Fsettings.json` with hook configuration\n**Detection**: Automatic via hook scripts\n\n### Codex CLI\n\n**Activation**: Hooks (same pattern as Claude Code)\n**Setup**: `.codex\u002Fsettings.json` with hook configuration\n**Detection**: Automatic via hook scripts\n\n### GitHub Copilot\n\n**Activation**: Manual (no hook support)\n**Setup**: Add to `.github\u002Fcopilot-instructions.md`:\n\n```markdown\n## Self-Improvement\n\nAfter solving non-obvious issues, consider logging to `.learnings\u002F`:\n1. Use format from self-improvement skill\n2. Link related entries with See Also\n3. Promote high-value learnings to skills\n\nAsk in chat: \"Should I log this as a learning?\"\n```\n\n**Detection**: Manual review at session end\n\n### Agent-Agnostic Guidance\n\nRegardless of agent, apply self-improvement when you:\n\n1. **Discover something non-obvious** - solution wasn't immediate\n2. **Correct yourself** - initial approach was wrong\n3. **Learn project conventions** - discovered undocumented patterns\n4. **Hit unexpected errors** - especially if diagnosis was difficult\n5. **Find better approaches** - improved on your original solution\n\n### Copilot Chat Integration\n\nFor Copilot users, add this to your prompts when relevant:\n\n> After completing this task, evaluate if any learnings should be logged to `.learnings\u002F` using the self-improvement skill format.\n\nOr use quick prompts:\n- \"Log this to learnings\"\n- \"Create a skill from this solution\"\n- \"Check .learnings\u002F for related issues\"\n",{"name":5,"description":7},"main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fpoiley\u002Fwhatisxlistening-to\u002Fskills\u002Fself-improving-agent",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add kbarbel640-del\u002Fskills --skill self-improvement",{"tool":58,"command":59},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill self-improvement",{"tool":61,"command":62},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill self-improvement","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpoiley\u002Fwhatisxlistening-to\u002Fskills\u002Fself-improving-agent\u002FSKILL.md",true,[],[67,96,120,141,147,167],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":78,"publishedAt":40},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[73],{"categoryNo":74,"categoryName":75,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[79,80,38,81,82,83,84,85,86,87,88,35,89,90,91,92,93,94,95],"crowd prompting","prompting","with","tokens","domain","world","prompts","operations","instructions","text","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":103,"publishedAt":40},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[102],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[104,38,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,85,31],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":129,"publishedAt":40},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[126],{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",[130,131,132,133,134,135,136,81,137,118,31,138,38,139,140],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":142,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":146,"publishedAt":40},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[145],{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},[133,132,131,130,140,135,136,81,134,118,31,137,138,38,139],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":40},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[154,155,156,157,158,159,160,161,162,163,164,165,166],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":177,"publishedAt":40},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[173,174],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":175,"categoryName":176,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000037","律师与法务",[178,179,180,181,81,182,183,45,184,138,185,186,187,188,189,93,190,191,192],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]