Skip to content

peterfei/ai-agent-team / .claude/skills/softcopyright

softcopyright

Flagged

智能软件著作权申请材料生成工具。自动分析项目源码,生成符合软著申请要求的软件说明书和源代码文档。支持关键词搜索、智能源码分析、格式化输出和PDF导出。

FileKindSize
.npmignoreother14 B
CHANGELOG.mdmarkdown6.8 KB
IMPLEMENTATION_REPORT.mdmarkdown7.5 KB
LICENSEother1.0 KB
PERFORMANCE_OPTIMIZATION.mdmarkdown4.0 KB
PERFORMANCE_OPTIMIZATION_SUMMARY.mdmarkdown7.8 KB
PERFORMANCE_QUICK_START.mdmarkdown6.6 KB
README.mdmarkdown6.5 KB
SKILL.mdskill md7.6 KB
TESTING_GUIDE.mdmarkdown11.4 KB
USAGE_EXAMPLES.mdmarkdown8.4 KB
demo-keywords.mdmarkdown2.5 KB
install.shexecutablescript1.5 KB
package-lock.jsonmanifest122.7 KB
package.jsonmanifest1.1 KB
scripts/auto-pdf-generator.jsscript5.2 KB
scripts/auto-print-pdf.jsscript7.1 KB
scripts/chinese-pdf-fix.jsscript4.0 KB
scripts/cli.jsexecutablescript5.9 KB
scripts/doc-generator-english.jsscript13.2 KB
scripts/doc-generator-new.jsscript624 B
scripts/doc-generator.jsscript28.1 KB
scripts/font-manager.jsscript5.7 KB
scripts/html-pdf-generator.jsscript17.3 KB
scripts/html-source-exporter.jsscript30.8 KB
scripts/html-to-pdf.jsscript5.6 KB
scripts/index.jsscript17.3 KB
scripts/index.js.pdf-backupother12.3 KB
scripts/run.batscript463 B
scripts/run.shexecutablescript893 B
scripts/scanner-optimized.jsscript21.9 KB
scripts/scanner.jsscript22.2 KB
scripts/simple-doc-generator.jsscript25.9 KB
scripts/simple-pdf-generator.jsscript14.4 KB
scripts/simple-source-exporter.jsscript4.6 KB
scripts/source-exporter.jsscript13.1 KB
scripts/system-chrome-pdf.jsscript7.0 KB
scripts/utils-optimized.jsscript4.8 KB
scripts/utils.jsscript9.2 KB
softcopyrightexecutablescript150 B
softcopyright-generateexecutablescript168 B
softcopyright-generate.batscript194 B
softcopyright-manualexecutablescript169 B
softcopyright-manual.batscript195 B
softcopyright-sourceexecutablescript169 B
softcopyright-source.batscript195 B
softcopyright.batscript176 B
templates/software-manual.mdmarkdown6.0 KB
test-auto-pdf.jsscript636 B
test-clean-header-footer.jsscript2.3 KB
test-complete.jsscript848 B
test-counter-fix.jsexecutablescript2.3 KB
test-fixed-page-number.jsscript2.4 KB
test-html-generation.jsscript2.9 KB
test-html.jsscript732 B
test-no-border.jsscript1.8 KB
test-pdf.jsscript639 B
test-performance.jsexecutablescript4.9 KB

test-performance.js

View on GitHub
#!/usr/bin/env node

const chalk = require('chalk');
const path = require('path');

/**
 * 性能测试脚本
 * 对比优化前后的性能差异
 */

async function runPerformanceTest() {
    console.log(chalk.blue.bold('\n========================================'));
    console.log(chalk.blue.bold('  SoftCopyright 性能测试'));
    console.log(chalk.blue.bold('========================================\n'));

    // 测试项目路径
    const testPath = process.argv[2] || process.cwd();
    console.log(chalk.cyan(`测试项目: ${testPath}\n`));

    // 测试1: 使用优化版本
    console.log(chalk.yellow('📊 测试1: 优化版本(默认)'));
    console.log(chalk.gray('----------------------------------------'));

    delete require.cache[require.resolve('./scripts/scanner')];
    const scannerOptimized = require('./scripts/scanner');

    const start1 = Date.now();
    const result1 = await scannerOptimized.scanProject(testPath);
    const time1 = Date.now() - start1;

    console.log(chalk.green(`✅ 完成! 耗时: ${time1}ms`));
    console.log(chalk.cyan(`   - 文件数: ${result1.files.length}`));
    console.log(chalk.cyan(`   - 代码行数: ${result1.totalLines}`));
    console.log(chalk.cyan(`   - 扫描耗时: ${result1.performance.scanTime}ms`));
    console.log(chalk.cyan(`   - 分析耗时: ${result1.performance.analysisTime}ms\n`));

    // 测试2: 禁用优化
    console.log(chalk.yellow('📊 测试2: 禁用优化'));
    console.log(chalk.gray('----------------------------------------'));

    process.env.SOFTCOPYRIGHT_NO_OPTIMIZATION = '1';
    delete require.cache[require.resolve('./scripts/scanner')];
    const scannerOriginal = require('./scripts/scanner');

    const start2 = Date.now();
    const result2 = await scannerOriginal.scanProject(testPath);
    const time2 = Date.now() - start2;

    console.log(chalk.green(`✅ 完成! 耗时: ${time2}ms`));
    console.log(chalk.cyan(`   - 文件数: ${result2.files.length}`));
    console.log(chalk.cyan(`   - 代码行数: ${result2.totalLines}\n`));

    // 恢复环境变量
    delete process.env.SOFTCOPYRIGHT_NO_OPTIMIZATION;

    // 性能对比
    console.log(chalk.blue.bold('========================================'));
    console.log(chalk.blue.bold('  性能对比结果'));
    console.log(chalk.blue.bold('========================================\n'));

    const improvement = ((time2 - time1) / time2 * 100).toFixed(1);
    const speedup = (time2 / time1).toFixed(2);

    console.log(chalk.green(`性能提升: ${improvement}%`));
    console.log(chalk.green(`加速倍数: ${speedup}x`));
    console.log(chalk.cyan(`优化版耗时: ${time1}ms`));
    console.log(chalk.cyan(`原始版耗时: ${time2}ms`));
    console.log(chalk.cyan(`节省时间: ${time2 - time1}ms\n`));

    // 详细对比
    if (result1.performance) {
        console.log(chalk.yellow('详细性能指标:'));
        console.log(chalk.gray('----------------------------------------'));
        console.log(chalk.cyan(`文件扫描: ${result1.performance.scanTime}ms`));
        console.log(chalk.cyan(`文件分析: ${result1.performance.analysisTime}ms`));
        console.log(chalk.cyan(`处理文件: ${result1.performance.filesProcessed}`));
        console.log(chalk.cyan(`跳过文件: ${result1.performance.filesSkipped}`));

        if (result1.performance.filesProcessed > 0) {
            const avgTime = result1.performance.analysisTime / result1.performance.filesProcessed;
            console.log(chalk.cyan(`平均每文件: ${avgTime.toFixed(2)}ms\n`));
        }
    }

    // 性能评级
    console.log(chalk.yellow('性能评级:'));
    console.log(chalk.gray('----------------------------------------'));

    let rating = '';
    let color = chalk.green;

    if (improvement >= 70) {
        rating = '🌟🌟🌟🌟🌟 优秀';
        color = chalk.green.bold;
    } else if (improvement >= 50) {
        rating = '🌟🌟🌟🌟 良好';
        color = chalk.green;
    } else if (improvement >= 30) {
        rating = '🌟🌟🌟 中等';
        color = chalk.yellow;
    } else if (improvement >= 10) {
        rating = '🌟🌟 一般';
        color = chalk.yellow;
    } else {
        rating = '🌟 较差';
        color = chalk.red;
    }

    console.log(color(rating));
    console.log('');

    // 建议
    if (improvement < 30) {
        console.log(chalk.yellow('💡 优化建议:'));
        console.log(chalk.gray('----------------------------------------'));
        console.log(chalk.cyan('- 项目文件较少,优化效果不明显'));
        console.log(chalk.cyan('- 尝试在更大的项目上测试'));
        console.log(chalk.cyan('- 考虑启用更多优化选项\n'));
    }

    console.log(chalk.blue.bold('========================================\n'));
}

// 运行测试
runPerformanceTest().catch(error => {
    console.error(chalk.red('❌ 测试失败:'), error.message);
    console.error(error.stack);
    process.exit(1);
});
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall