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 पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
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.
- Classify the change as a built-in override, trusted tag, or parser transform.
- Prefer scoped mappings. Vue, Vue 2, Svelte, and Angular can use
setCustomComponents(customId, mapping); Svelte and Angular can also pass renderer-local maps. - In React, prefer
streamingComponentsfor parser-backed nodes andhtmlComponentsfor sanitized attributes plus children. - Start with leaf nodes before containers that must preserve children.
- For trusted tag bodies containing Markdown, use a nested renderer with the same allowlist. Do not add a second smooth-streaming loop.
- Preserve node/loading props, identity keys, scope IDs, theme state, and preview-height estimates for async diagrams.
- 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.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5168
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।