psl-derive

psl-derive is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 303 tokens per session (2,483 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.

Part of the sdlc plugin — 14 skills, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

Made for: Claude Code.

Or install sdlc, the plugin that ships this one along with the rest of its 14 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.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.svg" alt="Measured on agentmods" 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 2,483 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.02483
Opus 5 $0.00151 $0.01241
Sonnet 5 $0.00061 $0.00497
Haiku 4.5 $0.00030 $0.00248

Measured yesterday against content hash a04f9320e455, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 yesterday.

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/sdlc/skills/psl-derive/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 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 同一 12 节 schema)、 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 不能跳。

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

  • 四个文件落盘,缺一不可(分歧集可以是"无分歧"但文件要在)。
  • 形态草案每条决策带 PSL-ID:形如 - [F-03] 搜索结果以"时期卡"呈现 ← PSL-007, PSL-012。无引用的决策 → 拒;引用的 ID 在 PSL 里不存在 → 拒。"从常识推"不是引用——常识要先进 PSL(surface 来路)再引。
  • DOS 提案过 verify_dos.py(≤ 7 对象、关系引用已声明对象、无 UI/impl 后缀、open_questions 非空)。
  • Workflow 不是流程:出现 Step N / 步骤 N / 阶段 N → 拒;连续时序词 ≥ 3 → flag(同 verify_psl.py)。
  • 分歧集每条有形状:决策点 · 各版本选择 · 各自引用 · 建议议程(改 PSL 哪条 / 请人定)。
  • 推导不引入 PSL 没有的实体:DOS 提案的 objects 必须能在 PSL 的 Domain Model 里找到(或在 open_questions 里声明为候选)——否则是引擎在即兴造世界。
  • 残差(人 / G1):推出来的形态对不对;分歧该按哪个版本定;PSL 该不该改。脚本只给 needs_semantic_review

原语(Π)

  • scripts/verify_derived.py <derived_dir> --psl <PSL.md> [--n 3] —— 机械预门:四文件存在;形态决策 PSL-ID 引用完整;DOS 提案调用 ../dos-extract/scripts/verify_dos.py;Workflow 无具名步骤;分歧集形状; DOS 提案 objects ⊆ PSL Domain Model 词表(∪ open_questions 候选)。exit 0 / 1 / 2。
  • assets/form_draft_template.md · assets/workflow_template.md · assets/divergence_template.md;DOS 提案 模板即 ../dos-extract/assets/dos_template.yaml
  • references/derivation.md —— 从六层 PSL 到三样产物的推导对应(哪层喂哪样)、分歧集的比对方法、常见的 "技术对产品错"信号。
  • 隔离推导:N 次推导用 Agent 工具各开一个全新上下文(只给 PSL 文件路径 + 模板,不给前一次的结果); 合并与比对由主会话做。

Read the full file on GitHub · 104 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. yesterday 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 yesterday), licensed MIT. It adds 303 tokens to every session and 2,483 once invoked, about $0.0015 per session on Opus 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

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

make-resume

中文可编辑简历制作技能:默认基于 ASu 单栏高密度技术简历模板,根据用户经历制作或复刻可编辑 HTML/PDF;用户也可以指定仓库内其他模板、本地 HTML 或参考截图。用户输入“/make-resume”“我要阿酥同款简历”或要求制作、修改、复刻简历文件时使用。.

Hisn00w/ASu-skills · 86 tokens

prototype-web

可点击的功能性 Web 原型, 含导航、英雄区、特性区、CTA.

nexu-io/html-anything · 24 tokens