First published on Skala Legal Skills
Legal 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
Help users choose the right license based on their goals using the decision tree.
2. License Comparison
Explain differences between licenses, compatibility, and trade-offs.
3. Compliance Review
Analyze projects for license compliance issues and compatibility conflicts.
4. License Drafting
Generate LICENSE files, NOTICE files, and source file headers using canonical texts.
5. Mulan PSL v2 Guidance
Explain 木兰宽松许可证 / Mulan PSL v2, compare it with MIT or Apache-2.0, and generate canonical text or headers from the bundled reference.
Workflow
For License Selection Questions
- 1. Read INLINECODE0
- Ask clarifying questions based on the decision tree:
- Primary goal (adoption vs keeping code open)?
- Patent protection needed?
- Library or application?
- SaaS/network use?
- 3. Provide recommendation with reasoning
- Reference notable projects using recommended license
- Offer to generate LICENSE file if desired
For License Comparison Questions
- 1. Read INLINECODE1
- If the request mentions 木兰宽松许可证 or Mulan PSL v2, also read INLINECODE2
- Compare requested licenses across key dimensions:
- Permissions (commercial use, distribution, modification)
- Conditions (attribution, copyleft, source disclosure)
- Limitations (liability, warranty)
- 4. Highlight key differences
- Provide examples of projects using each license when available
For Compliance Review
- 1. Read
references/compliance/compatibility.md and INLINECODE4 - 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
references/compliance/common-issues.md for context
For License/NOTICE File Generation
- 1. Read appropriate template from INLINECODE6
- 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], INLINECODE9 - For NOTICE files, aggregate third-party attributions properly
- For headers, use language-appropriate comment syntax
For Mulan PSL v2 Questions
- 1. Read INLINECODE10
- 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
- 3. 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
- 4. 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
Reference Files
| Topic | File |
|---|
| Permissive licenses (MIT, Apache, BSD, ISC) | INLINECODE11 |
| Copyleft licenses (GPL, LGPL, AGPL, MPL) |
references/licenses/copyleft.md |
| Other licenses (CC, Boost, zlib) |
references/licenses/specialty.md |
| License comparison table |
references/selection/comparison-matrix.md |
| License selection guide |
references/selection/decision-tree.md |
| License compatibility rules |
references/compliance/compatibility.md |
| Compliance checklist |
references/compliance/checklist.md |
| Common compliance mistakes |
references/compliance/common-issues.md |
| LICENSE file templates |
references/templates/license-files.md |
| NOTICE file templates |
references/templates/notice-files.md |
| Source header templates |
references/templates/source-headers.md |
| Mulan PSL v2 reference and canonical text |
references/mulan-psl-v2.md |
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.
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
Quick Answers
"What license should I use?"
→ Follow decision tree; default to MIT for simplicity or Apache-2.0 for patent protection.
"Can I use GPL code in my proprietary app?"
→ Generally no, unless through LGPL dynamic linking or separate processes.
"What's the difference between MIT and Apache-2.0?"
→ Apache-2.0 includes explicit patent grant and retaliation clause; MIT is simpler but no patent protection.
"What's the difference between Apache-2.0 and 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.
"Is Apache-2.0 compatible with GPL?"
→ Apache-2.0 is compatible with GPL-3.0, but NOT with GPL-2.0.
"Do I need to open source my code if I use AGPL?"
→ Only if you modify the AGPL code AND provide it as a network service. Using unmodified AGPL tools internally doesn't trigger copyleft.
Output Format
When generating LICENSE files:
- 1. 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
LICENSE or INLINECODE24
When reviewing compliance:
- 1. List all identified licenses
- Show compatibility analysis
- Flag any issues with severity (critical/warning/info)
- Provide specific remediation steps
首次发布于 Skala Legal Skills
法律免责声明
本技能仅供信息和教育目的使用,不构成法律建议。所提供的分析和信息不应被视为咨询合格律师的替代方案。使用本技能不会创建律师-客户关系。开源许可涉及复杂的法律考量,可能因司法管辖区而异。法律法规因司法管辖区而异,并随时间变化。对于具体法律事务,请始终咨询您所在司法管辖区的持证律师。本技能的创建者和发布者不对基于所提供信息采取或不采取的任何行动承担责任。
开源许可证技能
关于开源许可证选择、合规性审查和文档起草的全面指导。
能力
1. 许可证选择
使用决策树帮助用户根据其目标选择合适的许可证。
2. 许可证比较
解释许可证之间的差异、兼容性和权衡。
3. 合规性审查
分析项目的许可证合规性问题和兼容性冲突。
4. 许可证起草
使用规范文本生成 LICENSE 文件、NOTICE 文件和源文件头。
5. 木兰 PSL v2 指导
解释木兰宽松许可证 / Mulan PSL v2,将其与 MIT 或 Apache-2.0 进行比较,并根据捆绑的参考文件生成规范文本或文件头。
工作流程
对于许可证选择问题
- 1. 阅读 references/selection/decision-tree.md
- 基于决策树提出澄清性问题:
- 主要目标(采用 vs 保持代码开放)?
- 是否需要专利保护?
- 是库还是应用程序?
- SaaS/网络使用?
- 3. 提供建议并附上理由
- 引用使用推荐许可证的知名项目
- 如果需要,提供生成 LICENSE 文件
对于许可证比较问题
- 1. 阅读 references/selection/comparison-matrix.md
- 如果请求提及“木兰宽松许可证”或“Mulan PSL v2”,也阅读 references/mulan-psl-v2.md
- 在关键维度上比较所请求的许可证:
- 权限(商业使用、分发、修改)
- 条件(署名、著佐权、源代码披露)
- 限制(责任、保证)
- 4. 突出关键差异
- 尽可能提供使用每个许可证的项目示例
对于合规性审查
- 1. 阅读 references/compliance/compatibility.md 和 references/compliance/checklist.md
- 识别项目中的所有许可证
- 检查许可证之间的兼容性
- 标记可能影响分发的任何著佐权许可证
- 注意任何缺失的署名或合规性差距
- 提供可操作的补救步骤
- 参考 references/compliance/common-issues.md 以获取上下文
对于许可证/NOTICE 文件生成
- 1. 从 references/templates/ 阅读适当的模板
- 关键:始终使用规范的许可证文本,完全按照提供的内容
- 切勿修改许可条款或从头生成许可证文本
- 仅填写占位符:[YEAR]、[FULLNAME]、[PROJECT NAME]
- 对于 NOTICE 文件,正确汇总第三方归属信息
- 对于文件头,使用适合语言的注释语法
对于木兰 PSL v2 问题
- 1. 阅读 references/mulan-psl-v2.md
- 解释关键特征:
- 宽松许可证
- 明确的版权授权
- 明确的专利授权
- 专利报复条款
- 无商标许可
- 分发需提供许可证副本并保留版权、专利、商标和免责声明通知
- 中英文文本具有同等法律效力,如有歧义以中文版本为准
- 3. 如果用户想采用木兰 PSL v2:
- 提供官方的三步应用指南
- 应要求输出规范的文件头文本
- 应要求从捆绑的参考文件中输出规范的许可证文本
- 4. 在必要时与 MIT 或 Apache-2.0 进行比较:
- MIT 更简单,但文本中没有明确的专利授权
- Apache-2.0 和木兰 PSL v2 都包含明确的专利语言,但它们不是可互换的许可证
参考文件
| 主题 | 文件 |
|---|
| 宽松许可证 (MIT, Apache, BSD, ISC) | references/licenses/permissive.md |
| 著佐权许可证 (GPL, LGPL, AGPL, MPL) |
references/licenses/copyleft.md |
| 其他许可证 (CC, Boost, zlib) | references/licenses/specialty.md |
| 许可证比较表 | references/selection/comparison-matrix.md |
| 许可证选择指南 | references/selection/decision-tree.md |
| 许可证兼容性规则 | references/compliance/compatibility.md |
| 合规性检查清单 | references/compliance/checklist.md |
| 常见合规性错误 | references/compliance/common-issues.md |
| LICENSE 文件模板 | references/templates/license-files.md |
| NOTICE 文件模板 | references/templates/notice-files.md |
| 源文件头模板 | references/templates/source-headers.md |
| 木兰 PSL v2 参考和规范文本 | references/mulan-psl-v2.md |
关键规则
绝不生成许可证文本
始终使用模板中的规范许可证文本。许可证文本是必须精确的法律文件。不要:
- - 转述许可条款
- 凭记忆生成许可证文本
- 修改标准许可证语言
- 创建“自定义”许可证
包含项目示例
讨论许可证时,提及使用它们的知名项目:
- - 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
- 木兰 PSL v2: 在相关时提及它在中国开源生态系统中被广泛使用,并优先描述其特征而非列举项目名称,除非您确定一个众所周知的示例。
标记复杂场景
建议就以下情况咨询法律顾问:
- - 双重许可策略
- 项目中途更改许可证
- 具有著佐权依赖项的商业项目
- SaaS 环境中的 AGPL
- 跨司法管辖区分发
- 专利敏感情况
快速解答
“我应该使用什么许可证?”
→ 遵循决策树;为简单起见默认使用 MIT,为专利保护默认使用 Apache-2.0。
“我可以在我的专有应用程序中使用 GPL 代码吗?”
→ 通常不可以,除非通过 LGPL 动态链接或独立进程。
“MIT 和 Apache-2.0 有什么区别?”
→ Apache-2.0 包含明确的专利授权和报复条款;MIT 更简单但没有专利保护。
“Apache-2.0 和木兰 PSL v2 有什么区别?”
→ 两者都是宽松许可证,并包含明确的专利语言,但木兰 PSL v2 使用自己的文本和双语中英文形式,如有歧义以中文版本为准。
“Apache-2.0 与 GPL 兼容吗?”
→ Apache-2.0 与 GPL-3.0 兼容,但与 GPL-2.0 不兼容。
“如果我使用 AGPL,是否需要开源我的代码?”
→ 仅当您修改了 AGPL 代码并将其作为网络服务提供时才需要。内部使用未经修改的 AGPL 工具不会触发著佐权。
输出格式
生成 LICENSE 文件时:
- 1. 确认许可证选择
- 询问版权持有人姓名和年份
- 输出完整的规范许可证文本
- 提醒用户将其放置在仓库根目录,命名为 LICENSE 或 LICENSE.txt
审查合规性时:
- 1. 列出所有已识别的许可证
- 显示兼容性分析
- 标记任何问题及其严重性(严重/警告/信息)
- 提供具体的补救步骤