Back to Skills

copyright-docs

majiayu000
Updated Yesterday
58
9
58
View on GitHub
Metawordaidesign

About

This Claude Skill generates software copyright design specification documents compliant with China Copyright Protection Center (CPCC) standards. It analyzes source code to automatically create complete design documents with Mermaid diagrams, specifically for software copyright registration and intellectual property protection. Use it when you need to prepare documentation for "软著申请" (software copyright application) or CPCC submissions.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/copyright-docs

Copy and paste this command in Claude Code to install this skill

Documentation

Software Copyright Documentation Skill

Generate CPCC-compliant software design specification documents (软件设计说明书) through multi-phase code analysis.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│  Context-Optimized Architecture                                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Phase 1: Metadata        → project-metadata.json               │
│           ↓                                                      │
│  Phase 2: 6 Parallel      → sections/section-N.md (直接写MD)    │
│           Agents              ↓ 返回简要JSON                     │
│           ↓                                                      │
│  Phase 2.5: Consolidation → cross-module-summary.md             │
│           Agent               ↓ 返回问题列表                     │
│           ↓                                                      │
│  Phase 4: Assembly        → 合并MD + 跨模块总结                  │
│           ↓                                                      │
│  Phase 5: Refinement      → 最终文档                             │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Key Design Principles

  1. Agent 直接输出 MD: 避免 JSON → MD 转换的上下文开销
  2. 简要返回: Agent 只返回路径+摘要,不返回完整内容
  3. 汇总 Agent: 独立 Agent 负责跨模块问题检测
  4. 引用合并: Phase 4 读取文件合并,不在上下文中传递

Execution Flow

┌─────────────────────────────────────────────────────────────────┐
│  Phase 1: Metadata Collection                                    │
│  → Read: phases/01-metadata-collection.md                        │
│  → Collect: software name, version, category, scope              │
│  → Output: project-metadata.json                                 │
├─────────────────────────────────────────────────────────────────┤
│  Phase 2: Deep Code Analysis (6 Parallel Agents)                 │
│  → Read: phases/02-deep-analysis.md                              │
│  → Reference: specs/cpcc-requirements.md                         │
│  → Each Agent: 分析代码 → 直接写 sections/section-N.md           │
│  → Return: {"status", "output_file", "summary", "cross_notes"}   │
├─────────────────────────────────────────────────────────────────┤
│  Phase 2.5: Consolidation (New!)                                 │
│  → Read: phases/02.5-consolidation.md                            │
│  → Input: Agent 返回的简要信息 + cross_module_notes              │
│  → Analyze: 一致性/完整性/关联性/质量检查                         │
│  → Output: cross-module-summary.md                               │
│  → Return: {"issues": {errors, warnings, info}, "stats"}         │
├─────────────────────────────────────────────────────────────────┤
│  Phase 4: Document Assembly                                      │
│  → Read: phases/04-document-assembly.md                          │
│  → Check: 如有 errors,提示用户处理                               │
│  → Merge: Section 1 + sections/*.md + 跨模块附录                  │
│  → Output: {软件名称}-软件设计说明书.md                            │
├─────────────────────────────────────────────────────────────────┤
│  Phase 5: Compliance Review & Refinement                         │
│  → Read: phases/05-compliance-refinement.md                      │
│  → Reference: specs/cpcc-requirements.md                         │
│  → Loop: 发现问题 → 提问 → 修复 → 重新检查                        │
└─────────────────────────────────────────────────────────────────┘

Document Sections (7 Required)

SectionTitleDiagramAgent
1软件概述-Phase 4 生成
2系统架构图graph TDarchitecture
3功能模块设计flowchart TDfunctions
4核心算法与流程flowchart TDalgorithms
5数据结构设计classDiagramdata_structures
6接口设计sequenceDiagraminterfaces
7异常处理设计flowchart TDexceptions

Directory Setup

// 生成时间戳目录名
const timestamp = new Date().toISOString().slice(0,19).replace(/[-:T]/g, '');
const dir = `.workflow/.scratchpad/copyright-${timestamp}`;

// Windows (cmd)
Bash(`mkdir "${dir}\\sections"`);
Bash(`mkdir "${dir}\\iterations"`);

// Unix/macOS
// Bash(`mkdir -p "${dir}/sections" "${dir}/iterations"`);

Output Structure

.workflow/.scratchpad/copyright-{timestamp}/
├── project-metadata.json          # Phase 1
├── sections/                      # Phase 2 (Agent 直接写入)
│   ├── section-2-architecture.md
│   ├── section-3-functions.md
│   ├── section-4-algorithms.md
│   ├── section-5-data-structures.md
│   ├── section-6-interfaces.md
│   └── section-7-exceptions.md
├── cross-module-summary.md        # Phase 2.5
├── iterations/                    # Phase 5
│   ├── v1.md
│   └── v2.md
└── {软件名称}-软件设计说明书.md     # Final Output

Reference Documents

DocumentPurpose
phases/01-metadata-collection.mdSoftware info collection
phases/02-deep-analysis.md6-agent parallel analysis
phases/02.5-consolidation.mdCross-module consolidation
phases/04-document-assembly.mdDocument merge & assembly
phases/05-compliance-refinement.mdIterative refinement loop
specs/cpcc-requirements.mdCPCC compliance checklist
templates/agent-base.mdAgent prompt templates
../_shared/mermaid-utils.mdShared Mermaid utilities

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/copyright-docs

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

creating-opencode-plugins

Meta

This skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.

View skill

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill