Agent skill

Extension Slots

by yyw-code in yyw-code/MallBase

MallBase 扩展槽边界规范;涉及会员、积分、分销、余额、优惠等权益扩展接入订单、商品编辑或 UniApp 展示时使用。

MITAuto-check passed

Install Extension Slots

skills CLI
$ npx skills add yyw-code/MallBase --skill extension-slots -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yyw-code/MallBase extension-slots --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yyw-code/MallBase.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/extension-slots .claude/skills/extension-slots && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
extension-slots
GitHub stars
106
Token cost
~416 tokens
SKILL.md length
85 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

MallBase 扩展槽边界规范;涉及会员、积分、分销、余额、优惠等权益扩展接入订单、商品编辑或 UniApp 展示时使用。

  • Works in 8 steps: 订单金额扩展优先实现… → 订单状态副作用优先实现… → 新扩展默认注册在 ExtensionRegistry,不要把新权益逻辑直接堆回… → …
  • SKILL.md covers 适用场景, 后端规则, 后台商品编辑规则 and UniApp 规则, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Extension Slots is an agent skill from yyw-code/MallBase. MallBase 扩展槽边界规范;涉及会员、积分、分销、余额、优惠等权益扩展接入订单、商品编辑或 UniApp 展示时使用。

Its SKILL.md is about 420 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: MallBase 是一个基于 PHP 的商城型业务基础框架,围绕 用户、商品、订单、权限 四个最核心的商业模块,提供一套清晰、稳定、可扩展的业务结构基线。 它不是一个功能齐全的电商系统,也不是通用 Web 框架,而是一个专注于“商城核心模型”的业务底座,用于快速构建和演进各类商业应用。 The licence is MIT.

Example prompts

  • “/extension-slots”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. 订单金额扩展优先实现 OrderPriceContributorInterface,通过 OrderPricePipeline 接入。
  2. 订单状态副作用优先实现 OrderEventListenerInterface,通过 OrderEventDispatcher 接入。
  3. 新扩展默认注册在 ExtensionRegistry,不要把新权益逻辑直接堆回 OrderService、OrderStatusMachine 或 RefundOrderStatusMachine。
  4. 扩展实现必须保持 Service 无状态,不能依赖实例属性保存请求态。
  5. 扩展中的落库副作用必须幂等,尤其是支付、完成、关闭、退款等可重复触发的事件。
  6. 金额扩展必须以分为边界做精确分配,避免浮点误差;返回给前端的金额统一保留两位小数。
  7. 多个扩展同时作用于订单金额时,必须明确优先级,避免互相覆盖或重复扣减。
  8. 不要为了单次、局部、不会复用的逻辑强行新增扩展点;局部简单逻辑可以留在原模块内。

What it can do on your machine

Read from SKILL.md and the folder at commit 3f10589. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Extension Slots loads about 416 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 85 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~416

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yyw-code/MallBase at commit 3f10589, republished under its MIT licence (© yyw-code). 85 words, ~416 tokens.

Download SKILL.mdSave it as .claude/skills/extension-slots/SKILL.md (or your agent's skills folder).
name
extension-slots
description
MallBase 扩展槽边界规范;涉及会员、积分、分销、余额、优惠等权益扩展接入订单、商品编辑或 UniApp 展示时使用。

扩展槽边界规范

适用场景

当需求涉及以下任一方向时,优先使用本规则:

  • 订单金额计算新增权益项,例如会员优惠、积分抵扣、优惠券、余额权益、分销相关金额。
  • 订单状态流转新增副作用,例如支付后冻结、完成后发放、关闭后回滚、退款后扣回。
  • 后台商品编辑页新增营销字段或 SKU 级权益字段。
  • UniApp 商品详情、规格弹窗、订单确认页新增权益展示。
  • 现有会员、积分、分销、余额能力需要接入统一扩展点。

后端规则

  1. 订单金额扩展优先实现 OrderPriceContributorInterface,通过 OrderPricePipeline 接入。
  2. 订单状态副作用优先实现 OrderEventListenerInterface,通过 OrderEventDispatcher 接入。
  3. 新扩展默认注册在 ExtensionRegistry,不要把新权益逻辑直接堆回 OrderService、OrderStatusMachine 或 RefundOrderStatusMachine。
  4. 扩展实现必须保持 Service 无状态,不能依赖实例属性保存请求态。
  5. 扩展中的落库副作用必须幂等,尤其是支付、完成、关闭、退款等可重复触发的事件。
  6. 金额扩展必须以分为边界做精确分配,避免浮点误差;返回给前端的金额统一保留两位小数。
  7. 多个扩展同时作用于订单金额时,必须明确优先级,避免互相覆盖或重复扣减。
  8. 不要为了单次、局部、不会复用的逻辑强行新增扩展点;局部简单逻辑可以留在原模块内。

后台商品编辑规则

  1. 商品营销字段、SKU 扩展字段优先集中在 frontend/admin/apps/web-antd/src/views/goods/goods/extension-slots.ts。
  2. goods-edit.vue 和 useGoodsEdit.ts 只负责渲染、透传、批量应用、提交转换,不再散落具体权益字段判断。
  3. 新增 SKU 字段必须同时覆盖默认值、编辑回填、批量设置、提交转换和列显隐。
  4. 字段显隐必须由功能开关和当前表单模式共同决定,避免功能关闭后仍提交隐藏字段。

UniApp 规则

  1. 商品详情、规格弹窗、订单确认页的权益展示优先集中在 frontend/uniapp/utils/extension-slots.js。
  2. 展示层只消费扩展槽返回的展示项,避免每个页面重复判断会员价、积分赠送、成长值等细节。
  3. 订单确认页的权益卡片、商品行提示、价格汇总行应从同一扩展状态构建,避免展示和提交金额不一致。
  4. 新增可交互权益项时,必须明确默认状态、禁用条件、提交参数和接口预览结果的对应关系。

测试要求

  1. 后端新增价格贡献器或事件监听器时,至少补充管线或监听器单测。
  2. 影响订单主链路时,必须覆盖预览、创建、支付、完成、关闭或退款中的相关边界。
  3. 影响前端展示时,至少执行对应前端构建;涉及真实用户链路时,用本地接口和浏览器抽样验证。
  4. 如果只调整扩展槽结构但不改变行为,测试可以聚焦在原有合同不变和关键页面不报错。

反模式

  • 在 OrderService::calculateAmounts() 中继续追加会员、积分、分销、优惠券等分支。
  • 在状态机里直接调用具体业务 Service,绕过统一事件分发。
  • 前端多个页面分别复制同一套会员价、积分赠送、成长值判断。
  • 功能开关关闭后仍显示字段、提交字段或触发副作用。
  • 为一次性页面排版创建新的扩展槽,增加不必要复杂度。

© yyw-code, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/extension-slots of yyw-code/MallBase.

Open the folder on GitHubat commit 3f10589

Compare with similar skills

Extension Slots next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Extension Slots compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Extension Slots this skillyyw-code/MallBase106—~416Automated safety check: PassMIT
Browser Extension Buildersickn33/agentic-awesome-skills47k2 repos~2.3kAutomated safety check: PassMIT
Browser Extension Launchsickn33/agentic-awesome-skills47k1 repos~1.4kAutomated safety check: PassMIT
Browser Extension Reversesickn33/agentic-awesome-skills47k1 repos~695Automated safety check: PassMIT
Browser Extension Reversezhaoxuya520/reverse-skill40k2 repos~366Automated safety check: PassMIT
Browser Extension Builderdavila7/claude-code-templates32k5 repos~1.5kAutomated safety check: PassMIT

Similar skills

  • Browser Extension Builder

    sickn33/agentic-awesome-skills

    Expert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions.

    47k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Browser Extension Launch

    sickn33/agentic-awesome-skills

    Builds, tests, packages, and prepares Chrome extensions for store launch from a plain-language idea; use for new extensions, fixes, releases, and submission recovery.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Browser Extension Reverse

    sickn33/agentic-awesome-skills

    Authorized reverse engineering of Chrome/Firefox extensions: manifest analysis, background workers, content scripts, and extension-based credential or data-exposure research.

    47k GitHub starsUsed in 1 repo~695 tokens
    SecurityAuto-check passed
  • Browser Extension Reverse

    zhaoxuya520/reverse-skill

    A skill your agent uses for authorized reverse engineering of browser extensions (Chrome/Firefox) including manifest analysis, background workers, and extension-based credential or traffic logic…

    40k GitHub starsUsed in 2 repos~366 tokens
    SecurityAuto-check passed
  • Browser Extension Builder

    davila7/claude-code-templates

    Expert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions.

    32k GitHub starsUsed in 5 repos~1.5k tokens
    DevelopmentAuto-check passed
  • Canvas Capture Extension

    remotion-dev/remotion

    Official

    Rebuild, install, and reload the private Remotion Canvas Capture unpacked Chrome extension.

    62k GitHub stars~903 tokensUpdated today
    Media & CreativeAuto-check passed

More from yyw-code/MallBase

All 12 skills in this repo
  • MallBase 支付与退款回调安全规则;修改 backend/route/notify.php、PayNotifyController、NotifyService、WechatPaymentResultService、mbpaymentlog,或处理微信/其它渠道 webhook 的验签、解密、防重放、金额校验、幂等、事务与 HTTP 应答时使用。

    106 GitHub stars~495 tokensUpdated 2 mo ago
    Auto-check passed
  • Route Permission System

    yyw-code/MallBase

    MallBase ThinkPHP 后台路由与权限元数据规则;新增或调整 backend/route/api/admin 路由、System 权限码、菜单元数据、/:id 路径参数、共享 permission 或 sync:permissions 同步时使用。

    106 GitHub stars~499 tokensUpdated 2 mo ago
    Auto-check passed
  • Upload Component First

    yyw-code/MallBase

    MallBase Vben Admin 上传组件与字段契约规则;实现图片、视频或文件上传,以及处理 FileInfo 回填和提交值时使用。

    106 GitHub stars~553 tokensUpdated 2 mo ago
    Auto-check passed
  • Architecture Layering

    yyw-code/MallBase

    MallBase ThinkPHP 后端分层、Swoole Service 无状态与 IDE 泛型规则;开发或重构 backend/app 下的 Controller、Service、Model,调整 BaseController/BaseService、service()/model() 调用、构造注入或协程安全状态时使用。

    106 GitHub stars~391 tokensUpdated 2 mo ago
    Auto-check passed
  • E2E Webantd Realapi

    yyw-code/MallBase

    MallBase Vben Admin 局部格式化与真实后端 E2E 收口规则;修改、测试或回归 web-antd 代码时使用。

    106 GitHub stars~308 tokensUpdated 2 mo ago
    Auto-check passed
  • List Query Sync

    yyw-code/MallBase

    MallBase ThinkPHP 列表查询与分页返回规则;实现或调整 Service 的 buildListQuery、分页 list/total、动态筛选、关联查询、统计、导出或 compact('total', 'list') 返回时使用。

    106 GitHub stars~395 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Extension Slots

What does Extension Slots do?

MallBase 扩展槽边界规范;涉及会员、积分、分销、余额、优惠等权益扩展接入订单、商品编辑或 UniApp 展示时使用。. Extension Slots is an agent skill from yyw-code/MallBase.

How do I install Extension Slots in Claude Code?

Run `npx skills add yyw-code/MallBase --skill extension-slots -a claude-code`. Or copy the skill folder (.codex/skills/extension-slots in yyw-code/MallBase) into .claude/skills/extension-slots in your project. Claude Code loads it when a task matches its description.

How do I install Extension Slots in Codex?

Run `npx skills add yyw-code/MallBase --skill extension-slots -a codex`. Or copy the skill folder (.codex/skills/extension-slots in yyw-code/MallBase) into .agents/skills/extension-slots in your project. Codex loads it when a task matches its description.

Can I use Extension Slots in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yyw-code/MallBase --skill extension-slots -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/extension-slots, .gemini/skills/extension-slots, .github/skills/extension-slots and .opencode/skills/extension-slots in your project.

What does Extension Slots need to run?

SKILL.md names no scripts, command-line tools or credentials: Extension Slots is instructions for the agent only.

Does Extension Slots access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Extension Slots safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Extension Slots use?

Extension Slots is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Extension Slots use?

About 416 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Extension Slots?

Skills that share tags, products or a category with Extension Slots: Browser Extension Builder (sickn33/agentic-awesome-skills, 47k stars), Browser Extension Launch (sickn33/agentic-awesome-skills, 47k stars), Browser Extension Reverse (sickn33/agentic-awesome-skills, 47k stars) and Browser Extension Reverse (zhaoxuya520/reverse-skill, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Extension Slots?

yyw-code (a GitHub user) maintains it in yyw-code/MallBase, which has 106 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 3, 2026.

Source: yyw-code/MallBase on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.