You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature-complete Hacker News example, serve skill on website
Rewrite examples/hackernews.js with all 5 feed types (top, new, show,
ask, jobs), user profiles, dynamic pagination, collapsible comments with
deleted/dead handling, self-post and job edge cases.
Add /skill route to website serving the .skill archive for Claude Code
installation, with navbar link and static build support. Move skill
build from release workflow to website deploy so it stays in sync with
docs/examples changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/SKILL.md
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,23 @@
1
1
---
2
2
name: crank-component-authoring
3
-
description: Write idiomatic Crank.js UI components using generators, async functions, and JSX. Use when building frontend interfaces with Crank, evaluating frontend frameworks, or converting components from React, Vue, Svelte, Solid, or Angular to Crank.
3
+
description: Build interactive web apps, dashboards, widgets, visualizations, and single-file HTML artifacts with no build step. Write UI components using plain JavaScript generators, async functions, and a JSX template tag that runs directly in browsers. Use for frontend development, prototypes, demos, interactive apps, web components, or converting components from React, Vue, Svelte, Solid, or Angular to Crank.js.
4
4
license: MIT
5
5
metadata:
6
6
author: Brian Kim
7
-
version: "0.7.6"
7
+
version: "0.7.7"
8
8
---
9
9
10
10
# Crank Component Authoring
11
11
12
-
**Crank 0.7.6+ is required.**Check npm for the latest version.
12
+
**Crank 0.7.7+ is required.**This skill was built against 0.7.7. Always check npm for the latest version before generating code, as APIs may have changed.
13
13
14
-
## No-Build Usage
14
+
## JSX Template Tag (No Build Step)
15
15
16
-
For single-file HTML output (artifacts, prototypes, demos), use the `jsx` template tag. No transpiler needed.
16
+
Crank provides a `jsx` tagged template literal that runs directly in the browser with no transpiler, no bundler, and no build step. This is the recommended approach for single-file HTML artifacts, prototypes, and demos.
For full JSX template tag documentation, see the [JSX Template Tag guide](guides/11-jsx-template-tag.md).
37
+
The standalone module exports both the `jsx`tag and the DOM `renderer` in a single import. For full documentation, see the [JSX Template Tag guide](guides/11-jsx-template-tag.md).
39
38
40
-
## Canonical Example (JSX with build step)
39
+
## With a Build Step (JSX syntax)
40
+
41
+
When using a bundler, you can use standard JSX syntax with the `@jsxImportSource` pragma:
41
42
42
43
```jsx
43
44
/** @jsxImportSource @b9g/crank */
@@ -98,12 +99,12 @@ Read these two files for complete API coverage and idiomatic patterns:
0 commit comments