测试安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- Node.js · Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: ears-init
description: | Use when this capability is needed. Analyze the current project and generate customized EARS c…
category: 通用
runtime: Node.js / Python
---
# ears-init 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“When to Use / Workflow / Phase 1: Project Analysis”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“When to Use / Workflow / Phase 1: Project Analysis”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“When to Use / Workflow / Phase 1: Project Analysis”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: ears-init
description: | Use when this capability is needed. Analyze the current project and generate customized EARS c…
category: 通用
source: tomevault-io/skills-registry
---
# ears-init
## 什么时候使用
- 把通用方向的常用动作沉淀成 Agent 可调用的技能 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「When to Use / Workflow / Phase 1: Project Analysis」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "ears-init" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> When to Use / Workflow / Phase 1: Project Analysis
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js / Python | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} EARS Init: Project-Aware EARS Initialization
Analyze the current project and generate customized EARS configuration files so that Claude Code (and optionally Cursor and Codex) can capture knowledge effectively.
When to Use
- Starting work on a new project that has no EARS setup
- Onboarding a project that another developer started
- Upgrading a project from generic EARS to project-specific EARS
- After significant project restructuring
Workflow
Phase 1: Project Analysis
Scan the project to build a profile:
Detect language and framework:
- Look for
package.json→ Node.js/TypeScript - Look for
pyproject.tomlorsetup.pyorrequirements.txt→ Python - Look for
Cargo.toml→ Rust - Look for
go.mod→ Go - Look for
pom.xmlorbuild.gradle→ Java/Kotlin - Look for
*.slnor*.csproj→ C#/.NET - Look for
Makefile+*.c/*.cpp/*.h→ C/C++ - Look for
Gemfile→ Ruby - Look for
mix.exs→ Elixir - Multiple matches = polyglot project
- Look for
Detect build commands:
package.json→ readscripts(build, test, dev, start)pyproject.toml→ read[project.scripts]and[tool.pytest]Makefile→ list top-level targetsCargo.toml→cargo build,cargo testgo.mod→go build,go test
Detect test commands:
- Python:
pytest,python -m unittest,tox - Node.js:
jest,vitest,mocha,npm test - Rust:
cargo test - Go:
go test ./... - Java:
mvn test,gradle test
- Python:
Understand architecture:
- List top-level directories with brief descriptions
- Read existing README.md for project overview
- Identify key patterns (monorepo, MVC, microservices, library, CLI tool, etc.)
Check for existing EARS artifacts:
CLAUDE.md→ exists? has EARS section?KNOWN_ISSUES.md→ exists?LEARNING.md→ exists?traces/→ exists? has content?ears-config.json→ exists?.cursor/rules/→ has EARS rules?AGENTS.md→ exists?
Phase 2: Generate Project CLAUDE.md
Use the project analysis to fill in a CLAUDE.md. Use the template from this plugin's templates/PROJECT-CLAUDE.md as the base structure.
If CLAUDE.md already exists:
- Read it fully
- Check if it has an EARS section
- If no EARS section: offer to append the EARS block
- If has EARS section: compare and offer to update
- NEVER overwrite existing content without asking
If CLAUDE.md does not exist:
- Generate a complete one using the template
- Fill in all placeholders from the analysis:
- Project name from package manifest or directory name
- Overview from README.md or directory structure
- Build & test commands from detected tools
- Architecture from directory scan
- EARS section fully populated
The EARS section must include:
- PostToolUse hook behavior explanation
- All three entry formats (Error, Checkpoint, Dead End) with examples
- Four-tier knowledge architecture with promotion rules
- "How to respond" guidance when seeing
[EARS]prompts - Project-specific error patterns to watch for
Phase 3: Create EARS Skeleton
Create the directory structure and files:
traces/directory — create if missingInitial trace.md — ask user for the current task name, create
traces/<task-name>/trace.md:# Trace: <task-name> Started: <current timestamp>KNOWN_ISSUES.md— create from template if missingLEARNING.md— create if missing:# Learning Log Tech decisions, new concepts, mistakes, and lessons for this project.ears-config.json— create with project-specific error patterns:For Python projects:
{ "error_patterns": [ "Traceback (most recent call last)", "SyntaxError:", "TypeError:", "ValueError:", "KeyError:", "IndexError:", "AttributeError:", "ImportError:", "ModuleNotFoundError:", "FileNotFoundError:", "RuntimeError:", "AssertionError:", "PermissionError:", "ConnectionError:" ], "checkpoint_interval": 10, "error_cooldown_seconds": 120, "checkpoint_cooldown_seconds": 600, "ignore_paths": [".claude/", ".git/", "__pycache__/", ".venv/", ".mypy_cache/"] }For Node.js/TypeScript projects:
{ "error_patterns": [ "ReferenceError:", "TypeError:", "SyntaxError:", "RangeError:", "ENOENT:", "EACCES:", "ECONNREFUSED:", "ERR_MODULE_NOT_FOUND", "Cannot find module", "Unexpected token", "FATAL ERROR:", "UnhandledPromiseRejection" ], "checkpoint_interval": 10, "error_cooldown_seconds": 120, "checkpoint_cooldown_seconds": 600, "ignore_paths": [".git/", "node_modules/", "dist/", ".next/", "coverage/"] }For Rust projects:
{ "error_patterns": [ "error[E", "panicked at", "fatal runtime error", "thread 'main' panicked", "cannot find", "mismatched types", "borrow of moved value", "lifetime" ], "checkpoint_interval": 10, "error_cooldown_seconds": 120, "checkpoint_cooldown_seconds": 600, "ignore_paths": [".git/", "target/"] }For Go projects:
{ "error_patterns": [ "panic:", "fatal error:", "undefined:", "cannot use", "too many arguments", "not enough arguments", "imported and not used", "declared and not used" ], "checkpoint_interval": 10, "error_cooldown_seconds": 120, "checkpoint_cooldown_seconds": 600, "ignore_paths": [".git/", "vendor/"] }For other/mixed projects: use the default patterns from the hook.
Phase 4: Multi-Tool Setup (Optional)
Ask the user: "Do you use Cursor or Codex for this project? I can generate EARS rules for them too."
If Cursor is used:
Generate .cursor/rules/ears-project.mdc (create .cursor/rules/ if needed):
- Use the
templates/cursor-ears.mdctemplate - Fill in project name and tech stack
- Set
alwaysApply: true
If Codex is used:
Generate project-level AGENTS.md:
- Use the
templates/PROJECT-AGENTS.mdtemplate - Fill in project overview, build/test commands, architecture
- Include EARS instructions
Phase 5: Hook Check (Optional)
- Check if
~/.claude/scripts/ears-trace.pyexists - If it exists, inform the user about the improved hook in the Synapse plugin
- Offer to install/upgrade:
- Copy
hooks/ears-trace.pyfrom the plugin to~/.claude/scripts/ears-trace.py - Verify
~/.claude/settings.jsonhas PostToolUse hooks configured
- Copy
- If the user declines, that's fine — the existing hook works, just without auto-discovery
Output Summary
After completion, display a summary:
EARS initialized for <project-name>:
- CLAUDE.md: <created | updated | already exists>
- traces/<task>/trace.md: created
- KNOWN_ISSUES.md: <created | already exists>
- LEARNING.md: <created | already exists>
- ears-config.json: created (<tech-stack> patterns)
- Cursor rules: <created | skipped>
- Codex AGENTS.md: <created | skipped>
- Hook: <upgraded | current | skipped>
You're ready to go. EARS will automatically prompt you to record
errors, checkpoints, discoveries, and dead ends as you work.
Important Principles
- Never overwrite existing files without asking
- Merge, don't replace — append EARS sections to existing CLAUDE.md
- Project-specific — error patterns, ignore paths, and commands should reflect the actual project
- Minimal by default — only create what's needed, ask before adding optional pieces
- Respect existing setup — if the project already has EARS, offer upgrades, don't force changes
Source: CHOSENX-GPU/synapse — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核