Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问clear审计异常

learn学习

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

903

周安装

38

GitHub Stars

6

下载量

316
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:learn(学习)
来源仓库:https://github.com/duc01226/easyplatform
仓库路径:skills/learn
安装命令:
npx skills add https://github.com/duc01226/easyplatform --skill learn
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/duc01226/easyplatform --skill learn

简介

learn 技能用于前端开发中的页面、组件及样式逻辑的生成与维护。

  • 支持 React、Next.js、Vue 等主流框架,兼容 Tailwind 和 CSS 样式设计。
  • 需结合现有项目结构使用,避免生成脱离上下文的孤立代码片段。
  • 涉及页面修改时应配合本地预览确保实际效果符合预期。
  • learn 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

[IMPORTANT] Use TaskCreate to break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ATTENTION ask user whether to skip.

Quick Summary

Goal: Teach Claude lessons that persist across sessions by saving to the most relevant reference doc.

Workflow:

  1. Capture -- Identify the lesson from user instruction or experience
  2. Route -- Analyze lesson content against Reference Doc Catalog, select best target file
  3. Save -- Append lesson to the selected file
  4. Confirm -- Acknowledge what was saved and where
  5. Enhance -- Run /prompt-enhance on modified file(s) to optimize AI attention anchoring

Key Rules:

  • Triggers on "remember this", "always do X", "never do Y"
  • Smart-route to the most relevant file, NOT always docs/project-reference/lessons.md
  • Check for existing entries before creating duplicates
  • Confirm target file with user before writing

Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).

Usage

Add a lesson

/learn always use the validation framework fluent API instead of throwing ValidationException
/learn never call external APIs in command handlers - use Entity Event Handlers
/learn prefer async/await over .then() chains

List lessons

/learn list

Remove a lesson

/learn remove 3

Clear all lessons

/learn clear

Reference Doc Catalog (READ before routing)

Each docs/project-reference/ file is auto-initialized by session-init-docs.cjs hook and populated by /scan-* skills. Understanding their roles is critical for correct routing.

FileRole & ContentInjected ByInjection TriggerScan Skill
project-structure-reference.mdArchitecture, directory tree, tech stack, module registry, service mapsubagent-init.cjsAgent spawn/scan-project-structure
backend-patterns-reference.mdBackend/hook patterns: CJS modules, CQRS, repositories, validation, message bus, background jobscode-patterns-injector.cjs, backend-context.cjsEdit/Write backend files/scan-backend-patterns
frontend-patterns-reference.mdFrontend patterns: components, state mgmt, API services, styling conventions, directivescode-patterns-injector.cjs, frontend-context.cjsEdit/Write frontend files/scan-frontend-patterns
integration-test-reference.mdTest architecture: base classes, fixtures, helpers, service-specific setup, test runnersReferenced in configTest file edits/scan-integration-tests
feature-docs-reference.mdFeature doc templates, app-to-service mapping, doc structure conventionsOn-demand (skill reads)Skill activation/scan-feature-docs
code-review-rules.mdReview rules, conventions, anti-patterns, decision trees, checklistscode-review-rules-injector.cjsReview skill activation/scan-code-review-rules
lessons.mdGeneral lessons — fallback catch-all. Injected on EVERY prompt (budget-controlled)prompt-injections.cjsEvery UserPromptSubmit + Edit/WriteManaged by /learn
scss-styling-guide.mdSCSS/CSS: BEM methodology, mixins, variables, theming, responsive patternsdesign-system-context.cjsStyling file edits/scan-scss-styling
design-system/README.mdDesign system: tokens overview, component inventory, app-to-doc mappingdesign-system-context.cjsDesign file edits/scan-design-system
e2e-test-reference.mdE2E test patterns: framework, page objects, config, best practicescode-patterns-injector.cjsE2E file edits/scan-e2e-tests
domain-entities-reference.mdDomain entities, data models, DTOs, aggregate boundaries, ER diagrams, cross-service syncbackend-context.cjs, frontend-context.cjsBackend/frontend file edits/scan-domain-entities
docs-index-reference.mdDocumentation tree, file counts, doc relationships, keyword-to-doc lookupOn-demand (manual)Manual reference/scan-docs-index

Key insight: Files injected automatically by hooks have higher visibility — lessons placed there are enforced during edits. Files injected on-demand are only seen when skills explicitly read them. Prefer auto-injected files for high-recurrence lessons.


Smart File Routing (CRITICAL)

When saving a lesson, analyze its content and route to the most relevant file:

If lesson is about...Route toSection hint
Code review rules, anti-patterns, review checklists, YAGNI/KISS/DRY, naming conventions, review processdocs/project-reference/code-review-rules.mdAdd to most relevant section (anti-patterns, rules, checklists)
Backend/hook patterns: CJS modules, CQRS, repositories, entities, validation, message bus, background jobs, migrations, EF Core, MongoDBdocs/project-reference/backend-patterns-reference.mdAdd to relevant section or Anti-Patterns section
Frontend Angular/TS patterns: components, stores, forms, API services, BEM, RxJS, directives, pipesdocs/project-reference/frontend-patterns-reference.mdAdd to relevant section or Anti-Patterns section
Integration/unit tests: test base classes, fixtures, test helpers, test patterns, assertions, test runnersdocs/project-reference/integration-test-reference.mdAdd to relevant section
E2E tests: Playwright, Cypress, Selenium, page objects, E2E config, browser automation, visual regressiondocs/project-reference/e2e-test-reference.mdAdd to relevant section
Domain entities, data models, DTOs, aggregates, entity relationships, cross-service data sync, ER diagramsdocs/project-reference/domain-entities-reference.mdAdd to Entity Catalog or Relationships section
Project structure, directory organization, module boundaries, tech stack choices, service architecturedocs/project-reference/project-structure-reference.mdAdd to relevant architecture section
SCSS/CSS styling, BEM methodology, mixins, variables, theming, responsive design, CSS conventionsdocs/project-reference/scss-styling-guide.mdAdd to relevant styling section
Design system, design tokens, component library, UI kit conventions, Figma-to-code patternsdocs/project-reference/design-system/README.mdAdd to relevant design section
Feature documentation, doc templates, doc structure conventions, app-to-service doc mappingdocs/project-reference/feature-docs-reference.mdAdd to relevant conventions section
Documentation indexing, doc organization, doc-to-code relationships, doc lookup patternsdocs/project-reference/docs-index-reference.mdAdd to relevant section
General lessons, workflow tips, tooling, AI behavior, project conventions, anything not matching abovedocs/project-reference/lessons.mdAppend as dated list entry

Prevention Depth Assessment (MANDATORY before saving)

Before saving any lesson, critically evaluate whether a doc update alone is sufficient or a deeper prevention mechanism is needed:

Prevention LayerWhen to useExample
Doc update onlyOne-off awareness, rare edge case, team convention"Always use fluent validation API" → docs/project-reference/backend-patterns-reference.md
Prompt rule (development-rules.md)Rule that ALL agents must follow on every task (injected on UserPromptSubmit)"Grep after bulk edits" → .claude/docs/development-rules.md
System Lesson (prompt-injections.cjs)Universal AI mistake, high recurrence, silent failure, any project"Re-read files after context compaction" → .claude/hooks/lib/prompt-injections.cjs
Hook (.claude/hooks/)Automated enforcement, must never be forgotten"Dedup markers must match" → lib/dedup-constants.cjs + consistency test
Test (.claude/hooks/tests/)Regression prevention, verifiable invariant"All hooks import from shared module" → test in test-all-hooks.cjs
Skill update (.claude/skills/)Workflow step that should always include this check"Review changes must check doc staleness" → skill SKILL.md update

Decision flow:

  1. Capture the lesson
  2. Ask: "Could this mistake recur if the AI forgets this lesson?" If yes → needs more than a doc update
  3. Ask: "Can this be caught automatically by a test or hook?" If yes → recommend hook/test
  4. Evaluate System Lesson promotion (see below)
  5. Present options to user with AskUserQuestion:

- "Doc update only" — save to the best-fit reference file (default for most lessons) - "Doc + prompt rule" — also add to development-rules.md so all agents see it - "Doc + System Lesson" — also add to prompt-injections.cjs System Lessons (see criteria below) - "Full prevention" — plan a hook, test, or shared module to enforce it automatically

  1. Execute the chosen option. For "Full prevention", create a plan via /plan instead of just saving.

System Lesson Promotion (MANDATORY evaluation)

After generalizing a lesson, evaluate whether it qualifies as a System Lesson in .claude/hooks/lib/prompt-injections.cjs. System Lessons are injected into EVERY prompt — they are the highest-visibility prevention layer.

Qualification criteria (ALL must be true):

  1. Universal — Applies to ANY AI coding project, not just this codebase
  2. High recurrence — AI agents make this mistake repeatedly across sessions without the reminder
  3. Silent failure — The mistake produces no error/warning; it silently degrades output quality
  4. Not already covered — No existing System Lesson addresses the same root cause
System Lessons — Universal AI mistake prevention rules injected into EVERY prompt. Stored in injectLessonReminder() → "Common AI Mistake Prevention" array. Each must be universal, high-recurrence, and silent-failure. READ .claude/hooks/lib/prompt-injections.cjs to check for duplicates before adding.

If qualified: Recommend "Doc + System Lesson" option. On user approval, append the lesson as a new bullet to the System Lessons array in prompt-injections.cjs following the existing format: ` - Bold title. Explanation sentence. `

If NOT qualified: Explain why (e.g., "Too project-specific", "Already covered by existing System Lesson about X", "Low recurrence — only happens in rare edge cases"). Proceed with doc-only or prompt-rule option.

Lesson Quality Gate (MANDATORY before saving)

Every lesson MUST ATTENTION be generic and reusable across any project. Before saving:

  1. Analyze root cause — Why did this mistake happen? What is the underlying pattern?
  2. Generalize — Strip project-specific names, file paths, and tool names. Express the lesson as a universal principle.
  3. Verify universality — Would this lesson help an AI working on a completely different codebase? If no → rewrite until yes.

Anti-pattern examples:

  • BAD: "Always check lib/dedup-constants.cjs for marker strings" → project-specific path
  • GOOD: "When consolidating modules, ensure shared constants are imported from a single source of truth — never define inline duplicates."
  • BAD: "Update .claude/docs/hooks/README.md after deleting hooks" → project-specific file
  • GOOD: "Deleting components causes documentation staleness cascades — map all referencing docs before removal."

Routing Decision Process

  1. Read the lesson text — identify keywords and domain
  2. Apply Lesson Quality Gate — analyze root cause, generalize, verify universality
  3. Run Prevention Depth Assessment — determine if doc-only or deeper prevention needed
  4. Match against routing table — pick the best-fit file
  5. Tell the user: "This lesson fits best in docs/{file}. Confirm? [Y/n]"
  6. On confirm — read target file, find the right section, append the lesson
  7. On reject — ask user which file to use instead

Format by Target File

For docs/project-reference/lessons.md (general lessons):

- [YYYY-MM-DD] <lesson text>

For pattern/rules files (code-review-rules, backend-patterns, frontend-patterns, integration-test):

  • Find the most relevant existing section in the file
  • Append the lesson as a rule, anti-pattern entry, or code example
  • Use the file's existing format (tables, code blocks, bullet lists)
  • If no section fits, append to the Anti-Patterns or general rules section

Budget Enforcement (MANDATORY for docs/project-reference/lessons.md)

docs/project-reference/lessons.md is injected into EVERY prompt and EVERY file edit. Token budget must be controlled.

Hard limit: 3000 characters (~1000 tokens). Check BEFORE saving any new lesson.

Workflow when adding to docs/project-reference/lessons.md:

  1. Read file, count characters (wc -c docs/project-reference/lessons.md)
  2. If current + new lesson > 3000 chars → trigger Budget Trim before saving
  3. If under budget → save normally

Budget Trim process:

  1. Display all current lessons with char count each
  2. Evaluate each lesson on two axes:

- Universality — How often does this apply? (every session vs rare edge case) - Recurrence risk — How likely is the AI to repeat this mistake without the reminder?

  1. Score each: HIGH (keep as-is), MEDIUM (candidate to condense), LOW (candidate to remove)
  2. Present to user with AskUserQuestion: "Budget exceeded. Recommend removing/condensing these LOW/MEDIUM items: [list]. Approve?"
  3. On approval: condense MEDIUM items (shorten wording), remove LOW items, then save new lesson
  4. On rejection: ask user which to remove/condense

Condensing rules:

  • Remove examples, keep the rule: "Patterns like X break Y syntax" → just state the rule
  • Merge related lessons into one if they share the same root cause
  • Target: each lesson ≤ 250 chars (one concise sentence + bold title)

Does NOT apply to: Other routing targets (backend-patterns-reference.md, code-review-rules.md, etc.) — those files have their own size and are injected contextually, not on every prompt.

Behavior

  1. /learn <text> — Route and append lesson to the best-fit file (check budget if target is lessons.md)
  2. /learn list — Read and display lessons from ALL 12 target files (show file grouping + char count for lessons.md)
  3. /learn remove <N> — Remove lesson from docs/project-reference/lessons.md by line number
  4. /learn clear — Clear all lessons from docs/project-reference/lessons.md only (confirm first)
  5. /learn trim — Manually trigger Budget Trim on docs/project-reference/lessons.md
  6. File creation — If target file doesn't exist, create with header only

Auto-Inferred Activation

When Claude detects correction phrases in conversation (e.g., "always use X", "remember this", "never do Y", "from now on"), this skill auto-activates. When auto-inferred (not explicit /learn), confirm with the user before saving: "Save this as a lesson? [Y/n]"

Storage

Lessons are distributed across all docs/project-reference/ files (12 targets):

FileContent typeAuto-injected?
docs/project-reference/code-review-rules.mdReview rules, anti-patterns, conventionsYes (review skills)
docs/project-reference/backend-patterns-reference.mdBackend/hook patterns and rulesYes (backend edits)
docs/project-reference/frontend-patterns-reference.mdFrontend patterns and rulesYes (frontend edits)
docs/project-reference/integration-test-reference.mdIntegration test patterns and rulesConfig-driven
docs/project-reference/e2e-test-reference.mdE2E test patterns and rulesYes (E2E edits)
docs/project-reference/domain-entities-reference.mdEntity models, DTOs, relationshipsYes (backend/frontend edits)
docs/project-reference/project-structure-reference.mdArchitecture, modules, tech stackYes (agent spawn)
docs/project-reference/scss-styling-guide.mdSCSS/CSS styling rulesYes (styling edits)
docs/project-reference/design-system/README.mdDesign tokens, UI kit conventionsYes (design edits)
docs/project-reference/feature-docs-reference.mdFeature doc templates, conventionsOn-demand
docs/project-reference/docs-index-reference.mdDoc organization, lookup patternsOn-demand
docs/project-reference/lessons.mdGeneral lessons (fallback catch-all)Yes (EVERY prompt)

Injection

Lessons are injected by lessons-injector.cjs hook on:

  • UserPromptSubmitdocs/project-reference/lessons.md content (with dedup)
  • PreToolUse(Edit|Write|MultiEdit)docs/project-reference/lessons.md content (always)
  • Pattern reference files are injected by their respective hooks (code-patterns-injector.cjs, code-review-rules-injector.cjs, etc.)

Prompt Enhancement (MANDATORY final step)

After saving a lesson to any target file, run /prompt-enhance on the modified file(s) to optimize AI attention anchoring and token quality.

When to run:

  • After EVERY successful lesson save (regardless of target file)
  • Pass the specific file path(s) that were modified

What it does:

  • Ensures the new lesson integrates with existing top/bottom summary anchoring
  • Optimizes token usage — tightens prose, merges redundant content
  • Verifies no content loss from the save operation

How to invoke:

/prompt-enhance docs/project-reference/<modified-file>.md

Skip conditions (do NOT run prompt-enhance if):

  • The save was to lessons.md AND the file is under 1500 chars (too small to benefit)
  • The user explicitly requests "save only, no enhance"

Closing Reminders

  • IMPORTANT MUST ATTENTION check Reference Doc Catalog to find the best target file — NOT always lessons.md
  • IMPORTANT MUST ATTENTION run /prompt-enhance on modified file(s) after saving (unless skip conditions met)
  • IMPORTANT MUST ATTENTION break work into small todo tasks using TaskCreate BEFORE starting
  • IMPORTANT MUST ATTENTION search codebase for 3+ similar patterns before creating new code
  • IMPORTANT MUST ATTENTION cite file:line evidence for every claim (confidence >80% to act)
  • IMPORTANT MUST ATTENTION prefer auto-injected files for high-recurrence lessons (higher visibility)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.26%
按下载量换算89

windsurf

24.88%
按下载量换算79

OpenCode

20.04%
按下载量换算63

Codex

14.23%
按下载量换算45

Antigravity

7.64%
按下载量换算24

Gemini CLI

3.58%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills