open-source-license
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLegal Disclaimer
法律免责声明
This skill is provided for informational and educational purposes only and does not constitute legal advice. The analysis and information provided should not be relied upon as a substitute for consultation with a qualified attorney. No attorney-client relationship is created by using this skill. Open source licensing involves complex legal considerations that may vary by jurisdiction. Laws and regulations vary by jurisdiction and change over time. Always consult with a licensed attorney in your jurisdiction for advice on specific legal matters. The creators and publishers of this skill disclaim any liability for actions taken or not taken based on the information provided.
本技能仅用于信息提供和教育目的,不构成法律建议。本技能提供的分析和信息不能替代合格律师的专业咨询。使用本技能不构成律师-客户关系。开源许可涉及复杂的法律考量,可能因司法管辖区而异。法律法规因司法管辖区不同存在差异,且会随时间发生变化。针对特定法律问题,请始终咨询您所在司法管辖区的执业律师。本技能的创作者和发布者不对基于所提供信息采取或未采取的行动承担任何责任。
Open Source License Skill
开源许可证技能
Comprehensive guidance for open source license selection, compliance review, and documentation drafting.
为开源许可证选择、合规审查和文档起草提供全面指导。
Capabilities
功能
1. License Selection
1. 许可证选择
Help users choose the right license based on their goals using the decision tree.
通过决策树帮助用户根据自身目标选择合适的许可证。
2. License Comparison
2. 许可证对比
Explain differences between licenses, compatibility, and trade-offs.
解释不同许可证之间的差异、兼容性和取舍关系。
3. Compliance Review
3. 合规审查
Analyze projects for license compliance issues and compatibility conflicts.
分析项目存在的许可证合规问题和兼容性冲突。
4. License Drafting
4. 许可证起草
Generate LICENSE files, NOTICE files, and source file headers using canonical texts.
使用规范文本生成LICENSE文件、NOTICE文件和源码文件头。
5. Mulan PSL v2 Guidance
5. Mulan PSL v2指导
Explain 木兰宽松许可证 / Mulan PSL v2, compare it with MIT or Apache-2.0, and generate canonical text or headers from the bundled reference.
解释木兰宽松许可证 / Mulan PSL v2,将其与MIT或Apache-2.0进行对比,基于内置参考资料生成规范文本或文件头。
Workflow
工作流
For License Selection Questions
处理许可证选择相关问题
- Read
references/selection/decision-tree.md - Ask clarifying questions based on the decision tree:
- Primary goal (adoption vs keeping code open)?
- Patent protection needed?
- Library or application?
- SaaS/network use?
- Provide recommendation with reasoning
- Reference notable projects using recommended license
- Offer to generate LICENSE file if desired
- 读取
references/selection/decision-tree.md - 基于决策树询问澄清问题:
- 核心目标(扩大采用率 vs 保持代码开源)?
- 是否需要专利保护?
- 是库还是应用?
- 是否涉及SaaS/网络服务使用场景?
- 提供推荐结果及理由
- 列举使用推荐许可证的知名项目作为参考
- 若用户需要,可提供生成LICENSE文件的服务
For License Comparison Questions
处理许可证对比相关问题
- Read
references/selection/comparison-matrix.md - If the request mentions 木兰宽松许可证 or Mulan PSL v2, also read
references/mulan-psl-v2.md - Compare requested licenses across key dimensions:
- Permissions (commercial use, distribution, modification)
- Conditions (attribution, copyleft, source disclosure)
- Limitations (liability, warranty)
- Highlight key differences
- Provide examples of projects using each license when available
- 读取
references/selection/comparison-matrix.md - 如果请求中提到木兰宽松许可证或Mulan PSL v2,额外读取
references/mulan-psl-v2.md - 从核心维度对比用户询问的许可证:
- 权限(商用、分发、修改)
- 条件(署名、copyleft、源码披露)
- 限制(责任、担保)
- 突出核心差异
- 如有可用案例,提供每个许可证对应的使用项目示例
For Compliance Review
处理合规审查相关问题
- Read and
references/compliance/compatibility.mdreferences/compliance/checklist.md - Identify all licenses in the project
- Check compatibility between licenses
- Flag any copyleft licenses that may affect distribution
- Note any missing attribution or compliance gaps
- Provide actionable remediation steps
- Reference for context
references/compliance/common-issues.md
- 读取 和
references/compliance/compatibility.mdreferences/compliance/checklist.md - 识别项目中涉及的所有许可证
- 检查许可证之间的兼容性
- 标记可能影响分发的copyleft许可证
- 指出缺失的署名或合规漏洞
- 提供可落地的修复步骤
- 参考 补充上下文说明
references/compliance/common-issues.md
For License/NOTICE File Generation
处理LICENSE/NOTICE文件生成需求
- Read appropriate template from
references/templates/ - CRITICAL: Always use canonical license text exactly as provided
- Never modify license terms or generate license text from scratch
- Only fill in placeholders: ,
[YEAR],[FULLNAME][PROJECT NAME] - For NOTICE files, aggregate third-party attributions properly
- For headers, use language-appropriate comment syntax
- 从 中读取对应模板
references/templates/ - 关键要求:始终严格使用规范许可证原文
- 不得修改许可证条款,也不得从零生成许可证文本
- 仅可填充占位符:、
[YEAR]、[FULLNAME][PROJECT NAME] - 生成NOTICE文件时,需正确汇总第三方署名信息
- 生成文件头时,使用对应编程语言的注释语法
For Mulan PSL v2 Questions
处理Mulan PSL v2相关问题
- Read
references/mulan-psl-v2.md - Explain the key traits:
- Permissive license
- Express copyright grant
- Express patent grant
- Patent retaliation clause
- No trademark license
- Distribution requires providing a copy of the license and retaining copyright, patent, trademark, and disclaimer notices
- Chinese and English texts have equal legal effect, but the Chinese version prevails if they diverge
- If the user wants to adopt Mulan PSL v2:
- Provide the official three-step application guidance
- Output the canonical header text when requested
- Output the canonical license text from the bundled reference when requested
- Compare with MIT or Apache-2.0 when helpful:
- MIT is simpler but has no express patent grant in the text
- Apache-2.0 and Mulan PSL v2 both include express patent language, but they are not interchangeable licenses
- 读取
references/mulan-psl-v2.md - 解释核心特性:
- 宽松许可证
- 明确的版权授予
- 明确的专利授予
- 专利报复条款
- 无商标授权
- 分发时需提供许可证副本,并保留版权、专利、商标和免责声明
- 中英文版本具有同等法律效力,如有冲突以中文版本为准
- 如果用户希望采用Mulan PSL v2:
- 提供官方三步申请指南
- 应要求输出规范文件头文本
- 应要求输出内置参考资料中的规范许可证文本
- 如有帮助,可与MIT或Apache-2.0对比:
- MIT更简单,但文本中没有明确的专利授予条款
- Apache-2.0和Mulan PSL v2都包含明确的专利相关表述,但二者不可互换
Reference Files
参考文件
| Topic | File |
|---|---|
| Permissive licenses (MIT, Apache, BSD, ISC) | |
| Copyleft licenses (GPL, LGPL, AGPL, MPL) | |
| Other licenses (CC, Boost, zlib) | |
| License comparison table | |
| License selection guide | |
| License compatibility rules | |
| Compliance checklist | |
| Common compliance mistakes | |
| LICENSE file templates | |
| NOTICE file templates | |
| Source header templates | |
| Mulan PSL v2 reference and canonical text | |
| 主题 | 文件 |
|---|---|
| 宽松许可证(MIT、Apache、BSD、ISC) | |
| Copyleft许可证(GPL、LGPL、AGPL、MPL) | |
| 其他许可证(CC、Boost、zlib) | |
| 许可证对比矩阵 | |
| 许可证选择指南 | |
| 许可证兼容性规则 | |
| 合规检查清单 | |
| 常见合规问题 | |
| LICENSE文件模板 | |
| NOTICE文件模板 | |
| 源码文件头模板 | |
| Mulan PSL v2参考资料与规范文本 | |
Key Rules
核心规则
Never Generate License Text
绝不自行生成许可证文本
Always use canonical license text from templates. License texts are legal documents that must be exact. Do not:
- Paraphrase license terms
- Generate license text from memory
- Modify standard license language
- Create "custom" licenses
始终使用模板中的规范许可证文本。许可证文本是法律文件,必须完全准确。禁止以下行为:
- 改写许可证条款
- 凭记忆生成许可证文本
- 修改标准许可证表述
- 创建“自定义”许可证
Include Project Examples
包含项目示例
When discussing licenses, mention notable projects that use them:
- MIT: React, Node.js, jQuery, Rails, Angular
- Apache-2.0: Kubernetes, TensorFlow, Android, Spark
- GPL-3.0: WordPress, GIMP, Bash
- AGPL-3.0: Nextcloud, Mastodon, Grafana
- BSD-3-Clause: Django, Flask, numpy
- MPL-2.0: Firefox, Thunderbird
- Mulan PSL v2: Mention that it is widely used in Chinese open source ecosystems when relevant, and prefer describing characteristics over naming projects unless you are certain of a well-known example.
讨论许可证时,提及使用该许可证的知名项目:
- MIT: React、Node.js、jQuery、Rails、Angular
- Apache-2.0: Kubernetes、TensorFlow、Android、Spark
- GPL-3.0: WordPress、GIMP、Bash
- AGPL-3.0: Nextcloud、Mastodon、Grafana
- BSD-3-Clause: Django、Flask、numpy
- MPL-2.0: Firefox、Thunderbird
- Mulan PSL v2: 相关场景下可说明其在中国开源生态中被广泛使用,除非确定有知名案例,否则优先描述特性而非列举项目。
Flag Complex Scenarios
标记复杂场景
Recommend legal counsel for:
- Dual licensing strategies
- License changes mid-project
- Commercial projects with copyleft dependencies
- AGPL in SaaS environments
- Multi-jurisdictional distribution
- Patent-sensitive situations
出现以下情况时建议咨询法律顾问:
- 双许可策略
- 项目中途变更许可证
- 带有copyleft依赖的商业项目
- SaaS环境中使用AGPL
- 跨司法管辖区分发
- 专利敏感场景
Quick Answers
快速问答
"What license should I use?"
"我应该使用什么许可证?"
→ Follow decision tree; default to MIT for simplicity or Apache-2.0 for patent protection.
→ 遵循决策树;追求简单默认选MIT,需要专利保护默认选Apache-2.0。
"Can I use GPL code in my proprietary app?"
"我可以在专有应用中使用GPL代码吗?"
→ Generally no, unless through LGPL dynamic linking or separate processes.
→ 一般不可以,除非通过LGPL动态链接或独立进程的方式使用。
"What's the difference between MIT and Apache-2.0?"
"MIT和Apache-2.0有什么区别?"
→ Apache-2.0 includes explicit patent grant and retaliation clause; MIT is simpler but no patent protection.
→ Apache-2.0包含明确的专利授予和报复条款;MIT更简单但无专利保护。
"What's the difference between Apache-2.0 and Mulan PSL v2?"
"Apache-2.0和Mulan PSL v2有什么区别?"
→ Both are permissive and include express patent language, but Mulan PSL v2 uses its own text and bilingual Chinese/English form, with the Chinese version prevailing if the two diverge.
→ 二者都是宽松许可证且包含明确的专利相关表述,但Mulan PSL v2使用独立文本和中英双语形式,如有冲突以中文版本为准。
"Is Apache-2.0 compatible with GPL?"
"Apache-2.0和GPL兼容吗?"
→ Apache-2.0 is compatible with GPL-3.0, but NOT with GPL-2.0.
→ Apache-2.0与GPL-3.0兼容,但与GPL-2.0不兼容。
"Do I need to open source my code if I use AGPL?"
"如果我使用AGPL,需要开源我的代码吗?"
→ Only if you modify the AGPL code AND provide it as a network service. Using unmodified AGPL tools internally doesn't trigger copyleft.
→ 仅当你修改了AGPL代码且将其作为网络服务提供时需要。内部使用未修改的AGPL工具不会触发copyleft条款。
Output Format
输出格式
When generating LICENSE files:
- Confirm the license choice
- Ask for copyright holder name and year
- Output the complete canonical license text
- Remind user to place it in repository root as or
LICENSELICENSE.txt
When reviewing compliance:
- List all identified licenses
- Show compatibility analysis
- Flag any issues with severity (critical/warning/info)
- Provide specific remediation steps
生成LICENSE文件时:
- 确认许可证选择
- 询问版权持有者名称和年份
- 输出完整的规范许可证文本
- 提醒用户将文件放在仓库根目录,命名为或
LICENSELICENSE.txt
合规审查输出时:
- 列出所有识别到的许可证
- 展示兼容性分析结果
- 标记所有问题及严重等级(严重/警告/提示)
- 提供具体的修复步骤