/code-to-task
Convert code analysis to Linear tasks
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/code-to-task
Context preview
What this command does when you run it.
Convert code analysis to Linear tasks
Command definition
code-to-task.mdConvert Code Analysis to Linear Tasks
Convert code analysis to Linear tasks
Purpose
This command scans your codebase for TODO/FIXME comments, technical debt markers, deprecated code, and other indicators that should be tracked as tasks. It automatically creates organized, prioritized Linear tasks to ensure important code improvements aren't forgotten.
Usage
# Scan entire codebase for TODOs and create tasks
claude "Create tasks from all TODO comments in the codebase"
# Scan specific directory or module
claude "Find TODOs in src/api and create Linear tasks"
# Create tasks from specific patterns
claude "Create tasks for all deprecated functions"
# Generate technical debt report
claude "Analyze technical debt in the project and create improvement tasks"
Instructions
1. Scan for Task Markers
Search for common patterns indicating needed work:
# Find TODO comments
rg "TODO|FIXME|HACK|XXX|OPTIMIZE|REFACTOR" --type-add 'code:*.{js,ts,py,java,go,rb,php}' -t code
# Find deprecated markers
rg "@deprecated|DEPRECATED|@obsolete" -t code
# Find temporary code
rg "TEMPORARY|TEMP|REMOVE BEFORE|DELETE ME" -t code -i
# Find technical debt markers
rg "TECHNICAL DEBT|TECH DEBT|REFACTOR|NEEDS REFACTORING" -t code -i
# Find security concerns
rg "SECURITY|INSECURE|VULNERABILITY|CVE-" -t code -i
# Find performance issues
rg "SLOW|PERFORMANCE|OPTIMIZE|BOTTLENECK" -t code -i2. Parse Comment Context
Extract meaningful information from comments:
class CommentParser {
parseComment(file, lineNumber, comment) {
const parsed = {
type: 'todo',
priority: 'medium',
title: '',
description: '',
author: null,
date: null,
tags: [],
code_context: '',
file_path: file,
line_number: lineNumber
};
// Detect comment type
if (comment.match(/FIXME/i)) {
parsed.type = 'fixme';
parsed.priority = 'high';
} else if (comment.match(/HACK|XXX/i)) {
parsed.type = 'hack';
parsed.priority = 'high';
} else if (comment.match(/OPTIMIZE|PERFORMANCE/i)) {
parsed.type = 'optimization';
} else if (comment.match(/DEPRECATED/i)) {
parsed.type = 'deprecation';
parsed.priority = 'high';
} else if (comment.match(/SECURITY/i)) {
parsed.type = 'security';
parsed.priority = 'urgent';
}
// Extract author and date
const authorMatch = comment.match(/@(\w+)|by (\w+)/i);
if (authorMatch) {
parsed.author = authorMatch[1] || authorMatch[2];
}
const dateMatch = comment.match(/(\d{4}-\d{2}-\d{2})|(\d{1,2}\/\d{1,2}\/\d{2,4})/);
if (dateMatch) {
parsed.date = dateMatch[0];
}
// Extract title and description
const cleanComment = comment
.replace(/^\/\/\s*|^\/\*\s*|\*\/\s*$|^#\s*/g, '')
.replace(/TODO|FIXME|HACK|XXX/i, '')
.trim();
const parts = cleanComment.split(/[:\-–—]/);
if (parts.length > 1) {
parsed.title = parts[0].trim();
parsed.description = parts.slice(1).join(':').trim();
} else {
parsed.title = cleanComment;
}
// Extract tags
const tagMatch = comment.match(/#(\w+)/g);
if (tagMatch) {
parsed.tags = tagMatch.map(tag => tag.substring(1));
}
return parsed;
}
getCodeContext(file, lineNumber, contextLines = 5) {
const lines = readFileLines(file);
const start = Math.max(0, lineNumber - contextLines);
const end = Math.min(lines.length, lineNumber + contextLines);
return lines.slice(start, end).map((line, i) => ({
number: start + i + 1,
content: line,
isTarget: start + i + 1 === lineNumber
}));
}
}3. Group and Deduplicate
Organize found issues intelligently:
class TaskGrouper {
groupTasks(parsedComments) {
const groups = {
byFile: new Map(),
byType: new Map(),
byAuthor: new Map(),
byModule: new Map()
};
for (const comment of parsedComments) {
// Group by file
if (!groups.byFile.has(comment.file_path)) {
groups.byFile.set(comment.file_path, []);
}
groups.byFile.get(comment.file_path).push(comment);
// Group by type
if (!groups.byType.has(comment.type)) {
groups.byType.set(comment.type, []);
}
groups.byType.get(comment.type).push(comment);
// Group by module
const module = this.extractModule(comment.file_path);
if (!groups.byModule.has(module)) {
groups.byModule.set(module, []);
}
groups.byModule.get(module).push(comment);
}
return groups;
}
mergeSimilarTasks(tasks) {
const merged = [];
const seen = new Set();
for (const task of tasks) {
if (seen.has(task)) continue;
// Find similar tasks
const similar = tasks.filter(t =>
t !== task &&
!seen.has(t) &&
this.areSimilar(task, t)
);
if (similar.length > 0) {
// Merge into one task
const mergedTask = {
...task,
title: this.generateMergedTitle(task, similar),
description: this.generateMergedDescription(task, similar),
locations: [task, ...similar].map(t => ({
file: t.file_path,
line: t.line_number
}))
};
merged.push(mergedTask);
seen.add(task);
similar.forEach(t => seen.add(t));
} else {
merged.push(task);
seen.add(task);
}
}
return merged;
}
}4. Analyze Technical Debt
Identify code quality issues:
class TechnicalDebtAnalyzer {
async analyzeFile(filePath) {
const issues = [];
const content = await readFile(filePath);
const lines = content.split('\n');
// Check for long functions
const functionMatches = content.matchAll(/function\s+(\w+)|(\w+)\s*=\s*\(.*?\)\s*=>/g);
for (const match of functionMRead more
Convert Code Analysis to Linear Tasks
Convert code analysis to Linear tasks
Purpose
This command scans your codebase for TODO/FIXME comments, technical debt markers, deprecated code, and other indicators that should be tracked as tasks. It automatically creates organized, prioritized Linear tasks to ensure important code improvements aren't forgotten.
Usage
# Scan entire codebase for TODOs and create tasks claude "Create tasks from all TODO comments in the codebase" # Scan specific directory or module claude "Find TODOs in src/api and create Linear tasks" # Create tasks from specific patterns claude "Create tasks for all deprecated functions" # Generate technical debt report claude "Analyze technical debt in the project and create improvement tasks"
Instructions
1. Scan for Task Markers
Search for common patterns indicating needed work:
# Find TODO comments
rg "TODO|FIXME|HACK|XXX|OPTIMIZE|REFACTOR" --type-add 'code:*.{js,ts,py,java,go,rb,php}' -t code
# Find deprecated markers
rg "@deprecated|DEPRECATED|@obsolete" -t code
# Find temporary code
rg "TEMPORARY|TEMP|REMOVE BEFORE|DELETE ME" -t code -i
# Find technical debt markers
rg "TECHNICAL DEBT|TECH DEBT|REFACTOR|NEEDS REFACTORING" -t code -i
# Find security concerns
rg "SECURITY|INSECURE|VULNERABILITY|CVE-" -t code -i
# Find performance issues
rg "SLOW|PERFORMANCE|OPTIMIZE|BOTTLENECK" -t code -i2. Parse Comment Context
Extract meaningful information from comments:
class CommentParser {
parseComment(file, lineNumber, comment) {
const parsed = {
type: 'todo',
priority: 'medium',
title: '',
description: '',
author: null,
date: null,
tags: [],
code_context: '',
file_path: file,
line_number: lineNumber
};
// Detect comment type
if (comment.match(/FIXME/i)) {
parsed.type = 'fixme';
parsed.priority = 'high';
} else if (comment.match(/HACK|XXX/i)) {
parsed.type = 'hack';
parsed.priority = 'high';
} else if (comment.match(/OPTIMIZE|PERFORMANCE/i)) {
parsed.type = 'optimization';
} else if (comment.match(/DEPRECATED/i)) {
parsed.type = 'deprecation';
parsed.priority = 'high';
} else if (comment.match(/SECURITY/i)) {
parsed.type = 'security';
parsed.priority = 'urgent';
}
// Extract author and date
const authorMatch = comment.match(/@(\w+)|by (\w+)/i);
if (authorMatch) {
parsed.author = authorMatch[1] || authorMatch[2];
}
const dateMatch = comment.match(/(\d{4}-\d{2}-\d{2})|(\d{1,2}\/\d{1,2}\/\d{2,4})/);
if (dateMatch) {
parsed.date = dateMatch[0];
}
// Extract title and description
const cleanComment = comment
.replace(/^\/\/\s*|^\/\*\s*|\*\/\s*$|^#\s*/g, '')
.replace(/TODO|FIXME|HACK|XXX/i, '')
.trim();
const parts = cleanComment.split(/[:\-–—]/);
if (parts.length > 1) {
parsed.title = parts[0].trim();
parsed.description = parts.slice(1).join(':').trim();
} else {
parsed.title = cleanComment;
}
// Extract tags
const tagMatch = comment.match(/#(\w+)/g);
if (tagMatch) {
parsed.tags = tagMatch.map(tag => tag.substring(1));
}
return parsed;
}
getCodeContext(file, lineNumber, contextLines = 5) {
const lines = readFileLines(file);
const start = Math.max(0, lineNumber - contextLines);
const end = Math.min(lines.length, lineNumber + contextLines);
return lines.slice(start, end).map((line, i) => ({
number: start + i + 1,
content: line,
isTarget: start + i + 1 === lineNumber
}));
}
}3. Group and Deduplicate
Organize found issues intelligently:
class TaskGrouper {
groupTasks(parsedComments) {
const groups = {
byFile: new Map(),
byType: new Map(),
byAuthor: new Map(),
byModule: new Map()
};
for (const comment of parsedComments) {
// Group by file
if (!groups.byFile.has(comment.file_path)) {
groups.byFile.set(comment.file_path, []);
}
groups.byFile.get(comment.file_path).push(comment);
// Group by type
if (!groups.byType.has(comment.type)) {
groups.byType.set(comment.type, []);
}
groups.byType.get(comment.type).push(comment);
// Group by module
const module = this.extractModule(comment.file_path);
if (!groups.byModule.has(module)) {
groups.byModule.set(module, []);
}
groups.byModule.get(module).push(comment);
}
return groups;
}
mergeSimilarTasks(tasks) {
const merged = [];
const seen = new Set();
for (const task of tasks) {
if (seen.has(task)) continue;
// Find similar tasks
const similar = tasks.filter(t =>
t !== task &&
!seen.has(t) &&
this.areSimilar(task, t)
);
if (similar.length > 0) {
// Merge into one task
const mergedTask = {
...task,
title: this.generateMergedTitle(task, similar),
description: this.generateMergedDescription(task, similar),
locations: [task, ...similar].map(t => ({
file: t.file_path,
line: t.line_number
}))
};
merged.push(mergedTask);
seen.add(task);
similar.forEach(t => seen.add(t));
} else {
merged.push(task);
seen.add(task);
}
}
return merged;
}
}4. Analyze Technical Debt
Identify code quality issues:
class TechnicalDebtAnalyzer {
async analyzeFile(filePath) {
const issues = [];
const content = await readFile(filePath);
const lines = content.split('\n');
// Check for long functions
const functionMatches = content.matchAll(/function\s+(\w+)|(\w+)\s*=\s*\(.*?\)\s*=>/g);
for (const match of functionMA comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Other commands on claude-command-suite.
- /boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Open command - /boundary-detect
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Open command - /boundary-heatmap
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Open command - /boundary-risk-assess
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Open command - /boundary-safe-bridge
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Open command - /optimize-prompt
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles: common words tokenize more efficiently, unusual words break into more tokens, and conciseness reduces cost.
Open command

