macintorsten-aurapod-services-instructions.ocm.json json Copy{
"ocm": "1",
"id": "macintorsten-aurapod-services-instructions",
"kind": "skill",
"name": "Service Layer Instructions",
"description": "Dependency injection pattern for services",
"publisher": "macintorsten",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Dependency injection pattern for services"
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/macintorsten/aurapod",
"path": ".github/instructions/services.instructions.md",
"ref": "a3ad26e44005b0bb7b53be7788aaef2b0ae2c09b",
"url": "https://github.com/macintorsten/aurapod/blob/a3ad26e44005b0bb7b53be7788aaef2b0ae2c09b/.github/instructions/services.instructions.md",
"key": "macintorsten/aurapod/.github/instructions/services.instructions.md"
},
"applies_to": "src/services/**/*Service.ts"
},
"instructions": "# Service Layer Pattern\n\n**Before modifying**: Use `test-driven-development` skill - write tests first.\n\nServices use factory functions for testability:\n\n```typescript\n// Create factory function accepting dependencies\nexport const createMyService = (deps: { otherService: typeof otherService }) => ({\n myMethod: () => deps.otherService.doSomething()\n});\n\n// Export default instance for backward compatibility\nexport const myService = createMyService({ otherService });\n```\n\n**Testing**: Create test instances with mocked dependencies via `createMyService()` - no cascading mocks needed.",
"cost": {
"context_tokens": 146
}
}