Token导航 LogoToken导航

Agent Skill · 前端设计

markdown-content(Markdown 内容)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

markdown-content 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 5,261。

总安装 706周安装 30GitHub Stars 10下载 247核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/joyco-studio/skills --skill markdown-content

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

markdown-content 用于辅助文档、README 和 Markdown 内容的整理与改写。适合提炼结构、补齐章节、统一术语、检查链接或整理零散材料成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论。涉及对外文案时,还需控制语气,避免过度营销或夸大能力。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/markdown-content

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/joyco-studio/skills --skill markdown-content;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

markdown-content 怎么安装?

在终端执行 npx skills add https://github.com/joyco-studio/skills --skill markdown-content。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

markdown-content 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

markdown-content 需要什么权限?

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

markdown-content 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

markdown-content 用的人多吗?

公开数据是累计安装 706 次,近一周安装 30 次,下载 247 次,GitHub 10 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

markdown-content 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
markdown-content

Markdown 内容 · 本页

70610只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Markdown Content Pages — Next.js

This skill defines how to build content-driven pages (blog posts, changelogs, legal pages, knowledge bases) in a Next.js App Router project using MDX.

The goal is visual and behavioral consistency between:

  • Markdown codeblocks written in .mdx files (processed at build time)
  • Custom React code components rendered on the page (highlighted at runtime)

Stack Overview

LayerLibraryPurpose
Content frameworkfumadocs-mdxMDX collection definitions, frontmatter schemas, build-time processing
Content runtimefumadocs-coreSource loader, page tree, slug resolution
Syntax highlightingshiki + rehype-pretty-codeDual-theme code highlighting at build time (MDX) and runtime (components)
Schema validationzodTyped frontmatter with defaults and optional fields
StylingTailwind CSS v4Utility-first styles, custom prose CSS, code block styles
FrameworkNext.js (App Router)File-based routing with catch-all [[...slug]] for content pages
npm install fumadocs-mdx fumadocs-core shiki rehype-pretty-code zod

Project Structure

├── app/
│   ├── layout.tsx                       # Root layout
│   ├── styles/
│   │   ├── globals.css                  # Tailwind + stylesheet imports (order matters)
│   │   ├── prose.css                    # Self-contained typography for .prose class
│   │   ├── shiki.css                    # Code block styling (themes, line numbers, highlights)
│   │   └── theming.css                  # Color variables (light/dark) — imported first
│   └── (content)/                       # Route group for content pages
│       ├── layout.tsx                   # Content layout wrapper
│       └── [[...slug]]/
│           └── page.tsx                 # Catch-all page rendering MDX content
├── content/
│   ├── meta.json                        # Top-level page ordering
│   ├── index.mdx                        # Landing page
│   └── <category>/                      # e.g. blog/, legal/, changelog/
│       ├── meta.json                    # Category page ordering
│       └── <page>.mdx                   # Individual content pages
├── components/                          # Code block components (see Code Block Components)
├── lib/
│   ├── source.ts                        # fumadocs-core source loader
│   ├── shiki.ts                         # Shared shiki config, transformers, highlightCode()
│   └── cn.ts                            # clsx + tailwind-merge utility
├── mdx-components.tsx                   # MDX element → React component mappings
└── source.config.ts                     # fumadocs-mdx collection + rehype pipeline

Content Collection

source.config.ts

Defines two things:

  1. The content collection — defineDocs() pointing at the content/ directory with a Zod-extended frontmatter schema.
  2. The MDX pipeline — defineConfig() with rehype-pretty-code replacing the default fumadocs highlighter.

Key patterns:

  • Call plugins.shift() inside rehypePlugins to remove the built-in fumadocs syntax highlighter, then plugins.push() rehype-pretty-code.
  • Configure dual shiki themes (one light, one dark) so both color sets are embedded in the markup. CSS toggles which is visible.
  • Pass custom shiki transformers that inject metadata into the AST (raw source text) for components to read at render time.
  • Use onVisitTitle to add not-prose to code block title elements so prose typography doesn't affect them.

next.config.ts

Wrap the Next.js config with createMDX() from fumadocs-mdx/next.

lib/source.ts

Create a loader() from fumadocs-core/source with a baseUrl and the collection's .toFumadocsSource(). Export the source and a Page type via InferPageType.


Content Files

MDX Frontmatter

Every .mdx file starts with YAML frontmatter validated by the Zod schema in source.config.ts. Imports go after the closing ---. React components can be used inline alongside standard markdown. Code blocks use fenced syntax with language tags, and a title="filename.tsx" meta string adds a title bar.

meta.json

Controls page ordering within a directory — an array of slug strings:

{
  "pages": ["index", "terms-of-service", "privacy-policy"]
}

Catch-All Content Page

The [[...slug]]/page.tsx route resolves slugs via source.getPage(params.slug), returns notFound() if missing, and renders:

<article className="prose">
  <h1>{page.data.title}</h1>
  <p className="text-muted-foreground">{page.data.description}</p>
  <MDX components={getMDXComponents()} />
</article>

Export generateStaticParams using source.generateParams() for static generation.


Shiki Configuration

lib/shiki.ts

Centralizes all syntax highlighting config. Used by both the MDX pipeline (build-time) and custom code components (runtime).

This module should export:

  1. A language map — Record<string, BuiltinLanguage> mapping file extensions (ts, tsx, sh, etc.) to shiki language identifiers. Plus a getLanguageFromExtension() helper.
  2. Shiki transformers — run during MDX compilation, attaching custom properties to AST nodes that components read at render time. Attach the raw source string (for copy button) so the component mapping can use it.
  3. highlightCode(code, language) — an async function using codeToHtml() with the same dual themes as the MDX pipeline. This is the consistency mechanism — both build-time and runtime highlighting use identical shiki config and produce the same data attributes (data-line-numbers, data-line), ensuring matching visual output everywhere.

MDX Component Mappings

mdx-components.tsx

Maps HTML elements from the MDX compiler to React components. This is the bridge between raw markdown and the component system.

Key mappings:

  • code — Renders a styled inline <code> element.
  • pre — Reads transformer metadata from props. Renders a <pre> with a CopyButton overlay using the raw source text.
  • img — Optionally wrap with Next.js Image for optimization.

The flow: author writes fenced code block → rehype-pretty-code + shiki produce <pre><code> with syntax tokens → shiki transformers attach metadata → MDX calls these mappings → components read metadata and render accordingly.


Code Block Components

Build these client components for the code display system:

CodeBlock

Single code display. Accepts highlightedCode (HTML string), language, optional title, rawCode (for copy), maxHeight, wrap. Renders a <figure data-rehype-pretty-code-figure> with optional <figcaption> title bar, the highlighted HTML via dangerouslySetInnerHTML, and a CopyButton.

CodeBlockTabs

Multi-file tabbed code. Accepts an array of {filename, highlightedCode, rawCode} tabs. Uses controlled tab state. Renders tabs in a <figcaption> with a CopyButton for the active tab.

CopyButton

Clipboard button with visual feedback. Uses a useCopyToClipboard hook that calls navigator.clipboard.writeText() and shows a checkmark for ~2 seconds. Positioned absolutely (top-right) with opacity transition on group hover.


Styling Architecture

globals.css — Import Order

@import 'tailwindcss';
@import './theming.css';
@import './prose.css';
@import './shiki.css';

theming.css must come first — it defines the color variables that prose and shiki consume.

theming.css — Color Variables

Define light and dark mode variables consumed by shiki.css and component classes:

  • --color-code — code block background
  • --color-code-foreground — code block text
  • --color-code-highlight — highlighted line background

prose.css — Self-Contained Typography

A hand-rolled .prose class that doesn't depend on @tailwindcss/typography or any UI framework. Use :where() selectors to keep specificity at zero. Use .not-prose as an escape hatch for embedded components.

Cover at minimum: body color and line-height, headings (h1–h6), paragraphs, links, strong, lists (ul/ol/li), blockquotes, horizontal rules, tables, and code figures (figure[data-rehype-pretty-code-figure]).

Design decisions:

  • Body text at reduced opacity (e.g. 70% of --foreground via color-mix) for softer reading
  • Headings at full --foreground with tighter line-height
  • Code figures with vertical margin and first/last child resets

shiki.css — Code Block Styles

Style all code blocks uniformly — MDX-rendered and component-rendered both use the same data attributes.

Key rules:

  • Dual-theme switching — In .dark, swap color to var(--shiki-dark) on [data-rehype-pretty-code-figure] span. Light theme is the default; shiki embeds both color sets as CSS variables.
  • Container — [data-rehype-pretty-code-figure] gets background from --color-code, rounded corners, overflow hidden.
  • Line numbers — CSS counters on [data-line-numbers] [data-line]::before. Sticky left position so they stay visible on horizontal scroll.
  • Line highlighting — [data-highlighted-line] gets a subtle background and left border.
  • Title bar — [data-rehype-pretty-code-title] styled with mono font, muted color, bottom border.
  • Text wrapping — [data-wrap='true'] code enables white-space: pre-wrap.

Consistency Model

The system ensures a fenced markdown code block and a <CodeBlock> React component produce identical visual output. This is achieved through:

  1. Same shiki themes — Both MDX pipeline and highlightCode() use the same dual-theme pair.
  2. Same CSS targets — Both produce [data-rehype-pretty-code-figure] elements styled by shiki.css.
  3. Same data attributes — data-line, data-line-numbers, data-highlighted-line, data-wrap are used by both paths.
  4. Same color variables — --color-code family from theming.css applies uniformly.
  5. Shared copy button — Every code display uses the same CopyButton component.

Implementation Checklist

  1. Install dependencies: fumadocs-mdx, fumadocs-core, shiki, rehype-pretty-code, zod
  2. Create source.config.ts with frontmatter schema and rehype-pretty-code pipeline
  3. Wrap next.config.ts with createMDX()
  4. Create lib/source.ts with the source loader
  5. Create lib/shiki.ts with language map, transformers, and highlightCode()
  6. Create mdx-components.tsx mapping pre and code to custom components
  7. Create code block components (CodeBlock, CodeBlockTabs, CopyButton)
  8. Set up prose.css (self-contained typography) and shiki.css (code block styling)
  9. Define theme variables in theming.css including --color-code family
  10. Create content directory with meta.json files
  11. Create catch-all [[...slug]]/page.tsx route
  12. Import stylesheets in globals.css in correct order (theming → prose → shiki)

平台分布

Codex

37.12%
按下载量换算92

Claude

30.42%
按下载量换算75

Cursor

19.78%
按下载量换算49

Gemini CLI

9.64%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

继续浏览同类 Skills