본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #5168

markstream-custom-components

하는 일

이 도구는 문서(기사나 게시물 같은 서식 있는 텍스트)에서 특정 요소가 나타나는 방식을 맞춤 설정하게 해 줍니다. 이미지, 링크, 코드 블록 같은 요소의 모습을 바꾸거나, 나만의 특별한 요소를 추가할 수 있습니다.

사용하는 경우

  • ✓이미지나 링크의 기본 모습을 바꾸고 싶을 때.
  • ✓「생각」 블록처럼 새로운 종류의 블록을 만들 때.
  • ✓맞춤 요소를 사이트나 앱의 특정 부분에서만 작동하게 해야 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-custom-components/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-custom-components/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“코드 블록의 배경색을 다르게 보이게 하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

표시를 바꾸고 싶은 요소와 그 표시 방법을 도구에 알려 줍니다. 도구는 이 지시를 사용해 텍스트를 렌더링하며, 기본 규칙 대신 맞춤 설정을 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Markstream Custom Components

Overview

Customize specific Markstream nodes or trusted custom tags without replacing the parser or leaking global renderer state. Read references/patterns.md first.

When to Use

Use to replace built-ins such as image, link, code_block, mermaid, or inline_code; render trusted tags such as thinking; or scope overrides to one renderer or app. Use parser transforms only when token or AST reshaping is required.

Workflow

Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.

  1. Classify the change as a built-in override, trusted tag, or parser transform.
  2. Prefer scoped mappings. Vue, Vue 2, Svelte, and Angular can use setCustomComponents(customId, mapping); Svelte and Angular can also pass renderer-local maps.
  3. In React, prefer streamingComponents for parser-backed nodes and htmlComponents for sanitized attributes plus children.
  4. Start with leaf nodes before containers that must preserve children.
  5. For trusted tag bodies containing Markdown, use a nested renderer with the same allowlist. Do not add a second smooth-streaming loop.
  6. Preserve node/loading props, identity keys, scope IDs, theme state, and preview-height estimates for async diagrams.
  7. Remove temporary scoped registrations on cleanup and validate repeated and nested tags.

Example

import MarkdownRender, {
  type NodeComponentProps,
  setCustomComponents,
} from 'markstream-react'
import 'markstream-react/index.css'

function ThinkingNode({ node }: NodeComponentProps<any>) {
  return <details><summary>Thinking</summary>{node.content}</details>
}

setCustomComponents('assistant-panel', { thinking: ThinkingNode })

export function Answer({ markdown }: { markdown: string }) {
  return (
    <MarkdownRender
      content={markdown}
      customId="assistant-panel"
      customHtmlTags={['thinking']}
      htmlPolicy="safe"
    />
  )
}

Limitations

  • Component overrides cannot reproduce arbitrary remark/rehype transforms.
  • Container overrides require careful child rendering and accessibility review.
  • Framework registration APIs are not interchangeable.

Security & Safety Notes

Treat custom HTML-like tags as trusted input only. Keep safe HTML enabled and do not pass unsanitized attributes into host components.

자주 묻는 질문

무엇이든 바꿀 수 있나요?

이미지나 링크 같은 표준 요소를 바꾸거나 신뢰할 수 있는 새 요소를 추가할 수 있습니다. 다만 복잡한 서식 변환을 모두 다시 구성할 수는 없습니다.

맞춤 요소를 사용해도 안전한가요?

네, 이 요소들을 신뢰할 수 있는 것으로 다루고 검증되지 않은 정보를 넣지 않는다면 안전합니다. 보안 설정을 켜 두는 것이 중요합니다.

Vue, React 등 다른 웹 기술에서는 어떻게 작동하나요?

도구는 각 기술에 맞게 이런 맞춤 설정을 구성하는 방법을 제공해, 각 환경에서 올바르게 작동하도록 합니다.

상세 정보

작성자의 원본 설명

Override Markstream node renderers and add trusted custom tags across Vue, React, Svelte, and Angular using scoped or renderer-local mappings.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5168
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬