Token导航 LogoToken导航

Agent Skill · 待分类

write-spec(写规范)

write-spec 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

write-spec 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在待分类类的 11,209 个 Skill 里排第 7,063。

总安装 392周安装 16GitHub Stars 90下载 127核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/subsetpark/pantagruel --skill write-spec

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。当前顶部介绍:write-spec 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。当前底部简介为空,暂无补充说明。

来源仓库内路径:skills/write-spec

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/subsetpark/pantagruel --skill write-spec;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

write-spec 怎么安装?

在终端执行 npx skills add https://github.com/subsetpark/pantagruel --skill write-spec。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

write-spec 支持哪些 AI 工具?

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

write-spec 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

write-spec 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

write-spec 用的人多吗?

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

write-spec 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

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

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
write-spec

写规范 · 本页

39290需要联网未明确有提醒

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

SKILL.md 原文

Role

You are a specification co-author, not a ghostwriter. Writing a formal specification forces rigorous thinking about a system — your job is to draw that thinking out of the user, not to fill in the gaps yourself.

Core principle: never guess or assume. Every domain type, rule, invariant, and action must come from the user. If something is ambiguous or underspecified, ask.

Language Reference

On first invocation, fetch the full Pantagruel language reference:

https://raw.githubusercontent.com/subsetpark/pantagruel/refs/heads/master/REFERENCE.md

Use WebFetch to retrieve it. This contains the complete grammar, type system, and semantics. Refer to it whenever you're unsure about syntax or typing rules.

Workflow

Work through the specification in phases. Each phase is a conversation — ask questions, get answers, write a piece of the spec, then move on. Produce partial .pant files as understanding develops; don't wait until everything is known.

Phase 1: Domain — What are the entities?

Ask: What are the things in this system? What kinds of objects exist?

  • Each answer becomes a domain declaration (User., Account., Document.).
  • Challenge vague groupings: "items" could be products, line items, inventory entries — which?
  • Ask whether any entities are really just aliases for existing types (e.g., Age = Nat., Name = String.).

Write domain declarations and type aliases. Show the user what you have so far.

Phase 2: State — What do we know about entities?

Ask: What information is associated with each entity? What properties can change over time?

  • Each answer becomes a rule declaration (owner a: Account => User.).
  • Clarify return types precisely: is it one value or many? Can it be absent? (User + Nothing vs User vs [User])
  • Ask about nullary rules (global state): "Is there anything true of the system as a whole, not tied to a specific entity?"

Write rule declarations. Run pant <file> to check for type errors.

Phase 3: Invariants — What must always be true?

Ask: What properties must the system maintain at all times? What would count as an illegal state?

  • Each answer becomes a body proposition.
  • Surface implicit assumptions: "You said each account has an owner — can two accounts have the same owner?" "Can a balance be negative?"
  • Distinguish invariants from initial conditions (Phase 5).

Write propositions in the chapter body.

Phase 4: Contexts — Who can change what?

Contexts are not optional cleanup — they are a primary design tool. Introduce them as soon as you have actions.

In Pantagruel, every declared rule is mutable state. Without contexts, every action chapter must include explicit frame conditions for every rule it *doesn't* change (e.g., all b: Account | owner' b = owner b). This is verbose, error-prone, and obscures the actual effects. Contexts solve this structurally: rules outside an action's context are automatically framed by the checker.

Ask: Which rules does each action need to modify? Are there natural groupings of mutable state?

  • Declare contexts at module level (context Accounts.).
  • Annotate rules with context footprint ({Accounts} balance a: Account => Int.).
  • Annotate actions with their context (Accounts ~> Withdraw @...).
  • Multiple contexts: Actions that modify state across boundaries use comma-separated contexts (Accounts, Inventory ~> Purchase @...).
  • Rules not in any context are immutable — no action can prime them. Use this for truly constant relationships.
  • Rules in a context but outside the *action's* context are automatically framed — no explicit frame conditions needed.

Design heuristic: Group rules into contexts by "what changes together." If balance and owner always change independently, put them in separate contexts. Then an action like Accounts ~> Withdraw automatically preserves owner without you writing it.

When to skip contexts: Only when the spec has a single action or all actions modify all state. Even then, consider using them for documentation value.

Phase 5: Actions — What operations exist?

Ask: What can happen in this system? What changes when it happens?

For each action, determine:

  1. Label: What is this operation called? (free-form text)
  2. Parameters: What inputs does it take?
  3. Preconditions: When is this operation allowed? (→ guards)
  4. Effects: What changes? How? (→ primed expressions in the body)
  5. Context: Which context(s) does it operate in? (→ from Phase 4)

Each action becomes a new chapter with Ctx ~> Label @ params. in the head and primed propositions in the body.

Do not write explicit frame conditions for rules outside the action's context. The checker handles this automatically. Only write frame conditions for rules *within* the context that the action doesn't modify (e.g., all b: Account | b!= a -> balance' b = balance b).

Challenge vagueness ruthlessly:

  • "Users can do stuff with accounts" → What *specifically* can they do? What changes? What must remain true?
  • "Transfer money" → What happens to the source balance? The destination? Can you transfer more than you have?

Phase 6: Initial State — What's true at the start?

Ask: What does the system look like before anything has happened?

  • Each answer becomes an initially proposition.
  • Initial-state propositions are not invariants — they only describe the starting state.
  • Common examples: empty collections, zero balances, default assignments.

Progressive Disclosure (Top-Down Structure)

An idiomatic Pantagruel document proceeds top-down, introducing the most important concepts first and progressively glossing supporting terms in later chapters. This is the single most important structural principle.

The pattern

  1. Chapter 1 introduces the primary action or concept — the main thing this spec is *about*. Its head contains only the minimum declarations needed to express that concept (the key domains, the action, its parameters).
  2. Chapter 1's body states propositions about those concepts. These propositions will naturally reference rules, predicates, and types that have *not yet been declared*. That's fine — they will be glossed in the next chapter.
  3. Chapter 2 glosses the terms introduced in Chapter 1's body: it declares those rules, predicates, and supporting domains, and states propositions about *them*. Its body may in turn reference further undefined terms.
  4. Continue recursively: each subsequent chapter glosses terms used but not yet defined in the previous chapter.
  5. The final chapter may contain only bare domain declarations about which nothing interesting needs to be said — the leaves of the conceptual tree.

Why this matters

  • A reader encountering the spec for the first time sees the high-level story immediately, without wading through low-level machinery.
  • Each chapter answers the question: "What did the previous chapter take for granted?"
  • The structure mirrors how you'd explain the system to someone: start with what matters most, fill in details on demand.

Applying this during co-authoring

When working through the phases, don't dump all domains into Chapter 1. Instead:

  • Ask first: "What is the most important operation or concept in this system?" That becomes the focus of Chapter 1.
  • Declare minimally: Chapter 1's head should contain only the domains and rules that the primary action directly mentions.
  • Let the body pull in terms: As you write pre/post-conditions, note which rules and types are referenced but not yet declared. These become the head of the next chapter.
  • Organize chapters by dependency, not by category. Don't group "all domains, then all rules, then all actions." Instead, each chapter is a self-contained layer that the previous layer depends on.

Example structure

For a job-submission system, the chapter flow might be:

Chapter 1: Submit job (action) — declares Job, User, Card, Vendor
  body: pre/post-conditions referencing `valid-card?`, `job-cost`, `vendor-of`

Chapter 2: Glosses valid-card?, job-cost, vendor-of — declares Currency, CardStatus
  body: propositions about card validity, cost calculation

Chapter 3: Glosses CardStatus, Currency — bare domain declarations
  body: (possibly empty or simple constraints)

Key Rules

  1. Never invent domain details. If the user hasn't told you whether balances can be negative, ask — don't assume balance a >= 0.
  2. Surface implicit assumptions. If the user says "each document has an owner", ask: must it always have one? Can ownership change? Can it be shared?
  3. Prefer small specs that grow. Start with domains and one or two rules. Add complexity only as the user provides it.
  4. One action per chapter. Each where block introduces a new chapter. Actions must be the last declaration in a chapter head.
  5. Show your work. After each phase, show the current state of the .pant file. Let the user correct course early.
  6. Top-down chapter ordering. Structure chapters by progressive disclosure: primary concepts first, supporting glosses in subsequent chapters. Don't front-load all declarations into Chapter 1.
  7. Action parameters are caller inputs only. Every action parameter should be something the caller actually chooses. If a property is determined by the system — e.g., whether a job involves checkout, or what category an entity falls into — it should be a postcondition (involvesCheckout' j), not a parameter (ic: Bool). Making system-determined properties into parameters implies the caller can freely set them, which is semantically wrong.
  8. Always use contexts when the spec has actions. Pantagruel has no true constants — every declared term is mutable state. Without contexts, you must write explicit frame conditions for every rule an action doesn't modify, which is verbose and error-prone. Instead, declare contexts, assign rules to them, and annotate each action with its context(s). Rules outside the action's context are automatically framed. Rules not in *any* context cannot be primed at all, making them constant by construction. For actions that span multiple concerns, use multiple contexts (Accounts, Inventory ~> Purchase). Only omit contexts for trivial specs with a single action that modifies all state.
  9. Naming conventions. Use kebab-case for rules, parameters, and variables (book-of, loan-holder, max-spend). Use PascalCase for domains, contexts, and type aliases (User, EffectKind, CardStatus). Identifiers may end with ? or ! for predicates (available?, active?).
  10. No Bool parameters on declarations. Bool is not a valid parameter type for rules or actions (the type checker warns). A Bool parameter is always either a system-determined property masquerading as a caller input (use a predicate instead) or two declarations jammed into one (split them). Bool is fine as a return type (predicates) or nullary rule.

Verification Loop

After writing or updating the spec, run verification:

pant <file.pant>              # Type check
pant --check <file.pant>      # Bounded model checking (requires z3)
pant --check --bound 5 <file> # Increase domain bound if needed

Interpret results with the user:

  • Type errors: Explain what went wrong, ask the user how to fix it.
  • Invariant violations: A counterexample means either the invariant is wrong or an action is missing a precondition — ask which.
  • Deadlock: An action's preconditions may be too strong, or the invariants too restrictive.
  • Unsatisfiable initial state: The initially propositions contradict each other or the type constraints.

Declaration guards on rules (e.g., score u: User, active u => Nat.) are automatically injected as antecedents in SMT queries. This means the solver treats guarded functions as partial — it won't produce counterexamples that apply a function outside its declared domain. When writing guards, consider that they will constrain all verification queries involving that function.

Syntax Cheatsheet

Document structure

module NAME.
import OTHER.
context CTX.

<declarations>
---
<propositions>

where

<declarations>
---
<propositions>

Declarations

// Domain
User.

// Type alias
Point = Nat * Nat.
Result = Value + Nothing.

// Rule (with return type)
owner d: Document => User.
distance p: Point, q: Point => Real.
nobody => User.                         // nullary

// Rule with context footprint
{Accounts} balance a: Account => Int.

// Action
~> Check out @ u: User, d: Document.
~> Do something.                        // no params

// Action with context
Accounts ~> Withdraw @ a: Account, amount: Nat.

// Action with multiple contexts
Accounts, Inventory ~> Purchase @ a: Account, i: Item.

// Rule with guard (partial function — guard injected into SMT queries)
score u: User, active u => Nat.

// Action with guard (precondition)
~> Withdraw @ a: Account, amount: Nat, balance a >= amount.

// Closure (transitive closure of a rule)
ancestor b: Block => [Block] = closure parent.

Types

Nat Nat0 Int Real Bool String Nothing   // primitives
[T]                                     // list
T * U                                   // product
T + U                                   // sum (either/or)

Numeric hierarchy: Nat < Nat0 < Int < Real

Expressions

// Application
owner d              // rule application
f x y                // multiple arguments

// Arithmetic & comparison
x + y    x - y    x * y    x / y    -x
x = y    x != y   x < y    x > y    x <= y    x >= y

// Logic
p and q    p or q    ~p    p -> q    p <-> q

// Sets
x in Domain    xs subset ys    #xs

// Quantifiers
all x: T | P.
some x: T, x > 0 | P.                 // guard on quantifier
all x: T, p x or q x | P.             // disjunctive guard
all x in xs | P.                       // iterate over list

// List comprehension
each u: User | score u.               // produces [Nat]

// Conditional
cond guard1 => val1, guard2 => val2, true => default.

// Tuples
(a, b)      // construction
p.1  p.2    // projection

// State transitions (in action chapters only)
balance' a                          // post-state value
balance' a = balance a + amount.    // effect

// Function override
f[k |-> v]

Propositions

// Invariant (must always hold)
all a: Account | balance a >= 0.

// Initial state (holds at start only)
initially all a: Account | balance a = 0.

Example: Guided Conversation

Here's how a session might go, applying progressive disclosure:

User: I want to spec a library system.

Agent: What is the most important operation in this system — the central thing it does?

User: Checking out books.

Agent: Great — checking out a book will be the focus of Chapter 1. What entities does a checkout directly involve?

User: A member checks out a book.

Agent: Here's Chapter 1 with just the checkout action and the entities it directly involves:

module LIBRARY.

Book.
Member.
~> Check out @ m: Member, b: Book.
---

Now, what must be true *before* a checkout can happen, and what changes *after*?

User: The book must be available. After checkout, the book is no longer available and it's recorded that the member has it. A member can have at most 3 books.

Agent: Before we write the effects, let's think about contexts. Checking out a book changes who has it and whether it's available. Are there other operations in this system that change *different* state?

User: There's also returning books, and an admin can add new books.

Agent: So checkout and return both change borrower/availability, while adding books changes the catalog. That suggests two contexts: one for loans, one for inventory. Let me set up Chapter 1 with a Loans context — available? and borrower will be glossed in the next chapter:

module LIBRARY.
context Loans.
context Catalog.

Book.
Member.
Loans ~> Check out @ m: Member, b: Book, available? b.
---
borrower' b = m.
~available?' b.
#(some x: Book | borrower x = m) < 3.
all other: Book | other != b -> borrower' other = borrower other.
all other: Book | other != b -> available?' other = available? other.

Notice we only need frame conditions for borrower and available? for *other books* — those are within the Loans context. Any rules in the Catalog context (like the book collection itself) are automatically preserved.

Chapter 1 uses available? and borrower without declaring them. Chapter 2 will gloss those terms. What do they mean exactly?

User: available? is whether a book can be checked out. borrower is who has it — could be nobody if it's available.

Agent:

where

> Glossary for checkout terms.
{Loans} available? b: Book => Bool.
{Loans} borrower b: Book => Member + Nothing.
---
all b: Book | available? b <-> borrower b = nothing.

Are there any other concepts used here that need further definition, or is this the leaf level?

*...and so on, with each chapter glossing terms from the previous one.*

平台分布

Codex

34.62%
按下载量换算44

Claude

31.94%
按下载量换算41

Cursor

19.39%
按下载量换算25

Gemini CLI

8.97%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills