design-function

design-function is a skill for Claude Code from ZTE-AICloud/Co-OmniSpec. It costs 35 tokens per session (1,948 once invoked), scanned A, original, MIT.

A design-analysis step that identifies which user-visible capabilities must change when a new scenario is introduced. It maps those capabilities to existing functions or marks them as additions, changes, references, or removals.

In plain words
What is it for?
Use it during feature design to analyze how a scenario affects existing functionality. It produces a consistent set of function changes for the rest of the design process.
Why use it?
It prevents new work from being treated as an unrelated feature when it should extend an existing one. It also keeps each function tied to inputs, outputs, conditions, main steps, and failure handling.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the omni-dsdd plugin — 40 skills, 16 agents, 1 hook 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/zte-aicloud/co-omnispec/design-function
Any agent
npx skills add ZTE-AICloud/Co-OmniSpec --skill design-function
Clone the repo
git clone --depth 1 https://github.com/ZTE-AICloud/Co-OmniSpec

Made for: Claude Code.

Or install omni-dsdd, the plugin that ships this one along with the rest of its 40 skills, 16 agents, 1 hook.

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 design-function

README.md
[![agentmods](https://agentmods.dev/badge/skills/zte-aicloud/co-omnispec/design-function.svg)](https://agentmods.dev/skills/zte-aicloud/co-omnispec/design-function)
Your own site
<a href="https://agentmods.dev/skills/zte-aicloud/co-omnispec/design-function"><img src="https://agentmods.dev/badge/skills/zte-aicloud/co-omnispec/design-function.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,948 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.00035 $0.01948
Opus 5 $0.00017 $0.00974
Sonnet 5 $0.00007 $0.00390
Haiku 4.5 $0.00003 $0.00195

Measured 6d ago against content hash 74aaa059b8c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

design-function 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 6d ago.

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.

omni-dsdd/skills/design-function/SKILL.md · 112 lines

How it starts

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

design-function

使用时机

  • 仅被 design skill 显式调用

功能定义

  • 功能是支撑场景达成目标所需的业务能力,应从外部可观测行为的视角描述系统“能够提供什么能力”。
  • 功能必须可落地: 能够映射为「输入/输出 + 触发条件/前置条件 + 主要步骤 + 失败处理与补偿策略」。在后续设计阶段再明确由哪些组件/模块分别承担职责。
  • 不得将“实现细节/代码结构”当作功能;不得将“接口清单”当作功能本身。

注意事项:

  1. 将场景中的关键验收点映射到功能的外部可观测行为,确保每条功能都能回答:
  • 触发条件/前置条件是什么
  • 输入/输出是什么
  • 主路径步骤是什么
  • 关键失败处理与补偿策略是什么
  1. 对识别出的功能集合做一致性校验,避免后续重复建设或边界漂移:
  • 去重与合并: 不同场景下语义等价的功能应复用同一条功能(必要时通过“适用范围/约束条件”表达差异),避免同义重复。
  • 粒度校准: 避免抽象过度(难以验证、无法落到可测试行为)或细节过度(陷入实现层设计/代码结构);必要时对功能进行拆分或收敛,但保持其对外可观测性。
  • 命名与术语对齐: 功能名称与描述使用 context.md 中已对齐的术语,避免同一概念多种叫法。

指令

步骤1: 明确输入与上下文

  • 场景: 读取 FEATURE_DIR/spec.md 中的「场景」章节,明确本次需要支撑的业务目标与验收标准。
  • 上下文文件: 优先读取 FEATURE_DIR/context.md,参考其中的:
    • 「相关功能文档」章节,作为既有功能的主要参考来源
    • 架构分析、可复用模式、术语对齐、约束和假设
    • context_mode = evidence_first,优先消费 on_demand.scopeon_demand.traceabilityon_demand.riskson_demand.evidence_gaps

步骤2: 分析既有功能的变更

基于步骤1输入与上下文,按「功能定义」识别并产出本次变更涉及的全部功能条目(含INSERT/MODIFY/DELETE/REFER),作为后续步骤的范围基线。

动作类型定义:

  • MODIFY: 业务意图要求对既有功能的输入/输出、约束条件、步骤、失败处理、适用范围等进行调整或细化。
  • INSERT:
    • 理解既有功能,业务意图无法合理归属到任何既有功能条目,或现有功能的职责边界无法承载新增能力且保持可验证性。
    • 不存在既有功能时,则新增所需功能。
  • DELETE: 业务意图明确要求移除既有功能,且删除具有明确业务必要性、风险可控(必须给出充分、可追溯的理由与影响说明)。
  • REFER: 既有功能已充分覆盖当前业务意图,无需修改内容,但需建立引用关系以支持后续影响分析与可追溯性。

on-demand 功能消费规则(仅 evidence_first 模式):

  • 先从 on_demand.scope.direct_functionson_demand.scope.indirect_functions 建立功能基线(白名单)。
  • 通过 on_demand.traceability 将需求/场景映射到功能条目,优先判定 MODIFY/REFER,减少无依据 INSERT。
  • 对每个功能条目,优先引用 ${DOC_DIR}/on-demand/functions/*.md 中可定位证据(入口、主流程、波及点、风险)。
  • 未进入 scope 且无证据链支撑的功能,不得纳入主设计范围(避免 scope creep)。
  • on_demand.risks / on_demand.evidence_gaps 要体现在功能的失败处理、补偿策略或假设说明中。

兼容规则(default 模式):

  • context_mode = defaulton_demand 字段缺失,沿用原有逻辑,不阻塞功能设计。

步骤3: 按照以下模板生成「功能」章节内容

## 功能

### [INSERT/MODIFY/DELETE/REFER] - [功能ID] - [功能名称]

**来源场景**: [场景ID] - [场景名称]

变更原因: [分析业务意图对存量功能的影响;REFER 填写为无变更]

**功能描述**: [从对应场景的验收场景中提取,描述该功能需要实现的具体能力]

[功能具体内容]

[按照上述格式继续描述其他功能...]

Read the full file on GitHub · 112 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. 6d ago First seen · 112 lines · 35 tokens per session scan A 74aaa059b8c1

Subscribe to this mod's changes

design-function is a skill published in the GitHub repository ZTE-AICloud/Co-OmniSpec (54 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 1,948 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens