소스 정보
- 저장소
- dev-hann/song
- 최근 소스 활동
- 2026년 2월 18일 13:08
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/dev-hann/song --skill utility-testing명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Runs PM-Designer-Doc triple review protocol to reach consensus on feature specs before implementation. Includes domain documentation consistency check. Use before implementing any new screen, component, or significant feature.
Create Server and Client React components with proper props, state, and patterns
Enforce docs ↔ code consistency before and after implementation. Launches doc-reviewer agent to cross-check domain documentation against actual codebase, detects drift, and ensures documentation updates accompany code changes.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | utility-testing |
| description | Test utility functions, parsers, and schemas with proper validation patterns |
| license | MIT |
| compatibility | opencode |
| metadata | {"category":"testing","complexity":"intermediate"} |
Use this when you need to:
I'll ask clarifying questions if:
import { describe, it, expect } from 'vitest';
import { parseVideo } from '@/lib/parsers';
describe('parseVideo', () => {
it('should parse valid video object', () => {
const validVideo = {
type: 'Video',
id: 'video123',
title: 'Test Video',
duration: { seconds: 120 },
view_count: 5000
};
const result = parseVideo(validVideo);
expect(result).not.toBeNull();
expect(result?.id).toBe('video123');
expect(result?.title).toBe('Test Video');
expect(result?.duration).toBe(120);
expect(result?.viewCount).toBe(5000);
});
it('should return null for non-object input', () => {
const result = parseVideo('not an object');
expect(result).toBeNull();
});
it('should return null for wrong type', () => {
const result = parseVideo({ type: 'Channel' });
expect(result).toBeNull();
});
it('should handle missing optional fields', () => {
const minimalVideo = {
type: 'Video',
id: 'video123',
title: 'Test Video'
};
const result = parseVideo(minimalVideo);
expect(result?.duration).toBe(0);
expect(result?.viewCount).toBe(0);
});
});
import { describe, it, expect } from 'vitest';
import { formatDuration, formatViewCount } from '@/lib/formatters';
describe('formatDuration', () => {
it('should format seconds to MM:SS', () => {
expect(formatDuration(0)).toBe('0:00');
expect(formatDuration(65)).toBe('1:05');
expect(formatDuration(125)).toBe('2:05');
expect(formatDuration(3600)).toBe('60:00');
});
it('should pad single digit seconds', () => {
expect(formatDuration(5)).toBe('0:05');
expect(formatDuration(9)).toBe('0:09');
});
});
describe('formatViewCount', () => {
it('should format millions', {
(()).();
(()).();
});
(, {
(()).();
(()).();
});
(, {
(()).();
(()).();
});
});
import { describe, it, expect } from 'vitest';
import { VideoSchema } from '@/schemas/video';
describe('VideoSchema', () => {
it('should validate complete video object', () => {
const validVideo = {
id: 'video123',
type: 'video',
title: 'Test Video',
description: 'Test Description',
duration: 120,
viewCount: 5000
};
const result = VideoSchema.safeParse(validVideo);
expect(result.success).toBe(true);
expect(result.data).toEqual(validVideo);
});
it('should reject video without id', () => {
const invalidVideo = {
type: 'video',
title: 'Test Video'
};
const result = VideoSchema.safeParse(invalidVideo);
expect(result.success).toBe();
(result..[].).([]);
});
(, {
invalidVideo = {
: ,
: ,
: ,
:
};
result = .(invalidVideo);
(result.).();
(result..[].).();
});
});
describe('Edge Cases', () => {
it('should handle null input', () => {
const result = parseVideo(null);
expect(result).toBeNull();
});
it('should handle undefined input', () => {
const result = parseVideo(undefined);
expect(result).toBeNull();
});
it('should handle empty object', () => {
const result = parseVideo({});
expect(result).toBeNull();
});
it('should handle array input', () => {
const result = parseVideo([1, 2, 3]);
expect(result).toBeNull();
});
it('should handle very long strings', () => {
const longTitle = 'A'.repeat(1000);
const video = {
type: 'Video',
id: 'video123',
title: longTitle
};
result = (video);
(result?.).(longTitle);
});
});
import { describe, it, expect } from 'vitest';
import { parseVideo } from '@/lib/parsers';
describe('YouTube.js Special Types', () => {
it('should handle TextRun objects', () => {
const video = {
type: 'Video',
id: 'video123',
title: { text: 'Test Video' }
};
const result = parseVideo(video);
expect(result?.title).toBe('Test Video');
});
it('should handle duration as number', () => {
const video = {
type: 'Video',
id: 'video123',
title: 'Test Video',
duration: 120
};
const result = parseVideo(video);
expect(result?.duration).toBe(120);
});
it('should handle duration as object', () => {
const video = {
type: 'Video',
: ,
: ,
: { : }
};
result = (video);
(result?.).();
});
(, {
video = {
: ,
: ,
: ,
:
};
result = (video);
(result?.).();
});
});
describe('parseVideo', () => {
describe('Valid Input', () => {
it('should parse complete video object');
it('should parse minimal video object');
});
describe('Invalid Input', () => {
it('should return null for non-object');
it('should return null for wrong type');
it('should return null for missing required fields');
});
describe('Edge Cases', () => {
it('should handle null input');
it('should handle undefined input');
it('should handle empty object');
it('should handle array input');
});
describe('YouTube.js Types', () => {
it('should handle TextRun objects');
it('should handle duration objects');
it('should handle thumbnail objects');
});
});
| Test Type | What to Test |
|---|---|
| Parser | Valid input, invalid input, edge cases |
| Formatter | Input/output pairs, edge cases |
| Schema | Validation, coercion, error messages |
| Utility | Pure functions, no side effects |
| Edge Case | Test For |
|---|---|
| null | Returns null or default |
| undefined | Returns null or default |
| empty object | Returns null or default |
| array | Returns null |
| special chars | Handled correctly |
| very long strings | No truncation |
| negative numbers | Handled correctly |
| YouTube.js Type | Parser Behavior |
|---|---|
| TextRun | Extract text property |
| Duration | Check number or { seconds } |
| Thumbnail | Check string, object, or array |