Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

pencilpencil 搜索

Agent Skill

pencil 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

188

周安装

8

GitHub Stars

公开资料未说明

下载量

66
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ethan-huo/pencil-cli --skill pencil

简介

pencil 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 它可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装命令为 npx skills add https://github.com/ethan-huo/pencil-cli --skill pencil。
  • 当前分类为研究检索,适用于 Codex、Claude、Cursor、Gemini CLI。

SKILL.md

Pencil Design Workflow

CLI reference

pencil --schema               # full typed schema — signatures, flags, examples
pencil --schema=.<command>    # zoom in on one command

--schema is the authoritative CLI reference. This document covers the design workflow — the thinking and process that makes the tools effective.

Rules

  1. --file is global — pass it before the subcommand: pencil --file foo.pen get...
  2. Never skip discovery — always run the pre-flight sequence before designing.
  3. Screenshots land in $PWD/.pencil/screenshots/ — use the Read tool on the printed path to view them.
  4. All colors must be tokens — hardcoded hex values are wrong. Use $--background, $--card, $--primary, etc.
  5. Output is JSX-serialized scene graph — the CLI renders the JSON node tree as JSX for readability. It's still a scene graph underneath — node types, IDs, and properties map 1:1 to the.pen schema.
  6. No open command — the CLI does not have an open command. All commands accept --file to target a specific.pen file directly. If you need to open a new file in Pencil, use the system command open <path.pen>.
  7. Multi-file workflow — when working with multiple.pen files, always pass --file explicitly. state accepts --file too and will auto-switch the active editor. Ask the user which files are involved rather than guessing from state output alone.

Commands at a glance

CommandPurpose
stateCurrent editor state — active file, selection, top-level nodes
getRead nodes by ID or search patterns (type, name, reusable)
designExecute insert/copy/update/replace/move/delete/image ops
screenshot --node <id>Capture a node as image for visual verification
varsList all design tokens (colors, radii) with Light/Dark values
set-varsCreate or update design tokens
layoutLayout snapshot — computed rectangles, --problems for issues
spaceFind empty canvas area for placing new frames
search-propsAudit unique property values across a subtree
replace-propsBulk-replace property values (e.g. hex → token)
guidelines --topic <t>Fetch design rules for a domain
style-tagsList available style guide tags
style-guideGet style guide by tags or name (palette, typography inspiration)

Run pencil --schema=.<command> for full flags and examples on any command.

Pre-flight: Understand Before You Touch

Run these before any design task. The goal is to build a mental model of the canvas.

# 1. What file is open? What's selected?
pencil state                          # shows active editor
pencil --file other.pen state         # auto-switches to a different file

# 2. What tokens exist? Every color/radius/spacing MUST come from here.
pencil --file foo.pen vars

# 3. What reusable components exist? Reuse before rebuilding.
pencil --file foo.pen get --reusable --depth 2 --compact

# 4. What's on the canvas? Orient yourself.
pencil --file foo.pen get --depth 1 --compact

# 5. Visual reference — screenshot an existing screen to match its style.
pencil --file foo.pen screenshot --node <id>

Why this order matters:

  • state first — confirm the right file is active and see what's selected.
  • vars second — you need to know available tokens before writing any fill/stroke/color values.
  • Reusable components third — if a Button or Card already exists, reference it (type: "ref", ref: "<id>") instead of rebuilding from scratch.
  • Top-level structure fourth — understand what screens/frames already exist and where they sit on the canvas.
  • Screenshot last — gives you a visual target to match when designing adjacent screens.

--compact for structure, full output for styling — use --compact when exploring structure (pre-flight, navigation). It strips all style props (fill, padding, font, etc.) and shows only id, name, type, and tree hierarchy. Omit it when you need the actual design properties to match or modify styling.

Reading multiple nodes: --node accepts comma-separated IDs:

pencil --file foo.pen get --node abc12,def34,ghi56 --depth 2

Only nodes with reusable attribute can be used as ref targets. The output may also show PascalCase tags like <NavItemsSection /> — these are display-only shorthands for repeated patterns, NOT reusable components. The footer distinguishes the two.

Reusable components appear as compact refs in output (e.g. <Ref ref="abc12" />). To inspect a component's internal structure, do a secondary get:

pencil --file foo.pen get --node abc12,def34 --depth 2

Design cycle

The workflow is iterative: discover → design → verify → adjust.

state + vars + get (discover)
       |
       v
   space (find where to put new content)
       |
       v
   design (batch operations)
       |
       v
   screenshot (verify visually)
       |
       v
   layout --problems (check for clipping/overlap)
       |
       v
   adjust if needed (repeat)

1. Design operations

pencil design accepts a DSL string of operations. Each line is one op with a binding:

OPSignaturePurpose
Iid=I(parent, {...})Insert a new node
Cid=C(nodeId, parent, {...})Copy a node (copying reusable creates a ref instance)
UU(path, {...})Update properties (cannot change children)
Rid=R(path, {...})Replace a node (swap children inside component instances)
MM(nodeId, parent, index?)Move a node
DD(nodeId)Delete a node
G`G(nodeId, "ai"\"stock", prompt)`Fill a frame/rect with AI-generated or stock image

Bindings chain — use a previous binding as parent for the next op:

card=I("rootFrame", {type: "frame", fill: "$--card", layout: "vertical", gap: 12})
title=I(card, {type: "text", content: "Hello", fill: "$--foreground"})

Max 25 ops per call. For larger designs, split by logical section.

Preferred: heredoc (no escaping, no quoting issues):

pencil --file foo.pen design <<'EOF'
card=I("rootFrame", {type: "frame", fill: "$--card", layout: "vertical", gap: 12})
title=I(card, {type: "text", content: "Hello", fill: "$--foreground"})
EOF

Other input methods:

pencil --file foo.pen design @ops.txt                          # from file
pencil --file foo.pen design "x=I(root, {type: 'text'})"      # inline (single-line only)
cat ops.txt | pencil --file foo.pen design                     # piped

Design DSL gotchas

These are easy to get wrong. Read carefully.

  • document is a predefined binding — references the root node. Use it as parent only for top-level screens/frames.
  • placeholder: true — marks a frame as a layout container. Set this on a frame before inserting children into it.
  • Component instance paths — to modify a child inside a ref instance, use slash-separated paths: U("instanceId/childId", {...}). Works at any nesting depth.
  • Copy + descendants, not Copy + Update — C() gives children new IDs, so U(copiedId+"/oldChildId") will fail. Override descendants in the Copy itself: C("srcId", parent, {descendants: {"childId": {content: "New"}}}).
  • Copy positioning — use positionDirection and positionPadding on C() to auto-place the copy: C("srcId", document, {positionDirection: "right", positionPadding: 100}).
  • No image node type — images are fills on frame/rectangle nodes. First I() a frame, then G() to apply the image fill.
  • Icon type is icon_font — not icon. Use {type: "icon_font", icon: "loader", family: "lucide"}.
  • Every I/C/R must have a binding — even if unused. foo=I(...) not I(...).
  • On error, the entire batch rolls back — fix and retry.

2. Visual verification

Always screenshot after designing to catch misalignment, clipping, or visual errors:

pencil --file foo.pen screenshot --node <frame-id>

3. Layout problems

Check for clipping and overlap issues without reading the full layout tree:

pencil --file foo.pen layout --problems

Thinking in tokens

The vars output gives you a token table like:

TOKENLIGHTDARK
--background#FFFFFF#09090B
--card#FFFFFF#18181B
--foreground#09090B#FAFAFA
--primary#FF8400#FF8400
--muted#F4F4F5#27272A

When designing, always write $--card instead of #18181B. This ensures the design works across Light/Dark themes automatically.

To add or update tokens:

pencil --file foo.pen set-vars --input '{"variables":{"--brand":{"type":"color","value":[{"theme":{"Mode":"Light"},"value":"#FF8400"},{"theme":{"Mode":"Dark"},"value":"#FF8400"}]}}}'

Bulk property operations

For tokenizing an existing design (replacing hardcoded hex → tokens):

# 1. Quick audit — see unique values per property (includes already-tokenized colors as resolved hex)
pencil --file foo.pen search-props --parent <id> --prop fillColor --prop textColor

# 2. Deep audit — find ONLY hardcoded hex values (excludes $--var references)
pencil --file foo.pen get --node <id> --depth 50 --raw | jq '[.. | strings | select(test("^#[0-9A-Fa-f]{3,8}$"))] | unique'

# 3. Replace them
pencil --file foo.pen replace-props --input '{"parents":["<id>"],"properties":{"fillColor":[{"from":"#18181B","to":"--card"}]}}'
Tip: search-props resolves all values to hex — you can't tell which are already tokenized. Use step 2 (--raw | jq) to see only the remaining hardcoded colors that still need replacement. Pipe --raw through jq for any custom filtering on the full scene graph JSON.

replace-props uses batch_get + batch_design internally, so token references ($--var) are always stored correctly.

Style guides

When designing new screens and not working with an existing design system:

pencil style-tags                        # list available tags
pencil style-guide --tag modern --tag dark  # get a style guide for inspiration

--eval context

--eval runs a JS expression with access to all CLI handlers. Use it for programmatic operations that need logic (loops, conditionals, complex payloads).

Available API — do NOT probe with console.log, just call directly:

argc.handlers.get({file, node, depth, ...})
argc.handlers.design({file, ops})
argc.handlers.vars({file})
argc.handlers['set-vars']({file, variables, replace})
argc.handlers.screenshot({file, node})
argc.handlers.layout({file, parent, depth, problems})
argc.handlers.space({file, direction, width, height, node, padding})
argc.handlers['search-props']({file, parent, prop})
argc.handlers['replace-props']({file, parents, properties})
argc.handlers['style-guide']({tag, name})

Parameters match CLI flags. file is the --file path.

Example:

pencil --eval "
  await argc.handlers['replace-props']({
    file: 'design/App.pen',
    parents: ['rootId'],
    properties: {
      fillColor: [{ from: '#18181B', to: '--card' }],
      textColor: [{ from: '#FAFAFA', to: '--foreground' }],
    },
  })
"

--script

Use when operations are predetermined and don't need mid-way inspection.

pencil --script ./scripts/tokenize.ts

Discovery first, script second — always run individual pencil get calls to understand the canvas before writing a script.

Guidelines

Pencil has built-in design guidelines for specific domains (mobile-app, web-app, landing-page, etc.). Before starting a design task, fetch the relevant guideline:

pencil --schema=.guidelines   # see available topics
pencil guidelines --topic <topic>

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.77%
按下载量换算24

Claude

31.06%
按下载量换算20

Cursor

20.27%
按下载量换算13

Gemini CLI

9.23%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills