Initial commit
This commit is contained in:
38
skills/prompt-writing/references/examples/skill-examples.md
Normal file
38
skills/prompt-writing/references/examples/skill-examples.md
Normal file
@@ -0,0 +1,38 @@
|
||||
## Skill Examples
|
||||
|
||||
**Good Skill Structure:**
|
||||
|
||||
```
|
||||
---
|
||||
name: testing-guide
|
||||
description: Guidance on writing effective tests using RSpec and TDD practices
|
||||
---
|
||||
|
||||
# Testing Guide
|
||||
|
||||
This skill provides testing guidance for Rails applications using RSpec.
|
||||
|
||||
## Quick Reference
|
||||
- Use descriptive test names
|
||||
- Follow AAA pattern (Arrange, Act, Assert)
|
||||
- Mock external dependencies
|
||||
- Test behavior, not implementation
|
||||
|
||||
<aaa_pattern>
|
||||
## Arrange-Act-Assert Pattern
|
||||
|
||||
Structure tests in three clear phases:
|
||||
- Arrange: Set up test data and conditions
|
||||
- Act: Execute the code being tested
|
||||
- Assert: Verify the results
|
||||
|
||||
Example: [concrete example here]
|
||||
</aaa_pattern>
|
||||
|
||||
<mocking>
|
||||
[Detailed guidance on mocking...]
|
||||
</mocking>
|
||||
```
|
||||
|
||||
Why it works: Overview first, progressive disclosure for details.
|
||||
|
||||
Reference in New Issue
Block a user