Use when the user requests integration testing, feature validation, or test plan execution
中文简介正在准备中。当前显示原文说明。
Build-less ESM frontends that run directly in the browser without bundlers. Use this skill when creating static frontends, SPAs without build tools, prototypes, or when the user explicitly wants no Vite/Webpack/bundler. Covers import maps, CDN imports, cache-busting, hash routing, and performance patterns.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Create frontends that run directly in the browser using ES modules—no bundler, no build step.
Copy from assets/starter/ for a working baseline:
index.html — import map + module entryapp.js — Preact + signals + hash routingindex.css — CSS variables, dark modeRun locally:
npx serve assets/starter # or python3 -m http.server 3000
Use <script type="importmap"> to:
preact) to CDN URLs@utils/) to local folders?v=<version> for cache-busting<script type="importmap">
{
"imports": {
"preact": "https://cdn.jsdelivr.net/npm/preact@10.24.3/dist/preact.module.js",
"@utils/": "./utils/",
"./app.js": "./app.js?v=1.0.0"
}
}
</script>
Generate this map dynamically (server middleware) or commit a static version.
Import third-party ESM directly from CDN. Pin versions:
import { signal } from 'https://cdn.jsdelivr.net/npm/@preact/signals@1.3.0/dist/signals.module.js';
Prefer mapping through import map to keep source clean:
import { signal } from '@preact/signals'; // resolved via import map
Two approaches:
A) Versioned URLs (recommended):
?v=<git-sha|version|timestamp> to local .js and .cssCache-Control: immutable headersB) ETag/Last-Modified:
For dynamic injection, rewrite index.html at serve time. For static hosting, commit versioned URLs manually.
If served under a subpath (e.g., /app), use <base>:
<base href="/app/">
Ensures relative imports resolve correctly.
Minimal:
frontend/
index.html
index.css
app.js
Growing app:
frontend/
index.html
index.css
app.js # entry + router
state.js # signals/atoms
api.js # fetch helpers
components/
nav.js
pages/
home.js
settings.js
Inject environment variables via global window.ENV (no build replacement).
index.html:
<script src="/config.js"></script>
<script type="module" src="./app.js"></script>
config.js:
window.ENV = {
API_URL: "https://api.example.com"
};
Exclude config.js from caching or generate at runtime.
Hash-based routing (no server config needed):
const route = signal(location.hash.slice(1) || '/');
window.addEventListener('hashchange', () => {
route.value = location.hash.slice(1) || '/';
});
// Links: <a href="#/about">About</a>
// Read: route.value === '/about'
For history API routing, the server must serve index.html for all routes.
Load features on demand:
button.onclick = async () => {
const { heavyFeature } = await import('./heavy.js');
heavyFeature();
};
Rule: if not needed for first paint, load lazily.
Wrap dynamic imports:
async function loadPage(name) {
try {
return await import(`./pages/${name}.js`);
} catch (e) {
console.error(`Failed to load ${name}:`, e);
return { default: () => html`<p>Failed to load page.</p>` };
}
}
Use JSDoc + jsconfig.json for full type checking without TypeScript build step.
jsconfig.json:
{ "compilerOptions": { "checkJs": true, "module": "ESNext" } }
Code usage:
/** @type {import('./types.js').User} */
const user = await api.getUser();
Startup:
<script type="module"> entry<link rel="modulepreload" href="..."> for critical deps (fixes waterfall)Rendering (with framework):
Rendering (vanilla DOM):
CSS:
Content Security Policy (CSP): Strict CSP blocks inline scripts. For inline import maps, use:
<script type="importmap" nonce="..."> (recommended)'sha256-...' of the script contentAllow CDNs in script-src:
Content-Security-Policy: script-src 'self' 'nonce-...' https://cdn.jsdelivr.net;
When asked to create a build-less frontend:
index.html, index.css, entry JStype="module" everywhere.js extension (./utils.js)<base> → broken imports on subpathimport()After generating:
npx serve or python3 -m http.server).js loads as type="module"?v=... in URLs还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Use when the user requests integration testing, feature validation, or test plan execution
中文简介正在准备中。当前显示原文说明。
Use when the user wants to systematically fix AI code slop — duplicated logic, over-engineering, silent error swallowing, convention drift, cargo-cult patterns, and other LLM-introduced architectural decay — over a specified duration
中文简介正在准备中。当前显示原文说明。
Produce a researched long-form article from a topic prompt via an orchestrated pipeline - research agent (first-person sources, working-definition gate), narrative-architecture outline, writer/cold-reviewer loop with an explicit ACCEPT/REVISE verdict contract, then a catalog-deslop pass with a regression gate. The orchestrator dispatches subagents only; the writer never judges its own draft. Use when the user says "article factory", "write an article about X", "run the article pipeline", or asks for a researched long-form piece produced end-to-end. For essays and micro posts in the user's own voice without a research stage, use the prose skill instead.
中文简介正在准备中。当前显示原文说明。
Runs autonomous keep/discard experiments on a codebase to optimize a single metric for a fixed duration, in the style of karpathy/autoresearch. Use when the user says "autoresearch" (optionally with a focus, e.g. "autoresearch the optimizer"), asks to run experiments on a repo overnight, to hill-climb or optimize a metric autonomously, or points at a repo with a karpathy-style program.md.
中文简介正在准备中。当前显示原文说明。
Create custom modules for [Harbor Boost](https://github.com/av/harbor/tree/main/boost), an optimizing LLM proxy. Use when building Python modules that intercept/transform LLM chat completions—reasoning chains, prompt injection, structured outputs, artifacts, or custom workflows. Triggers on requests to create Boost modules, extend LLM behavior via proxy, or implement chat completion middleware.
中文简介正在准备中。当前显示原文说明。
Systematically explore and test any software project (CLI, API, Backend, Library, etc.) to find bugs, usability issues, and edge cases. Produces a structured report with full reproduction evidence (exact commands, inputs, logs, and tracebacks) for every issue.
中文简介正在准备中。当前显示原文说明。