chore(agents): update skill metadata timestamps, source URLs, and documentation wording across dot_agents files

This commit is contained in:
Prad Nukala committed 2026-08-13 21:04:10 -04:00
1 parent 12155ad58c
commit c96c19c0f9
45 files changed
+1819 -1395

No files matched your search

@@ -4,12 +4,13 @@
How to serve browser scripts and styles from source. Read this when the task involves:
- Configuring `createAssetServer` (`basePath`, `fileMap`, `allow`, `deny`, fingerprinting, compiler options)
- Configuring `createAssetServer` (`basePath`, `fileMap`, `allowFiles`, `allowPackages`, `denyFiles`, fingerprinting, compiler options)
- Choosing between `staticFiles()` for already-built files and `createAssetServer()` for source assets that need import rewriting, preloads, or fingerprinted URLs
- Generating script URLs or `<link rel="modulepreload">` tags for a client entry
- Keeping server-only files out of the browser via `deny` rules
- Enabling browser HMR for source-served modules
- Keeping server-only files out of the browser via `denyFiles` rules
For routing the URL namespace itself, see `routing-and-controllers.md`. For client entry hydration, see `hydration-frames-navigation.md`.
For routing the URL namespace itself, see `routing-and-controllers.md`. For client entry hydration and browser update handling, see `hydration-frames-navigation.md`. For the Node HMR runner and browser HMR channel, see `middleware-and-server.md`.
## When To Reach For It
@@ -35,8 +36,9 @@ let assetServer = createAssetServer({
'app/*path': 'app/*path',
'node_modules/*path': 'node_modules/*path',
},
allow: ['app/assets/**', 'node_modules/**'],
deny: ['app/**/*.server.*'],
allowFiles: ['app/assets/**'],
allowPackages: ['remix'],
denyFiles: ['app/**/*.server.*'],
target: { es: '2020', chrome: '109', safari: '16.4' },
sourceMaps: process.env.NODE_ENV === 'development' ? 'external' : undefined,
minify: process.env.NODE_ENV === 'production',
@@ -58,8 +60,11 @@ export default createController(routes, {
## Rules
- Treat `allow` and `deny` as the security boundary for browser-reachable source files.
- Add a `deny` list for server-only modules such as `*.server.*`, private config, or other files that should never be exposed.
- Treat `allowFiles`/`allowPackages` and `denyFiles` as the security boundary for browser-reachable source files.
- Use `allowFiles` and `denyFiles` for file paths and globs. Relative values resolve from `rootDir`.
- Use `allowPackages` for exact package names, not globs or subpaths. Packages allowed by `allowPackages` also allow their installed `dependencies` and `optionalDependencies`; peer dependencies must be listed explicitly if they should be browser-reachable.
- `denyFiles` takes precedence over both file and package allow rules.
- Add `denyFiles` rules for server-only modules such as `*.server.*`, private config, or other files that should never be exposed.
- Set `rootDir` explicitly in monorepos so relative paths resolve from the intended project root.
- `basePath` is the public URL namespace handled by the asset server.
- `fileMap` keys are URL patterns relative to `basePath`, and values are root-relative file path patterns. They use `route-pattern` syntax on both sides.
@@ -86,6 +91,8 @@ In development:
- Keep `watch` enabled so source changes are picked up without restarting the server
- Prefer stable URLs with normal revalidation
- Enable source maps when debugging browser code
- Use `hmr` only when the app is running under `remix/node-hmr`
- Use `scripts.loaders` for development-only browser transforms such as `uiHmr()`
In deployment:
@@ -95,6 +102,38 @@ In deployment:
Fingerprinting assumes files on disk are stable and requires `watch: false`.
## Browser HMR
Use browser HMR when source-served browser modules should update without a full page reload during development. Let `remix/node-hmr` own the browser HMR channel so browser updates stay coordinated with server restarts.
```typescript
import { createAssetServer } from 'remix/assets'
import { uiHmr } from 'remix/ui-hmr/assets'
const isDevelopment = process.env.NODE_ENV === 'development'
const isHmr = Boolean(isDevelopment && process.env.REMIX_NODE_HMR)
const assetServer = createAssetServer({
basePath: '/assets',
fileMap: { '/app/*path': 'app/*path' },
allowFiles: ['app/assets/**'],
watch: isDevelopment,
hmr: isHmr
? async () => (await import('remix/node-hmr/runtime')).createBrowserHmrChannel()
: undefined,
scripts: {
loaders: isHmr ? [uiHmr()] : undefined,
},
})
```
Rules:
- Guard `remix/node-hmr/runtime` imports with `process.env.REMIX_NODE_HMR`; that runtime API is only available inside the supervised child process.
- Keep browser HMR and loaders development-only.
- Add `remix/assets/types/hmr` to `compilerOptions.types` only when browser source modules use `import.meta.hot` directly.
- Write HMR accept calls directly as `import.meta.hot.accept(...)` with literal dependency specifiers.
## Useful Compiler Options
- `minify` for production minification of scripts and styles
@@ -103,6 +142,7 @@ Fingerprinting assumes files on disk are stable and requires `watch: false`.
- `target` as an object for shared browser targets and script-only ECMAScript output, such as `{ es: '2020', chrome: '109', safari: '16.4' }`
- `scripts.define` to replace globals such as `process.env.NODE_ENV`
- `scripts.external` to leave specific script imports untouched
- `scripts.loaders` to transform browser modules during compilation
Do not nest shared compiler options under `scripts`. Use top-level `minify`, `sourceMaps`, `sourceMapSourcePaths`, and `target` so they apply to styles as well as scripts.