Skip to content
Skillv1.0.0

markstream-custom-components

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

by sickn33(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from sickn33/agentic-awesome-skills (skills/markstream-custom-components/SKILL.md). Install upstream with npx skills add sickn33/agentic-awesome-skills --skill markstream-custom-components. Copyright stays with the author (MIT).

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.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/sickn33-agentic-awesome-skills-markstream-custom-components/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

sickn33-agentic-awesome-skills-markstream-custom-components.ocm.jsonjson
{
  "ocm": "1",
  "id": "sickn33-agentic-awesome-skills-markstream-custom-components",
  "kind": "skill",
  "name": "markstream-custom-components",
  "description": "Override Markstream node renderers and add trusted custom tags across Vue, React, Svelte, and Angular using scoped or renderer-local mappings.",
  "publisher": "sickn33",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "markdown",
      "components",
      "vue",
      "react",
      "svelte",
      "angular",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Override Markstream node renderers and add trusted custom tags across Vue, React, Svelte, and Angular using scoped or renderer-local mappings."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/sickn33/agentic-awesome-skills",
      "path": "skills/markstream-custom-components/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/sickn33/agentic-awesome-skills/blob/HEAD/skills/markstream-custom-components/SKILL.md",
      "key": "sickn33/agentic-awesome-skills/skills/markstream-custom-components/SKILL.md"
    },
    "license": "MIT"
  },
  "instructions": "# Markstream Custom Components\n\n## Overview\n\nCustomize specific Markstream nodes or trusted custom tags without replacing the parser or leaking global renderer state. Read [references/patterns.md](references/patterns.md) first.\n\n## When to Use\n\nUse 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.\n\n## Workflow\n\nBefore changing dependencies or source files, inspect the existing package manager and project co",
  "cost": {
    "context_tokens": 610
  }
}

Fetch it by URL: GET /api/v1/registry/sickn33-agentic-awesome-skills-markstream-custom-components/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.

markstream-custom-components - Skill - OpenSmartRoute