Render Code Shape 标志

Render Code Shape

社区
citypaul
render-code-shape

Render the shape of code — module boundaries, the types that cross them, signatures, and a cited call graph — for code that already exists or a change about to be built. Every name, type, and path is read from source and cited, or marked NEW; bodies collapse to one line of intent. Use when asking how something composes, tracing what a request actually touches, pseudocoding a change before implementing it, onboarding to an unfamiliar path, or producing the shape a plan and its tests will be checked against. Read-only: the render is the deliverable, never the edit. For judgments about whether the shape is good see codebase-design; for where files should live see structure-codebase; for a rendered picture see diagrams; for fault localization see debugging.

概览

发布者citypaul
代码仓库.dotfiles
技能名称render-code-shape
星标数
740
复刻数
96
附带文件
2
链接
  • Markdown 格式的指令

    模型按需加载的 SKILL.md 文件,因此只有在请求确实匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 2 个随附文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 citypaul 发布于 GitHub。请在安装前查看源内容。

安装

在 TypingMind 中安装 Render Code Shape AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/citypaul/.dotfiles/tree/main/claude/.claude/skills/render-code-shape
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/citypaul/.dotfiles.git /tmp/.dotfiles
mkdir -p .claude/skills
cp -r /tmp/.dotfiles/claude/.claude/skills/render-code-shape .claude/skills/render-code-shape
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Render Code Shape,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Render Code Shape。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Render Code Shape 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会获取指令,因此未使用的技能不会产生额外费用。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Render Code Shape

Code has a waterline. Above it sits the shape: modules and their boundaries, the types and values that cross those boundaries, the signatures, and the order calls actually happen in. Below it sits syntax and the statements inside a body.

Render the shape and collapse everything below the waterline to a single line of intent. Only bodies are pseudo — every name, type, and path is read from the source and cited by file and line, or marked [NEW]. This is why the render is trustworthy in a way a remembered summary is not.

Read-only. The render is the deliverable, not the edit. Producing a render never authorizes changing production code, tests, or configuration. Implement only if the request separately authorizes it, and then under the governing workflow — tdd for behavior change, refactoring or reduce-system-complexity for behavior-preserving work.

A render is not a verdict. It states what is visible in the render. Deciding whether a boundary is well-drawn belongs to codebase-design; deciding where files should live belongs to structure-codebase; ranking architecture investments belongs to improve-codebase-architecture.

Load alongside: planning (a [NEW] render is an input to a slice plan, never a substitute for one), codebase-design and structure-codebase (judgments about the shape once it is visible), finding-seams (when the render exposes an untestable dependency), characterisation-tests (when the existing path has no behavior evidence), diagrams (when relationships are materially clearer drawn than listed), technical-writing (when the render becomes a durable document).

1. Frame the render

Name the entry points to trace from and the frame edge — the packages, services, and libraries that count as outside. Name each wiring to render: production, plus any composition root that substitutes a dependency, such as tests, local dev, or a feature flag.

Classify each entry point existing or [NEW]. For a [NEW] render, resolve the requirement it must satisfy and the existing code it attaches to.

Prefer the narrowest frame that answers the question asked. A render that expands to the whole repository answers nothing.

Complete when: the entry points, the frame edge, every wiring, and the existing/[NEW] split are each explicit.

2. Read the parts

Follow every call from each entry point, opening each file on the path. For every function reached, record its file and line, its signature as written, the effects it causes, and the calls it makes.

Expand a path until it reaches a boundary crossing, a pure leaf, the frame edge, or a function already recorded. A path ends nowhere else.

For a [NEW] render, read the surrounding modules the change attaches to with the same rigour; parts that do not exist yet are derived from the requirement and marked.

Read the source. A signature recalled from training data, inferred from a name, or carried over from an older revision is a fabrication even when it happens to be right — and the citation is what makes the difference checkable.

Complete when: every path terminates on one of those four conditions, and every name that will appear in the render is either recorded with a file and line or marked [NEW].

3. Render the shape

Write in the project's own language and naming — the glossary term, not a synonym (see ubiquitous-language). Three parts:

Types — every type, interface, or schema that crosses a boundary, declared with its fields. A type from outside the frame is named and marked external.

Boundaries — one row per module: what it owns, what it exposes, what it depends on, and what it hides behind that surface.

Signatures — grouped under their module, each carrying parameter names, parameter types, return type, and error type as written in the source. Each body collapses to a single line naming its intent.

Where the cut is not obvious, place it here:

Above the waterlineBelow it
An effect that leaves the process: network, database, filesystem, clock, randomness, environmentPure local computation
A branch that changes which downstream call happensA branch that only changes a returned value
A helper whose effect crosses the module edgeA private helper contained inside it
What is constructed and injected whereFramework and transport boilerplate

Complete when: every type named in a signature is declared here or marked external, every module row states what it hides, and every signature matches its source or carries [NEW].

4. Render the call graph

One graph per wiring, as an indented tree. Each edge reads → Receiver.method(arg: Type, arg: Type) : Return, then its annotations, then its file and line. Order siblings by execution order.

submitCheckout(req: HttpRequest) : HttpResponse                          src/http/checkout.ts:14
  → Checkout.submit(cart: Cart, actor: UserId) : Receipt                 src/checkout/service.ts:31
      → Pricing.quote(cart: Cart) : Quote                                src/pricing/quote.ts:8
          → TaxRates.lookup(region: Region) : TaxTable  [boundary: network]   src/pricing/tax.ts:22
      → Payments.charge(quote: Quote, card: CardRef) : Receipt  [boundary: network]   src/payments/stripe.ts:40
      → Orders.insert(order: Order) : OrderId  [boundary: database]      src/orders/store.ts:17
      → Email.receipt(to: EmailAddress, receipt: Receipt) : void  [async]   src/mail/queue.ts:9
      → Checkout.release(cart: Cart) : void  [error: charge declined]    src/checkout/service.ts:58

Annotate every edge that is not a plain unconditional in-process call with at least one:

AnnotationMeaning
[if …]Happens only on the named condition
[each …]Repeats over the named collection
[async]Enqueued, scheduled, or not awaited on this path
[error …]Happens on the named failure path
[boundary: …]The effect leaves the process — name which
[NEW]Does not exist yet

A function already drawn appears as → Name (above) in place of a second expansion.

Complete when: every edge names the values crossing it, every non-plain edge carries an annotation, every branch terminates on a step 2 condition, and each wiring that differs from production is drawn beside it.

5. Return the render

Lead with the entry points, the frame edge, and the wirings drawn. Then give the types, the boundary table, the signatures, and the call graphs.

Close with what the shape shows, stated as facts already visible in the render rather than as judgements: dependency cycles, a dependency pointing against the module layering, argument counts, functions reached from many callers, boundary crossings on the primary path, and paths no wiring covers. Name what stayed unread and why.

Where a fact is a decision waiting to happen, name the skill that owns the decision rather than making it here — a cycle or a leaking boundary routes to codebase-design, a path with no test wiring routes to characterisation-tests or finding-seams, an untraceable dependency routes to structure-codebase.

When the render is a plan for work about to be done, save it under plans/ beside the slice plan so the implementation can be checked against it, and so a later reviewer can see which parts were [NEW] at the time.

Complete when: every citation resolves, every observation points at an element of the render, and every gap names what would close it.

Anti-Patterns

  • Rendering from memory or from a summary of the code instead of opening the files — the citation is the whole contract.
  • Carrying a signature over from an older revision, or inferring one from a name, without reading it.
  • Expanding every path to a leaf, producing a render nobody reads, when the question needed one entry point.
  • Slipping below the waterline: statements, control-flow detail, and framework boilerplate reproduced as prose.
  • Silently mixing [NEW] and existing names, so the reader cannot tell what is proposed from what is there.
  • Drawing only the production wiring when a test or feature-flag composition root substitutes a dependency that changes the graph.
  • Closing with judgments — "this is over-abstracted", "this should be split" — instead of the facts the render actually shows.
  • Editing code during the render, or treating an approved render as approval to implement.
  • Rendering a [NEW] shape and then implementing it straight through, skipping the failing behavior test that tdd requires.

Completion Check

  • Does every name, type, and path in the render resolve to a file and line in the current tree, or carry [NEW]?
  • Is the frame edge explicit, and is every wiring that substitutes a dependency drawn beside production?
  • Does every path terminate on a boundary, a pure leaf, the frame edge, or an already-drawn function?
  • Does every module row say what it hides, not just what it exposes?
  • Is every non-plain call-graph edge annotated, and does every edge name the values crossing it?
  • Are the closing observations facts visible in the render, with decisions routed to the skill that owns them?
  • Did the render stay read-only, and is unread territory named rather than quietly omitted?

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Render Code Shape AI 技能有什么作用?

Render the shape of code — module boundaries, the types that cross them, signatures, and a cited call graph — for code that already exists or a change about to be built. Every name, type, and path is read from source and cited, or marked NEW; bodies collapse to one line of intent. Use when asking how something composes, tracing what a request actually touches, pseudocoding a change before implementing it, onboarding to an unfamiliar path, or producing the shape a plan and its tests will be checked against. Read-only: the render is the deliverable, never the edit. For judgments about whether...

为什么在 TypingMind 中使用 Render Code Shape?

因为您只需安装一次,就能搭配任何模型使用。Render Code Shape 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型,甚至可以在聊天中途切换模型,而不会影响技能正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Render Code Shape?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/citypaul/.dotfiles/tree/main/claude/.claude/skills/render-code-shape。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Render Code Shape?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Render Code Shape 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以搭配 Render Code Shape 使用,包括 GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等,都可在 TypingMind 中使用您自己的 API 密钥接入。

Render Code Shape AI 技能免费吗?

该技能源自 citypaul 在 GitHub 上发布的项目。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇