mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-06-10 10:43:54 +02:00
Lesson 10 stated CLI > User > Project, contradicting Lesson 04 (CLI > Project > User) and the official Claude Code docs. Project-level agents override user-level agents when their names collide. - Fix priority order in 10-cli/README.md (lines 437-439) - Add cross-link to Lesson 04 for the full priority table - Update matching quiz question Q7 in lesson-quiz question-bank Closes #98
This commit is contained in:
@@ -813,9 +813,9 @@
|
||||
### Q7
|
||||
- **Category**: conceptual
|
||||
- **Question**: What is the agent definition priority order?
|
||||
- **Options**: A) Project > User > CLI | B) CLI > User > Project | C) User > CLI > Project | D) All are equal priority
|
||||
- **Options**: A) Project > User > CLI | B) CLI > Project > User | C) User > CLI > Project | D) All are equal priority
|
||||
- **Correct**: B
|
||||
- **Explanation**: CLI-defined agents (--agents flag) have highest priority, then User-level (~/.claude/agents/), then Project-level (.claude/agents/).
|
||||
- **Explanation**: CLI-defined agents (--agents flag) have highest priority, then Project-level (.claude/agents/), then User-level (~/.claude/agents/).
|
||||
- **Review**: Agents configuration section
|
||||
|
||||
### Q8
|
||||
|
||||
+3
-3
@@ -435,10 +435,10 @@ claude -p --agents "$(cat agents.json)" --model sonnet "analyze performance"
|
||||
|
||||
When multiple agent definitions exist, they are loaded in this priority order:
|
||||
1. **CLI-defined** (`--agents` flag) - Session-specific
|
||||
2. **User-level** (`~/.claude/agents/`) - All projects
|
||||
3. **Project-level** (`.claude/agents/`) - Current project
|
||||
2. **Project-level** (`.claude/agents/`) - Current project
|
||||
3. **User-level** (`~/.claude/agents/`) - All projects
|
||||
|
||||
CLI-defined agents override both user and project agents for the session.
|
||||
CLI-defined agents override both project and user agents for the session. Project-level agents override user-level agents when their names collide. See [Lesson 04 — Subagents](../04-subagents/README.md#file-locations) for the full priority table including plugin-level agents.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user