ソース情報
- リポジトリ
- Miosa-osa/canopy
- ソースの最終更新活動
- 2026年8月16日 14:17
- 検出された SKILL.md の言語
- 英語
- スター
- 228
- フォーク
- 54
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/Miosa-osa/canopy --skill tdd-enforcerコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SOC 職業分類に基づく
SKILL.md を表示中
| name | tdd-enforcer |
| description | Enforces Test-Driven Development discipline with RED-GREEN-REFACTOR cycle |
| trigger | always |
| priority | 2 |
Enforces strict Test-Driven Development discipline. You cannot prompt your way into TDD discipline - you need forcing functions that make TDD the path of least resistance.
This skill activates when:
Before writing ANY implementation code:
Understand the requirement
Write the test FIRST
// The test must:
// - Define expected behavior
// - Be specific and focused
// - FAIL when run (no implementation yet)
Run the test - confirm it FAILS
Write MINIMUM code to pass
Run the test - confirm it PASSES
Before writing any feature code, verify:
BLOCK implementation if:
# Jest
npm test -- --coverage
# Vitest
npx vitest run --coverage
# Playwright (E2E)
npx playwright test
# Unit tests with coverage
go test -cover -coverprofile=coverage.out ./...
# View coverage
go tool cover -html=coverage.out
# pytest with coverage
pytest --cov=. --cov-report=html
## Task: Add user authentication
### 1. RED: Write failing test
```typescript
// auth.test.ts
describe('authenticateUser', () => {
it('should return token for valid credentials', async () => {
const result = await authenticateUser('user@test.com', 'password123');
expect(result.token).toBeDefined();
expect(result.expiresIn).toBe(3600);
});
it('should throw error for invalid credentials', async () => {
await expect(
authenticateUser('user@test.com', 'wrong')
).rejects.toThrow('Invalid credentials');
});
});
// auth.ts
export async function authenticateUser(email: string, password: string) {
const user = await findUserByEmail(email);
if (!user || !verifyPassword(password, user.passwordHash)) {
throw new Error('Invalid credentials');
}
return {
token: generateToken(user),
expiresIn: 3600
};
}
## Integration with Hooks
### Pre-commit Hook
```bash
#!/bin/bash
# Block commits without test coverage
# Get changed files
changed_files=$(git diff --cached --name-only --diff-filter=ACM)
# Check for test files
for file in $changed_files; do
if [[ $file =~ \.(ts|js|go|py)$ ]] && [[ ! $file =~ (test|spec) ]]; then
# Implementation file - check for corresponding test
test_file="${file%.*}.test.${file##*.}"
if ! git diff --cached --name-only | grep -q "$test_file"; then
echo "ERROR: No test file for $file"
echo "TDD requires tests FIRST. Add $test_file"
exit 1
fi
fi
done