Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

render-functions渲染函数

Agent Skill

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

总安装

1,934

周安装

79

GitHub Stars

173

下载量

626
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/patternsdev/skills --skill render-functions

简介

render-functions 用于处理 GitHub 仓库、Issue、Pull Request 等协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕代码变更进行整理。

  • 它可辅助分析仓库状态、代码差异或协作事项,适用于开发流程管理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Render Functions

Table of Contents

Vue recommends for us to use templates (i.e. the <template></template> syntax) to construct the markup of our Vue components. However, we're also given the opportunity to directly use something known as render functions to build the markup of our components as well.

Vue, at build time, takes the templates we create for our components and compiles them to render functions. It's at these compiled render functions, where Vue builds a virtual representation of nodes that make up the virtual DOM.

When to Use

  • Use this when you need complex dynamic rendering logic that's hard to express with template directives
  • This is helpful for component library development where flexibility and low-level control are needed

When NOT to Use

  • When templates handle the use case — templates are more readable and benefit from compile-time optimizations
  • For standard component markup where v-if, v-for, and slots cover the rendering needs
  • When the team is unfamiliar with h() / JSX and the maintenance cost outweighs the flexibility gain

Instructions

  • Use the h() function with three arguments: tag/component, props/attributes, and children
  • Use JSX with @vue/babel-plugin-jsx as a more readable alternative to raw h() calls
  • Prefer Vue templates for most application code — render functions are for advanced cases
  • Remember that Vue JSX uses class (not className) and single curly braces {}

Details

By using render functions, we skip the compile step that Vue takes to compile our templates, and are able to construct our component templates with the help of programmatic JavaScript.

But why?

Render functions come into play when we require a higher level of customization and flexibility that's not easily achievable with the standard template syntax. In a nutshell, you may prefer to use render functions:

  • When you need to dynamically render components or elements based on complex logic that can be cumbersome to express within a template.
  • You want to have a direct hand on the Virtual DOM for advanced manipulations.
  • You want to use JSX for building the template of your components.

Outside of these unique cases, Vue's template syntax should remain the go-to method for constructing component markup.

Render functions

Assume we had the following component that contains a <div> element encompassing a <header> element. The text content of the <header> element simply displays the value of a message prop.

<template>
  <div class="render-card">
    <header class="card-header card-header-title">{{ message }}</header>
  </div>
</template>

<script setup>
  const { message } = defineProps(["message"]);
</script>

We'll recreate the markup of the component step by step with the help of the render function — i.e. the h() function.

h is short for hyperscript which is a term often used in virtual DOM implementations to denote JavaScript syntax that produces HTML. In simple terms, the h() function is the render function that allows us to create the "virtual" representation of the DOM nodes that Vue uses to track and subsequently render on the page.

The h() function takes three arguments of its own:

  1. An HTML tag name or a component definition.
  2. The props/attributes to be passed onto the element (event listeners, class attributes, etc.).
  3. Child nodes of the parent node.

Here's the full render function equivalent:

<template>
  <render />
</template>

<script setup>
  import { h } from "vue";

  const { message } = defineProps(["message"]);

  const render = () => {
    return h(
      "div",
      {
        class: "render-card",
      },
      [
        h(
          "header",
          {
            class: "card-header card-header-title",
          },
          message
        ),
      ]
    );
  };
</script>

We can now render the above component in the parent App.vue instance and pass a value of "Hello World!" to the message prop.

<template>
  <RenderComponent message="Hello world!" />
</template>

<script setup>
  import RenderComponent from "./components/RenderComponent.vue";
</script>

The component constructed with a render function produces the exact same output to its template equivalent.

JSX

JSX is a syntax extension that allows us to write HTML-like code within JavaScript. With Vue, JSX can be used as an alternative to the h() function to construct render functions.

Vue's JSX support isn't built in like in React. We need to use a specific Babel plugin — @vue/babel-plugin-jsx — to have our JSX code transformed into the appropriate h() function calls.

Here's the same render function component we've built before but now recreated with JSX:

<script setup>
  const { message } = defineProps(["message"]);

  const render = () => {
    return (
      <div class="render-card">
        <header class="card-header card-header-title">{message}</header>
      </div>
    );
  };
</script>

Since JSX is closer to JavaScript than to HTML, Vue JSX components use class instead of className and variables are embedded with single curly braces {} instead of double curly braces {{}}.

When to use render functions

  • If your component has complex, conditional rendering logic that is hard to express with template directives, render functions (with or without JSX) can provide a cleaner solution.
  • If you want more direct control over the virtual DOM.
  • In library/component-kit development where flexibility and low-level control are needed.

For most typical application development, Vue templates offer the right level of expressiveness and readability. Render functions and JSX are powerful tools to reach for when templates aren't enough.

Source

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.05%
按下载量换算232

Claude

29.09%
按下载量换算182

Cursor

19.41%
按下载量换算122

Gemini CLI

8.87%
按下载量换算56

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills