peterfei/ai-agent-team / .claude/skills/thread-manager
thread-manager
Flaggedsrc/tools/track-file-change.ts
View on GitHubimport { ToolDefinition, ToolInvocation } from '../types';
import { ThreadManager } from '../core/thread-manager';
export const toolDefinition: ToolDefinition = {
name: 'track_file_change',
description: 'Record a file change event for the current active thread. If stats are not provided, they will be auto-detected from git.',
inputSchema: {
type: 'object',
properties: {
filePath: {
type: 'string',
description: 'Path of the changed file relative to project root'
},
changeType: {
type: 'string',
enum: ['added', 'modified', 'deleted'],
description: 'Type of change (optional, auto-detected if omitted)'
},
linesAdded: {
type: 'number',
description: 'Number of lines added (optional, auto-detected if omitted)'
},
linesDeleted: {
type: 'number',
description: 'Number of lines deleted (optional, auto-detected if omitted)'
}
},
required: ['filePath']
}
};
export const toolHandler = async (invocation: ToolInvocation, threadManager: ThreadManager) => {
const { filePath, changeType, linesAdded, linesDeleted } = invocation.input as any;
const current = await threadManager.getCurrentThread();
if (!current.thread) {
return { success: false, message: "No active thread to track file change against." };
}
try {
const result = await threadManager.trackFileChange(
current.thread.id,
filePath,
changeType,
linesAdded,
linesDeleted
);
return { success: true, fileChange: result, message: "File change tracked." };
} catch (e: any) {
return { success: false, message: e.message };
}
};
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |