Add Service
Description
Create a new service class following the project's service layer pattern.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for drewipson/claude-code-config, shared by 5 entries
in this directory. It describes the repository, not this entry specifically.
Add Service
Create a new service class following the project's service layer pattern.
Instructions
**Determine service purpose:**
- Ask what domain or functionality this service will handle
- Identify what data it will manage or operations it will perform
- Determine dependencies (other services, external APIs, file system)
**Create service file in `src/services/`:**
- Use kebab-case naming:
-service.ts(e.g.,workflow-service.ts) - Follow the established service pattern
- Use kebab-case naming:
**Service template:**
import * as vscode from 'vscode';
import * as fs from 'fs/promises';
import * as path from 'path';
// Import types
import type { } from '../core/types';
/**
* Service handles
*
* Responsibilities:
* -
* -
* -
*/
export class Service {
constructor(
// Inject dependencies if needed
) {}
/**
*
* @param param1 Description of param1
* @returns Description of return value
* @throws Description of potential errors
*/
async mainMethod(param1: string): Promise<> {
try {
// Implementation
return result;
} catch (error) {
// Provide meaningful error context
throw new Error(`Failed to : ${error instanceof Error ? error.message : String(error)}`);
}
}
// Additional methods...
/**
* Private helper method
*/
private async helperMethod(): Promise {
// Implementation
}
}
- Add type definitions to
src/core/types.tsif needed:
export interface {
// Define structure
}
export type = {
// Define options
};
- Import and instantiate in
src/extension.tsif globally needed:
import { Service } from './services/-service';
// In activate()
const Service = new Service(/* dependencies */);
// Pass to providers or commands that need it
Service Design Principles
1. Single Responsibility
Each service should handle one domain or concern:
- ✅
FileDiscoveryService- Discovers and categorizes files - ✅
HooksService- Manages hook configurations - ❌
FileAndHooksService- Too broad, split into separate services
2. Async by Default
All I/O operations must be async:
// Good
async readConfig(): Promise {
const content = await fs.readFile(path, 'utf-8');
return JSON.parse(content);
}
// Bad
readConfigSync(): Config {
const content = fs.readFileSync(path, 'utf-8'); // Blocks extension host
return JSON.parse(content);
}
3. Error Handling
Provide context in errors:
// Good
try {
await fs.readFile(configPath, 'utf-8');
} catch (error) {
throw new Error(`Failed to read config at ${configPath}: ${error.message}`);
}
// Bad
try {
a
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11