Xfg Coding Map Skills logo

Xfg Coding Map Skills

Community
fuzhengwei
xfg-coding-map-skills

代码地图(Code Map)生成技能:把一次开发迭代、一个需求设计或一个教学章节,生成为一张自包含的可交互三栏 HTML 全景图(IDEA 风格工程树 ⇄ Mermaid 全景/时序/流程图 ⇄ 变更说明卡,三方点击联动 + SVG 连线 + 主线导览)。当用户要求生成代码地图、全景图、开发导览图、迭代对比图、需求蓝图、PR 讲解图、架构总览图,或想'跟着流程走实现一个需求'、'讲清楚这次改了什么'时使用。

Overview

Publisherfuzhengwei
Repositoryxfg-coding-map-skills
Skill namexfg-coding-map-skills
Stars
28
Forks
6
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fuzhengwei on GitHub. Read the source before you install it.

Installation

Install the Xfg Coding Map Skills AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fuzhengwei/xfg-coding-map-skills/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fuzhengwei/xfg-coding-map-skills.git \
  .claude/skills/xfg-coding-map-skills
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Xfg Coding Map Skills in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Xfg Coding Map Skills on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Xfg Coding Map Skills is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

代码地图生成(Code Map Generator)

把"一次开发迭代 / 一个需求 / 一个教学章节"提炼为一张自包含的可交互 HTML:左侧 IDEA 风格工程树(可搜索、折叠、状态徽标),中间 Mermaid 图(全景/时序/流程,五色变更标记),右侧变更说明卡;三方点击联动画连线,顶部"跟着流程走"导览条按开发叙事走完整个主题。

核心资产:assets/code-map-template.html 是渲染引擎 + 示例数据(示例即质量基准)。生成 = 换数据,不改引擎。引擎已内置中栏画布的拖拽平移、滚轮锚点缩放与缩放比例显示,生成时无需重复实现。

工作流

第 1 步:识别场景

读取 references/scenarios.md,判断属于哪种场景并采用其配置(页签组合、badge 语义、卡片口径、TOUR 动线):

  • S1 教学章节(如"生成 xfg-2-2 的全景图")
  • S2 迭代对比(如"v1.2 → v1.3 改了什么")
  • S3 需求蓝图(如"这个需求怎么做,给我开发导览"——图是目标态,TOUR 即开发顺序)
  • S4 PR/评审讲解
  • S5 架构 Onboarding

场景不明确时问一句,不要猜。

第 2 步:收集素材

  • 迭代/PR 对比:运行 scripts/extract-diff.sh <repo> <baseline-ref> [current-ref],按插入行数倒序深入阅读变更文件;统计数字填 header stats。
  • 教学章节:读该章节的 commit 范围与已有教程文档。
  • 需求蓝图:读需求描述 + 现有代码结构(模块、既有可复用类),设计目标态的类清单与交互。
  • Onboarding:遍历项目顶层结构。

第 3 步:构建数据并生成

  1. 建输出目录(默认 <用户项目>/docs/code-map/<slug>/,用户指定则从其指定),复制:
    • assets/code-map-template.html → <slug>.html
    • assets/vendor/ → 同级 vendor/(离线渲染必需)
  2. 按 references/data-spec.md 的字段规范,整体替换模板中 MAP-DATA-START 到 MAP-DATA-END ═ 之间的数据区:OVER_SRC / SEQ_SRC / FLOW_SRC 三个 mermaid 图源、TREE(工程树)、DOCS(说明卡)、TOUR(导览站点)。
  3. 替换 MAP-META 注释标注的元信息(title / h1 / 副标题 / stats / 包名 / 右栏标题 / 欢迎语)。localStorage key 必须换新(<slug>-welcomed)。
  4. 场景需要更少页签时:删除对应 .tab、#wrap-x、#box-x、#src-x 元素和数据区对应 X_SRC 常量,引擎自动适配。

第 4 步:校验(必须通过)

bash
node <本技能目录>/scripts/validate-map.js <输出的html>
  • 0 错误才可交付;错误最常见的是 kw 在图源码中找不到(联动断链)——修图源标签或改 kw。
  • 警告逐条评估:孤儿说明卡、无 kw 的联动节点、TOUR 站数异常。
  • 有浏览器能力时打开页面自查一轮;没有则交付时说明已通过静态校验。

第 5 步:交付

present_files 打开 HTML,并附使用说明:顶部导航条跟流程走 / 任意一栏点击三方联动 / 左树支持搜索 / 中栏画布按住拖拽平移、滚轮以光标为中心缩放(最高 250%,可缩回适配全貌,⤢ 适配复位,Shift/Alt + 滚轮为原生滚动)。若为 S3 蓝图场景,说明"按导航条 1→N 顺序即开发顺序"。

质量红线

  1. 引擎区(数据区之外的所有代码)一行不改。
  2. 五色 classDef 体系不得自创颜色;新增节点标签带 🆕。
  3. 树里每个 doc 节点都能联动高亮图节点;TOUR 单独看也构成完整叙事。
  4. 一张图一个主题;两个不相干需求拆成两张图。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Xfg Coding Map Skills AI skill do?

代码地图(Code Map)生成技能:把一次开发迭代、一个需求设计或一个教学章节,生成为一张自包含的可交互三栏 HTML 全景图(IDEA 风格工程树 ⇄ Mermaid 全景/时序/流程图 ⇄ 变更说明卡,三方点击联动 + SVG 连线 + 主线导览)。当用户要求生成代码地图、全景图、开发导览图、迭代对比图、需求蓝图、PR 讲解图、架构总览图,或想'跟着流程走实现一个需求'、'讲清楚这次改了什么'时使用。

Why use Xfg Coding Map Skills on TypingMind?

Because you install it once and use it with any model. Xfg Coding Map Skills is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Xfg Coding Map Skills in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fuzhengwei/xfg-coding-map-skills/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Xfg Coding Map Skills?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Xfg Coding Map Skills?

As many as you like. As long as a model supports skills, you can use Xfg Coding Map Skills with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Xfg Coding Map Skills AI skill free?

Yes. It is published on GitHub by fuzhengwei under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇