agentsclimarketplace

Jsx md

Skill theseus-run/theseus/packages/jsx-md/skills/jsx-md

the harness rebuilds itself — agents rewrite agents, skills replace skills.

Install
npx -y skills add theseus-run/theseus --skill jsx-md

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Write agent instructions, SKILL.md files, and LLM prompts as typed JSX/TSX components using @theseus.run/jsx-md. Use when creating or editing .tsx files that render Markdown strings via render(), authoring jsx-md components, or working with the jsx-md primitives, Context API, or XML intrinsics.

SKILL.md

4.8 KB, as published. Nobody here has run it

@theseus.run/jsx-md

JSX runtime that outputs Markdown strings. No React, no virtual DOM. render() is synchronous and returns a plain string. Same input → same string every time.

Setup

tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@theseus.run/jsx-md"
  }
}

Import:

import { render, H1, H2, P, Ul, Li, Bold, Code } from "@theseus.run/jsx-md"

Authoring rules

1. Prefer components over inline markdown syntax.

// WRONG
<P>**bold** and `code`</P>

// CORRECT
<P><Bold>bold</Bold> and <Code>code</Code></P>

2. Bare JSX text for plain prose. {'...'} only when the string contains a character JSX cannot represent as bare text.

Characters requiring {'...'}: ` { } < > '

Characters safe as bare text: letters, spaces, digits, . , : ; ! ? — – - ( ) [ ] " & * + = | / \

// WRONG — unnecessary wrapper
<Li><Bold>P1</Bold>{': Guard clauses over nesting.'}</Li>

// CORRECT — bare text
<Li><Bold>P1</Bold>: Guard clauses over nesting.</Li>

// CORRECT — must wrap, contains single quote
<Li><Bold>P1</Bold>{": Dead code: delete, don't comment out."}</Li>

// CORRECT — must wrap, contains backtick
<P>{'Format: `ROI≈X.X`'}</P>

3. Md is an escape hatch only. Legitimate use: 4+ mixed inline spans where decomposition adds noise. Never use Md for content that decomposes cleanly into components.

// Legitimate — 6 code spans mixed with bold
<Li><Md>{'**P0**: Type = `TKey`. Not `TFuncKey`, `string`, or `<Trans>`.'}</Md></Li>

// Not legitimate — decompose instead
<Li><Md>{'**P1**: Guard clauses over nesting.'}</Md></Li>
// → <Li><Bold>P1</Bold>: Guard clauses over nesting.</Li>

Primitives

Full table with output shapes: references/primitives.md.

CategoryComponents
BlockH1H6, P, Hr, Codeblock, Blockquote
ListUl, Ol, Li, TaskList, Task
TableTable, Tr, Th, Td
InlineBold, Code, Italic, Strikethrough, Br, Sup, Sub, Kbd, Link, Img
EscapeEscape (component), escapeMarkdown (function)
RawMd
OtherHtmlComment, Details, Callout

Key props:

  • Codeblocklang?: string, indent?: number
  • Taskdone?: boolean (- [x] when true, - [ ] when false/omitted)
  • Thalign?: 'left' | 'center' | 'right'
  • Callouttype: 'note' | 'tip' | 'important' | 'warning' | 'caution' (required)
  • Detailssummary: string (required)
  • Linkhref: string (required)
  • Imgsrc: string, alt?: string

Nesting: Ul/Ol inside Li is fully supported. DepthContext tracks depth and computes indentation automatically — never count spaces manually.

Context API

Same shape as React — createContext, useContext, Context.Provider. Synchronous only. Not safe for concurrent render() calls in the same process.

import { render, createContext, useContext, Ul, Li, Code } from "@theseus.run/jsx-md"

const HarnessCtx = createContext<'opencode' | 'copilot'>('copilot')

const StepsSection = () => {
  const harness = useContext(HarnessCtx)
  return (
    <Ul>
      <Li>Always verify output before claiming done.</Li>
      {harness === 'opencode' && <Li>Use <Code>task()</Code> for multi-step subtasks.</Li>}
    </Ul>
  )
}

const prompt = render(
  <HarnessCtx.Provider value="opencode">
    <StepsSection />
  </HarnessCtx.Provider>
)

useContext returns the default when called outside a Provider. Providers nest — innermost wins.

XML intrinsics

Any lowercase JSX tag renders as an XML block. No imports, no registration. Use for Anthropic-style prompt structure (<instructions>, <context>, <examples>).

const ReviewerPrompt = ({ repo, examples }: Props) => (
  <>
    <context>
      <P>Repository: {repo}. Language: TypeScript.</P>
    </context>
    <instructions>
      <H2>Role</H2>
      <P>You are a precise code reviewer.</P>
    </instructions>
    {examples.length > 0 && (
      <examples>
        {examples.map((ex, i) => (
          <example index={i + 1}>
            <Md>{ex}</Md>
          </example>
        ))}
      </examples>
    )}
  </>
)

Attribute serialization:

  • index={1}index="1"
  • active={true}active (bare attribute)
  • active={false} / active={null} / active={undefined} → omitted
  • Empty content → self-closing: <tag />
  • Object value → throws — use JSON.stringify() to convert first

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.