peterfei/ai-agent-team / .claude/skills/drawnote
drawnote-skill
Verified智能笔记与流程图绘制工具(优化版-无权限读取)。根据用户提供的内容,自动生成精美的可视化笔记和流程图,支持多种风格(手写笔记、思维导图、流程图等),并导出为图片。使用内置模板,无需读取文件权限。适用于:(1) 学习笔记可视化,(2) 知识梳理与总结,(3) 流程图绘制,(4) 概念解释图表
| File | Kind | Size |
|---|---|---|
| .npmignore | other | 14 B |
| SKILL.md | skill md | 12.9 KB |
| package-lock.json | manifest | 2.5 KB |
| package.json | manifest | 769 B |
| scripts/capture.jsexecutable | script | 6.0 KB |
| scripts/check-status.js | script | 5.1 KB |
| scripts/install-dependencies.js | script | 1.5 KB |
| scripts/verify-installation.js | script | 4.7 KB |
| styles/彩色手写笔记风格.md | markdown | 12.0 KB |
| 生成信息图提示词.md | markdown | 11.5 KB |
| 风格使用指南.md | markdown | 10.7 KB |
scripts/check-status.js
View on GitHub#!/usr/bin/env node
/**
* DrawNote Skill 安装状态检查工具
* 用于查看后台静默安装的进度
*/
const fs = require('fs');
const path = require('path');
console.log('📊 DrawNote Skill 安装状态检查');
console.log('==================================');
const skillDir = path.dirname(__dirname);
const statusFile = path.join(skillDir, '.install-status.json');
const logFile = path.join(skillDir, 'install.log');
const nodeModulesPath = path.join(skillDir, 'node_modules');
function checkDependencies() {
const playwrightPath = path.join(nodeModulesPath, 'playwright');
const playwrightCorePath = path.join(nodeModulesPath, 'playwright-core');
const checks = {
'node_modules': fs.existsSync(nodeModulesPath),
'playwright': fs.existsSync(playwrightPath),
'playwright-core': fs.existsSync(playwrightCorePath)
};
return checks;
}
function formatTime(isoString) {
if (!isoString) return '未知';
const date = new Date(isoString);
return date.toLocaleString('zh-CN');
}
function formatDuration(startTime, endTime) {
if (!startTime) return '未知';
const start = new Date(startTime);
const end = endTime ? new Date(endTime) : new Date();
const duration = Math.floor((end - start) / 1000);
if (duration < 60) {
return `${duration}秒`;
} else if (duration < 3600) {
return `${Math.floor(duration / 60)}分${duration % 60}秒`;
} else {
const hours = Math.floor(duration / 3600);
const minutes = Math.floor((duration % 3600) / 60);
return `${hours}小时${minutes}分`;
}
}
function main() {
console.log(`📁 检查目录: ${skillDir}`);
// 检查依赖状态
const dependencies = checkDependencies();
console.log('\n🔍 依赖状态:');
Object.entries(dependencies).forEach(([name, exists]) => {
console.log(` ${exists ? '✅' : '❌'} ${name}`);
});
// 检查安装状态文件
if (fs.existsSync(statusFile)) {
try {
const status = JSON.parse(fs.readFileSync(statusFile));
console.log('\n📋 安装状态:');
console.log(` 状态: ${status.status}`);
console.log(` 消息: ${status.message}`);
console.log(` 开始时间: ${formatTime(status.startTime)}`);
if (status.lastUpdate) {
console.log(` 最后更新: ${formatTime(status.lastUpdate)}`);
console.log(` 已用时间: ${formatDuration(status.startTime, status.lastUpdate)}`);
}
// 根据状态提供建议
switch (status.status) {
case 'starting':
console.log('\n⏳ 正在启动安装进程...');
break;
case 'installing':
console.log('\n📦 正在安装依赖,请耐心等待...');
console.log('💡 您可以继续使用其他功能,安装在后台进行');
break;
case 'completed':
case 'success':
console.log('\n🎉 安装完成!DrawNote Skill 已完全可用');
break;
case 'error':
console.log('\n❌ 安装遇到错误');
console.log('🔧 建议手动执行:');
console.log(` cd ${skillDir}`);
console.log(' npm install');
break;
}
} catch (error) {
console.log('\n❌ 无法读取安装状态文件');
}
} else {
// 没有状态文件,检查是否已安装
if (dependencies.node_modules && dependencies.playwright) {
console.log('\n✅ DrawNote Skill 已完整安装并可用');
} else {
console.log('\n❓ 未检测到安装状态,依赖可能缺失');
console.log('🔧 建议执行安装:');
console.log(` cd ${skillDir}`);
console.log(' npm install');
}
}
// 检查日志文件
const logFiles = [
{ name: '守护进程日志', file: path.join(skillDir, 'daemon.log') },
{ name: '安装日志', file: logFile }
];
logFiles.forEach(({ name, file }) => {
if (fs.existsSync(file)) {
const stats = fs.statSync(file);
console.log(`\n📝 ${name}:`);
console.log(` 文件大小: ${(stats.size / 1024).toFixed(1)} KB`);
console.log(` 最后修改: ${stats.mtime.toLocaleString('zh-CN')}`);
console.log(` 查看日志: tail -f "${file}"`);
}
});
// 检查守护进程状态
const lockFile = path.join(skillDir, '.daemon.lock');
if (fs.existsSync(lockFile)) {
try {
const pid = parseInt(fs.readFileSync(lockFile, 'utf8').trim());
console.log('\n🔒 守护进程状态:');
console.log(` PID: ${pid}`);
// 尝试检查进程是否还在运行
try {
process.kill(pid, 0); // 发送信号测试进程是否存在
console.log(' 状态: 运行中');
} catch (e) {
console.log(' 状态: 进程已退出(锁文件未清理)');
}
} catch (error) {
console.log('\n⚠️ 无法读取守护进程锁文件');
}
}
// 提供下一步建议
console.log('\n💡 可用命令:');
console.log(` npm run verify # 验证和修复安装`);
console.log(` npm run test # 测试截图功能`);
console.log(` npm run check # 检查安装状态(当前命令)`);
}
if (require.main === module) {
main();
}
module.exports = { checkDependencies };Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |