@diegosouzapw/add-service
B새 API 서비스를 생성합니다. service + hook + type 세트를 함께 생성합니다. 사용법: /add-service EntityName
Install
agr install @diegosouzapw/add-service --target claudeWrites 2 files into .claude/skills/, pinned to git-f5d51782.
- .claude/skills/add-service/SKILL.md
- .claude/skills/add-service/metadata.json
Document
name: add-service description: 새 API 서비스를 생성합니다. service + hook + type 세트를 함께 생성합니다. 사용법: /add-service EntityName
Add Service
새 API 도메인 추가 시 서비스, 훅, 타입을 한 번에 생성합니다.
Instructions
- 사용자로부터 엔티티 이름(PascalCase)을 받습니다
- 다음 3개 파일을 생성합니다:
src/types/{entityName}.tssrc/services/{entityName}Service.tssrc/hooks/use{EntityName}s.ts
- API_SPEC.md와 엔드포인트가 일치하는지 확인합니다
Type Template
// src/types/{entityName}.ts
export interface ${EntityName} {
id: string;
projectId: string;
// TODO: Add entity-specific fields
createdAt: string;
updatedAt: string;
}
export interface Create${EntityName}Input {
projectId: string;
}
export interface Update${EntityName}Input {
// TODO: Add updatable fields
}
Service Template
// src/services/${entityName}Service.ts
import api from "@/api/client";
import type { ApiResponse } from "@/types/api";
import type { ${EntityName}, Create${EntityName}Input, Update${EntityName}Input } from "@/types/${entityName}";
const BASE_URL = "/api";
export const ${entityName}Service = {
getAll: async (projectId: string): Promise<ApiResponse<${EntityName}[]>> => {
const response = await api.get(`${BASE_URL}/projects/${projectId}/${entityName}s`);
return response.data;
},
getById: async (id: string): Promise<ApiResponse<${EntityName}>> => {
const response = await api.get(`${BASE_URL}/${entityName}s/${id}`);
return response.data;
},
create: async (payload: Create${EntityName}Input): Promise<ApiResponse<${EntityName}>> => {
const response = await api.post(
`${BASE_URL}/projects/${payload.projectId}/${entityName}s`,
payload
);
return response.data;
},
update: async (id: string, payload: Update${EntityName}Input): Promise<ApiResponse<${EntityName}>> => {
const response = await api.patch(`${BASE_URL}/${entityName}s/${id}`, payload);
return response.data;
},
delete: async (id: string): Promise<ApiResponse<void>> => {
const response = await api.delete(`${BASE_URL}/${entityName}s/${id}`);
return response.data;
},
};
Hook
add-hook Skill을 사용하여 훅을 생성합니다.
Checklist
- 타입 파일에 필수 필드 정의
- API_SPEC.md와 엔드포인트 일치 확인
- barrel export 추가
Examples
/add-service Bookmark
→ 3개 파일 생성:
src/types/bookmark.tssrc/services/bookmarkService.tssrc/hooks/useBookmarks.ts
Trustgrade B
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- warnLicenseno SPDX license detected
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-f5d51782c70d2026-07-31