Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问clear审计通过

writing-laws制定法律

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

225

周安装

9

GitHub Stars

17

下载量

73
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:writing-laws(制定法律)
来源仓库:https://github.com/front-depiction/claude-setup
仓库路径:skills/writing-laws
安装命令:
npx skills add https://github.com/front-depiction/claude-setup --skill writing-laws
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/front-depiction/claude-setup --skill writing-laws

简介

用于辅助法律条款和技术协议的起草工作。

  • 适合生成合规性声明、责任条款和授权协议。
  • 需严格遵循法律法规和行业标准。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 输出内容必须经过专业法律人员审核。
  • 不得替代正式法律顾问服务。writing-laws 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Writing Laws Skill

Use this skill when creating formal laws, covenants, or standards for a codebase. Laws are not suggestions or guidelines - they are inviolable requirements that govern behavior within a specific domain.

Core Principle: Laws Define, They Do Not Persuade

Laws state what IS and what SHALL BE. They do not:

  • Explain why (that belongs in preambles)
  • Describe consequences (that belongs in severity classifications)
  • Use conditional or hedging language
  • Appeal to preference or opinion

Law Structure

Section Numbering

Laws use hierarchical section notation with the section symbol (§):

§ I      - Roman numerals for major laws
§ I.1    - Decimal for subsections
§ I.1.a  - Lowercase letters for sub-subsections

Section Naming

Each section receives a bracketed name that serves as its short identifier:

§ VII [The Atom Suffix Convention]
§ VIII [The Confinement of Atoms]
§ XII [The Service Yield]

Internal References

Reference other sections by their number and name:

As required by § III [The Export of the Live Layer], ...
This law supersedes § IV.2 when ...
See § IX [The Action Patterns] for related requirements.

Legal Language

Mandatory Modal Verbs

VerbMeaningUsage
SHALLAbsolute requirement[Subject] SHALL [action].
SHALL NOTAbsolute prohibition[Subject] SHALL NOT [action].
MUSTEquivalent to SHALL[Subject] MUST [provide/include/satisfy].
MUST NOTEquivalent to SHALL NOT[Subject] MUST NOT [action].
IS REQUIRED TOAlternative to SHALL[Subject] IS REQUIRED TO [action].
IS PROHIBITED FROMAlternative to SHALL NOT[Subject] IS PROHIBITED FROM [action].
IS HEREBY DECREEDDeclarative establishmentIT IS HEREBY DECREED that...

Definitional Language

PhrasePurpose
[Term] means...Define a term
[Thing] is [classification]Classify something
Any [X] that [condition]Define scope by condition
For purposes of this sectionLimit scope of definition
includes but is not limited toNon-exhaustive list

Classification Language

Any [thing] that [exhibits property] is [classified as] [category].
Any [action] that [meets criteria] constitutes [violation type].

Law Templates

Simple Prohibition Law

## § X [Name]

**IT IS HEREBY DECREED** that [subject] SHALL NOT [prohibited action].

[Subject] that [exhibits prohibited behavior] constitutes a violation of this law.

Simple Requirement Law

## § X [Name]

**IT IS HEREBY DECREED** that [subject] SHALL [required action].

The [required element] MUST [satisfy condition]. [Additional requirements].

Multi-Part Law

## § X [Name]

**IT IS HEREBY DECREED** that [general principle].

### § X.1 [First Aspect]

[Subject] SHALL [requirement 1].

### § X.2 [Second Aspect]

[Subject] SHALL NOT [prohibition].

### § X.3 [Exception]

This law does not apply when [exception condition].

Definition Law

## § X [Definitions]

For purposes of these covenants:

**"[Term A]"** means [definition].

**"[Term B]"** includes:
- [item 1]
- [item 2]
- [item 3]

**"[Term C]"** does not include [exclusion].

Document Structure

Preamble

The preamble establishes WHY the laws exist. It uses WHEREAS clauses:

## PREAMBLE

WHEREAS [foundational truth 1];

WHEREAS [foundational truth 2];

WHEREAS [problem being solved];

NOW THEREFORE, the following LAWS are hereby declared and SHALL govern [domain] in perpetuity.

Laws Section

Laws follow the preamble. Each law stands alone as a complete requirement:

## LAW I: [The Principle Name]

**IT IS HEREBY DECREED** that [core requirement].

[Elaboration of requirements, conditions, and constraints.]

// Code example showing compliance

// FORBIDDEN: Code example showing violation


### Severity Classification

After all laws, classify violation severity:

SEVERITY CLASSIFICATION

SeverityLawsConsequence
CRITICAL[Laws X, Y][Impact description]
MAJOR[Laws A, B, C][Impact description]
MINOR[Laws D, E][Impact description]

### Compliance Checklist

Provide a verification checklist:

COMPLIANCE CHECKLIST

Before [artifact] is considered complete:

  • [ ] LAW I: [Verification statement]
  • [ ] LAW II: [Verification statement]
  • [ ] LAW III: [Verification statement]

## Good Law Writing

### Characteristics

1. **Precise** - No ambiguity about what is required
2. **Complete** - All cases covered
3. **Testable** - Compliance can be objectively verified
4. **Self-contained** - Each law understandable without external context
5. **Imperative** - Commands, not suggestions

### Examples

**GOOD:**

§ VII [The Atom Suffix Convention]

IT IS HEREBY DECREED that all atom properties SHALL bear the $ suffix.

This convention provides immediate visual identification of reactive state.

export interface SessionVM {
  readonly inputValue$: Atom.Atom<string>;    // $
  readonly history$: Atom.Atom<Prompt>;       // $
  readonly setInputValue: (value: string) => void;  // No $ - not an atom
}

THE $ SUFFIX is the mark of reactivity. Its absence on an atom constitutes deception.

**BAD:**

Naming Things

You should probably use the $ suffix for atoms because it makes them easier to identify. If you don't use it, other developers might get confused and that would be bad. Consider using it when you remember to.


## What to Avoid

### Hedging Language

| Avoid | Use Instead |
| --- | --- |
| should | SHALL |
| might | - (remove uncertainty) |
| probably | - (state definitively) |
| consider | IS REQUIRED TO |
| try to | SHALL |
| it's better to | SHALL |
| you might want to | IS REQUIRED TO |

### Consequence Descriptions in Laws

Laws define requirements. Consequences belong in severity classifications, not in the law itself.

**AVOID in law body:**

If you violate this, bad things will happen and the codebase will become unmaintainable.


**ACCEPTABLE in severity section:**

| CRITICAL | VIII, XII | Immediate remediation required. Untestable code. |


### Opinion and Preference

Laws do not express preference. They establish fact.

**AVOID:**

I think it's better to use namespace imports because they're cleaner.


**USE:**

[Subject] SHALL be imported as a namespace. Named imports are PROHIBITED.


### Conditional Requirements

If something is conditional, make the condition explicit and the requirement absolute:

**AVOID:**

You might need to add spans if you want observability.


**USE:**

All asynchronous actions SHALL be wrapped with Effect.withSpan(). No exceptions.


## Adding Laws to Existing Standards

When extending an existing covenant document:

### 1. Identify the Next Law Number

Review existing laws and use the next sequential Roman numeral.

### 2. Follow Established Patterns

Match the structure, language, and formatting of existing laws in the document.

### 3. Add to Severity Classification

Determine the appropriate severity for the new law and add it to the classification table.

### 4. Update Compliance Checklist

Add corresponding verification item(s) to the checklist.

### 5. Cross-Reference Related Laws

If the new law relates to existing laws, add cross-references in both directions.

## Example: Complete Mini-Covenant

THE IMPORT COVENANTS

PREAMBLE

WHEREAS consistent import patterns reduce cognitive load;

WHEREAS namespace imports preserve type and value unity;

WHEREAS scattered named imports cause name collisions;

NOW THEREFORE, the following LAWS are hereby declared and SHALL govern all import statements.


LAW I: The Namespace Requirement

IT IS HEREBY DECREED that all Effect module imports SHALL use the namespace pattern.

// CORRECT
import * as Effect from "effect/Effect"
import * as Option from "effect/Option"

// FORBIDDEN
import { Effect, pipe } from "effect"
import { Option, none, some } from "effect/Option"

LAW II: The Local Module Pattern

IT IS HEREBY DECREED that local domain modules SHALL be imported as namespaces.

// CORRECT
import * as Task from "@/schemas/Task"
const task = Task.makePending({ ... })

// FORBIDDEN
import { makePending, isPending } from "@/schemas/Task"

SEVERITY CLASSIFICATION

SeverityLawsImpact
MINORI, IIInconsistency. Compounds over time.

COMPLIANCE CHECKLIST

  • LAW I: All Effect imports use namespace pattern
  • LAW II: All local domain imports use namespace pattern
## When to Use This Skill

- Establishing architectural constraints that must never be violated
- Codifying patterns that have proven essential to maintainability
- Creating domain-specific standards for new areas of the codebase
- Formalizing existing informal rules into enforceable covenants
- Extending existing covenant documents with new laws

## Key Principles Summary

1. Laws use SHALL/SHALL NOT - never suggestions
2. Definitions are precise - no ambiguity
3. Structure follows § section notation
4. Preambles explain why; laws state what
5. Consequences belong in severity tables, not law bodies
6. Every law is testable and verifiable
7. Code examples show both compliance and violation
8. Cross-reference related laws explicitly
9. Compliance checklists enable verification
10. Laws define - they do not persuade

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

24.7%
按下载量换算18

windsurf

24.5%
按下载量换算18

trae

18.35%
按下载量换算13

OpenCode

11.22%
按下载量换算8

Codex

7.01%
按下载量换算5

Antigravity

3.19%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills