Token导航 LogoToken导航

Agent Skill · 前端设计

writing-laws(制定法律)

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

writing-laws 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 9,208。

总安装 225周安装 9GitHub Stars 17下载 73核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 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

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助法律条款和技术协议的起草工作。适合生成合规性声明、责任条款和授权协议。需严格遵循法律法规和行业标准。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。输出内容必须经过专业法律人员审核。不得替代正式法律顾问服务。

writing-laws 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/writing-laws

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/front-depiction/claude-setup --skill writing-l…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

writing-laws 怎么安装?

在终端执行 npx skills add https://github.com/front-depiction/claude-setup --skill writing-laws。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

writing-laws 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

writing-laws 需要什么权限?

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

writing-laws 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

writing-laws 用的人多吗?

公开数据是累计安装 225 次,近一周安装 9 次,下载 73 次,GitHub 17 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

writing-laws 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
writing-laws

制定法律 · 本页

22517只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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

平台分布

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