cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Orchestrate complex automation workflows with task dependencies, scheduling, and cross-platform execution
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/workflow-orchestratorContext preview
What this command does when you run it.
Orchestrate complex automation workflows with task dependencies, scheduling, and cross-platform execution
allowed-tools: Read, Write, Edit, Bash argument-hint: [workflow-name] | create | run | schedule | monitor description: Orchestrate complex automation workflows with task dependencies, scheduling, and cross-platform execution
Orchestrate complex automation workflows: $ARGUMENTS
Create and manage complex automation workflows with dependency management, scheduling, and monitoring.
{
"name": "deployment-workflow",
"version": "1.0.0",
"description": "Complete deployment automation with testing and rollback",
"trigger": {
"type": "manual|schedule|webhook|file_change",
"config": {
"schedule": "0 2 * * *",
"files": ["src/**/*", "package.json"],
"webhook": "/trigger/deploy"
}
},
"environment": {
"NODE_ENV": "production",
"LOG_LEVEL": "info"
},
"tasks": [
{
"id": "pre-build",
"name": "Pre-build validation",
"type": "shell",
"command": "npm run validate",
"timeout": 300,
"retry": {
"attempts": 3,
"delay": 5000
}
},
{
"id": "build",
"name": "Build application",
"type": "shell",
"command": "npm run build",
"depends_on": ["pre-build"],
"parallel": false,
"timeout": 600
},
{
"id": "test",
"name": "Run tests",
"type": "shell",
"command": "npm run test:ci",
"depends_on": ["build"],
"condition": "${env.SKIP_TESTS} != 'true'"
},
{
"id": "deploy",
"name": "Deploy to staging",
"type": "shell",
"command": "npm run deploy:staging",
"depends_on": ["test"],
"on_success": ["notify-success"],
"on_failure": ["rollback", "notify-failure"]
}
],
"notifications": {
"channels": ["slack", "email"],
"on_completion": true,
"on_failure": true
}
}{
"id": "conditional-deploy",
"name": "Deploy if tests pass",
"type": "conditional",
"condition": "${tasks.test.exit_code} == 0 && ${env.DEPLOY_ENABLED} == 'true'",
"then": {
"type": "shell",
"command": "npm run deploy"
},
"else": {
"type": "shell",
"command": "echo 'Skipping deployment'"
}
}{
"id": "parallel-tests",
"name": "Run parallel test suites",
"type": "parallel",
"tasks": [
{
"id": "unit-tests",
"command": "npm run test:unit"
},
{
"id": "integration-tests",
"command": "npm run test:integration"
},
{
"id": "e2e-tests",
"command": "npm run test:e2e"
}
],
"wait_for": "all|any|first",
"timeout": 1800
}{
"id": "deploy-multiple-envs",
"name": "Deploy to multiple environments",
"type": "loop",
"items": ["staging", "qa", "production"],
"task": {
"type": "shell",
"command": "npm run deploy -- --env ${item}",
"timeout": 300
},
"parallel": false,
"stop_on_failure": true
}{
"id": "process-data",
"name": "Process data files",
"type": "data_processor",
"input": {
"type": "file",
"path": "data/*.json"
},
"processor": {
"type": "javascript",
"script": "scripts/process-data.js"
},
"output": {
"type": "file",
"path": "processed/output.json"
}
}class WorkflowOrchestrator {
constructor(config) {
this.config = config;
this.tasks = new Map();
this.running = new Set();
this.completed = new Set();
this.failed = new Set();
this.logger = new Logger(config.logLevel);
}
async execute(workflowPath) {
const workflow = await this.loadWorkflow(workflowPath);
try {
await this.validateWorkflow(workflow);
await this.setupEnvironment(workflow.environment);
const result = await this.executeWorkflow(workflow);
await this.cleanup();
return result;
} catch (error) {
await this.handleError(error, workflow);
throw error;
}
}
async executeWorkflow(workflow) {
const taskGraph = this.buildDependencyGraph(workflow.tasks);
const execution = {
id: this.generateExecutionId(),
workflow: workflow.name,
startTime: Date.now(),
tasks: {}
};
while (this.hasRunnableTasks(taskGraph)) {
const runnableTasks = this.getRunnableTasks(taskGraph);
if (runnableTasks.length === 0) {
break; // Circular dependency or all failed
}
await this.executeTaskBatch(runnableTasks, execution);
}
return this.generateExecutionReport(execution);
}
async executeTask(task, execution) {
const taskExecution = {
id: task.id,
name: task.name,
startTime: Date.now(),
status: 'running'
};
execution.tasks[task.id] = taskExecution;
this.running.add(task.id);
try {
// Pre-execution hooks
await this.runPreHooks(task);
// Task execution
const result = await this.runTaskByType(task);
// Post-execution hooks
await this.runPostHooks(task, result);
taskExecution.endTime = Date.now();
taskExecution.duration = taskExecution.endTime - taskExecution.startTime;
taskExecution.status = 'completed';
taskExecution.result = result;
this.completed.add(task.id);
this.running.delete(taReady-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image