Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:00:47 +08:00
commit 8e48188a95
22 changed files with 1465 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
## Subagent Examples
**Good Subagent:**
```
---
name: test-runner
description: Use PROACTIVELY after code changes to run tests and fix failures. Analyzes test output and provides fixes.
tools: Read, Bash, Grep
model: inherit
---
You are a test runner specialist. When invoked:
1. Run the appropriate test suite for changed files
2. If tests pass, report success
3. If tests fail:
- Analyze the failure output
- Identify the root cause
- Propose a fix
- Implement the fix if within your capability
- Re-run tests to verify
Constraints:
- Never skip tests
- Always run full suite after fixes
- If stuck after 3 attempts, report the blocker clearly
Output Format:
- Test results summary
- Failures with root cause
- Fixes applied
- Final status
```
Why it works: Clear trigger in description, specific workflow, appropriate tools, handles failure.
**Bad Subagent:**
```
---
name: helper
description: Helps with stuff
---
You help with coding tasks.
```
Why it's bad: Vague description (no trigger conditions), vague purpose, no workflow.
</examples>