मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)48k · #5168

markstream-custom-components

यह क्या करती है

यह टूल आपको formatted text दस्तावेज़ (जैसे article या post) में कुछ elements कैसे दिखें, यह customize करने देता है। आप images, links या code blocks का look बदल सकते हैं, या अपने खास elements जोड़ सकते हैं।

कब इस्तेमाल करें

  • ✓जब आप images या links का default look बदलना चाहते हैं।
  • ✓एक नए तरह का block बनाने के लिए, जैसे 'thinking' block।
  • ✓जब ये custom elements आपकी site या app के किसी खास हिस्से में ही काम करें, ऐसी ज़रूरत हो।

Skill का लिंक

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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-custom-components/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं code blocks का background color अलग कैसे कर सकता हूँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

आप टूल को बताते हैं कि कौन से elements बदलने हैं और वे कैसे दिखने चाहिए। फिर टूल उन निर्देशों के हिसाब से text render करता है, और डिफ़ॉल्ट नियमों की जगह आपके customizations लागू करता है।

तकनीकी सामग्री (मूल 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.

अक्सर पूछे जाने वाले सवाल

क्या मैं कुछ भी बदल सकता हूँ?

आप images और links जैसे standard elements बदल सकते हैं, या नए भरोसेमंद elements जोड़ सकते हैं। लेकिन सभी जटिल formatting transformations को दोबारा नहीं लिखा जा सकता।

क्या custom elements इस्तेमाल करना सुरक्षित है?

हाँ, बशर्ते आप इन elements को भरोसेमंद मानें और उनमें बिना जाँची हुई जानकारी न डालें। security settings चालू रखना ज़रूरी है।

यह अलग-अलग web technologies (Vue, React आदि) के साथ कैसे काम करता है?

टूल हर technology के लिए इन customizations को सेट करने के खास तरीके देता है, ताकि वे हर वातावरण में सही से काम करें।

जानकारी

लेखक का मूल विवरण

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
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills