360 Secure SkillHub
360 安全技能中心

todo-manager

扫描工作区源码中的 TODO、FIXME、HACK、XXX 注释,按标签整理为结构化任务清单,支持统计和筛选,并可将结果保存为本地 JSON 文件。

分类:开发
147258xuan
147258xuan
热度 2.74
最近更新 2026-11-13 18:45:31

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add 147258xuan/todo-manager
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
todo-manager
description
Scan workspace files for TODO/FIXME/HACK comments, list them with context, and optionally sync to a local task file. Use when you need to track code TODOs or audit outstanding work.

Todo Manager

Scans workspace source files for TODO, FIXME, HACK, and XXX comments and presents them as a structured task list.

Usage

const { scanTodos, formatReport, getSummary, filterByTag } = require('./skills/todo-manager');
const todos = scanTodos('.');
console.log(formatReport(todos));
console.log(getSummary(todos));
const onlyTodos = filterByTag(todos, 'TODO');

Integration

Can be combined with quick-healthcheck for a full system audit:

const healthcheck = require('./skills/quick-healthcheck');
const todoManager = require('./skills/todo-manager');

const health = healthcheck.quick();
const todos = todoManager.scanTodos('.');

console.log('=== SYSTEM AUDIT ===');
console.log(health);
console.log(todoManager.getSummary(todos));

Functions

scanTodos(rootDir, options)

  • rootDir — directory to scan (default: .)
  • options.extensions — file extensions to scan (default: ['.js', '.ts', '.py', '.md', '.json'])
  • options.ignore — directories to skip (default: ['node_modules', '.git', 'dist'])
  • Returns array of { file, line, column, tag, text, context }

formatReport(todos)

  • Returns a formatted string report grouped by tag (TODO/FIXME/HACK/XXX)

getSummary(todos)

  • Returns { total, byTag } summary object

filterByTag(todos, tag)

  • Returns array filtered to only include the specified tag (e.g. 'TODO', 'FIXME')

saveTodos(todos, outputPath)

  • Saves todos as JSON to outputPath (default: memory/todos.json)

CLI

node skills/todo-manager/scripts/scan.js [directory]