psl-derive

psl-derive is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 303 tokens per session (4,420 once invoked), scanned A, original, MIT.

A product-specification derivation workflow turns a product specification into a proposed domain model, workflow description, and interface or data-shape draft before code is written. Each design decision links back to the rule that led to it, and repeated derivations expose ambiguous parts.

In plain words
What is it for?
Use it to derive design proposals from a product specification, compare independent interpretations, and prepare material for human review before creating implementation work.
Why use it?
A specification can constrain some decisions while leaving others open, so coding immediately may produce a technically correct but unwanted result. Showing the proposed shape first gives a human a chance to resolve ambiguity before implementation.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is python3 ../grill/scripts/grill_loop.py pending PSL-<名>.md --derived derived/ --out .aidlc/<slug>/grill/.

Part of the ai-dlc plugin — 30 skills, 5 agents shipped together

Good fit Use it to derive design proposals from a product specification, compare independent interpretations, and prepare material for human review before creating implementation work.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge
agentmods
npx agentmods add skills/xrensiu/claude-code-forge/psl-derive

Made for: Claude Code.

Or install ai-dlc, the plugin that ships this one along with the rest of its 30 skills, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for psl-derive

README.md
[![agentmods](https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/psl-derive/github.svg)](https://agentmods.dev/skills/xrensiu/claude-code-forge/psl-derive)
Your own site
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/psl-derive"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/psl-derive/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for psl-derive

Your own site · 80×15
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/psl-derive"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/psl-derive.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 303 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,420 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00303 $0.04420
Opus 5.5 $0.00121 $0.01768
Sonnet 5.5 $0.00061 $0.00884
Haiku 4.5 $0.00030 $0.00442

Measured 1mo ago against content hash dda0a37637a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

psl-derive scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify_derived.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ai-dlc/skills/psl-derive/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

psl-derive — 读完世界,先推三样东西,再谈代码

产物是 derived/ 下四个文件:dos-proposal.yaml(应然本体,与 /dos-extract 同一 13 节 schema;作为先于代码的提案,verify_derived.py 以 --core-only 核它,不要求 vocabulary 层)、 workflow.md(Σ 发生了什么 + φ 消歧判据,不是 Step 1/2/3)、form-draft.md(形态草案:每条决策带 PSL-ID)、divergence.md(分歧集)。本文件写:推导产物在世界里是什么、什么算推对了、原语与出口、 G1 前的门。推几次、先推哪层是你的份额——除非下面说它是依赖顺序。

缺口(Judgment + Control + Capability)

deletion 测试:撤掉本 skill,引擎读完 PSL 直接写代码或直接建 issue——形态在实现里"顺手"决定,没有人看过 它长什么样;等验收发现"AC 全绿但不是想要的",贵一个数量级。缺的是:产物序(形态草案先于代码,且 落文件供 G1 裁决)、追溯判据(每条决策 ← PSL-ID)、分歧集原语(N 次推导取交并,把不可复现变成议程)。

世界(Σ)

  • 三样推导产物是同一个世界的三个投影:DOS 提案(有哪些实体 / 关系 / 不变量,应然本体)、Workflow(用户 做 X 时世界里发生了什么、歧义怎么裁)、形态草案(界面 / 接口 / 数据形态上该有什么)。三者引用同一套词表 (PSL 的 Domain Model 词),不允许各自造词。
  • DOS 提案复用 /dos-extract 的 schema(../dos-extract/assets/dos_template.yaml)——同 schema 才能在 X1 与现状本体逐条对账。它是"应然",/dos-extract 抽出来的是"现状";对账是人的事(G1 记录)。
  • 形态草案是本次功能文档的前身:G1 签字版形态草案 = 功能文档;它的 sha256 进 G1 记录,issue 的 Intent 引用它。
  • 分歧集是 PSL 欠定处的地图:N(默认 3)次独立推导(不同会话 / 不同模型 / 至少不同随机性),逐条比对 形态决策:全部一致 → PSL 约束住了;不一致 → 进 divergence.md,每条写明各版本的选择与各自引用的 PSL-ID。分歧集非空时 G1 记录必须逐条回应。N=1 合法但要在 divergence.md 写 n: 1 — 未做分歧检验。
  • G1 是唯一能拦"正确的错误"的门(日历筛选器那类);本 skill 的全部产物都是给 G1 看的,不是给实现者的。
  • 关于用户的 Σ:"推一下形态"= 要草案 + 分歧集,不要代码;"直接按 PSL 做"= 仍然先推导,因为 G1 不能跳。

判据(φ):什么算推对了

  • 四个文件落盘,缺一不可(分歧集可以是"无分歧"但文件要在)。
  • 形态草案每条决策带引用锚:形如 - [F-03] 搜索结果以"时期卡"呈现 ← PSL-007, UI-2。合法的锚是 PSL-NNN(规律索引)与 UI-n / A-n / DP-n(UI Contract / Acceptance / Design Principles 的条目) ——那三层同样承重,只认 PSL-NNN 会逼推导者借最近的规律再注 (via UI-2),引用就成了装饰(I-19)。 无引用的决策 → 拒;引用的锚在 PSL 里不存在 → 拒。"从常识推"不是引用——常识要先进 PSL(surface 来路)再引。 只引形态层规律;PSL 里标 (内容层) 的规律不出现在本稿是正常的,不算漏决策(I-20)。
  • 含谓词的决策带走查例:出现"当且仅当 / ∧ / 缺一不算 / exit 0 / 若…则"时,同一行给 例:<输入> → <判定>。 三处谓词欠定都是 L5 编 fixture 时才暴露的,其中一处测试选错读法、锁了之后只能走变更提案(I-56 / I-58)。
  • 每种记录类型写落位:「实体与数据形态」里每条决策说明该记录落在产物的哪个顶层键、被谁以什么字段引用。
  • 引用数据文件结构的决策带一行证据:断言 graph.yaml 的节点与边、某 schema 的顶层键时,把行号抄进来 (graph.yaml L320–321)。这类错误读起来完全合理,只有对着原始数据才看得出来(I-36)。
  • DOS 提案过 verify_dos.py(≤ 7 对象、关系引用已声明对象、无 UI/impl 后缀、open_questions 非空)。
  • Workflow 不是流程:出现 Step N / 步骤 N / 阶段 N → 拒;连续时序词 ≥ 3 → flag(同 verify_psl.py)。
  • 分歧集每条有形状:决策点 · 各版本选择 · 各自引用 · 建议议程(改 PSL 哪条 / 请人定)。以 | D-n 开头的行是 7 格,最后一格是议程,不能空、不能留占位符。
  • 第 2 轮起的定向重推有归档:覆盖四个文件前先原样归档到 derived/round<n-1>/,写 round-diff.md (逐决策 diff,左侧指向那个归档),divergence.md 声明 round: n 并用「G1 裁决 → 落点」表替代 D-表。
  • 推导不引入 PSL 没有的实体:DOS 提案的 objects 必须能在 PSL 的 Domain Model 里找到(或在 open_questions 里声明为候选)——否则是引擎在即兴造世界。
  • 残差(人 / G1):推出来的形态对不对;分歧该按哪个版本定;PSL 该不该改。脚本只给 needs_semantic_review。

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +20 lines dda0a37637a3
  2. 1mo ago Changed d450975dfb62
  3. 1mo ago Changed · +41 lines f6db982a09a0
  4. 1mo ago First seen · 104 lines · 303 tokens per session scan A a04f9320e455

Subscribe to this mod's changes

psl-derive is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 1mo ago), licensed MIT. It adds 303 tokens to every session and 4,420 once invoked, about $0.0012 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

glance-canonical-layouts

Use this skill to create home screen widgets using Jetpack Glance Canonical Layouts from the Android Platform Samples project, or when asked to implement standard widget layout patterns (including Check List, Image Grid, Snap Scrolling, and Standard Toolbar).

android/skills · 56 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens