Best for
- Use when reviewing or hardening JS modules.
artalis-io/hull/.claude/skills/js-audit/SKILL.md
Audit JavaScript stdlib code for security, correctness, and sandbox safety. Use when reviewing or hardening JS modules.
Decision brief
Perform comprehensive security, correctness, and quality audits on Hull JavaScript stdlib code.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/artalis-io/hull --skill ".claude/skills/js-audit"Inspect the Agent Skill "js-audit" from https://github.com/artalis-io/hull/blob/9d96662f3cb2055f1ed3c1e85de2d7fdca2cfc4a/.claude/skills/js-audit/SKILL.md at commit 9d96662f3cb2055f1ed3c1e85de2d7fdca2cfc4a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Review the “Usage” section in the pinned source before continuing.
When /js-audit is invoked:
Hull JS code runs inside a sandboxed QuickJS (ES2023) interpreter: - Removed globals: eval() disabled at C level - Not loaded: std, os modules - Memory limit: 64 MB (JSSetMemoryLimit) - Stack limit: 1 MB (JSSetMaxStackSize) - Gas metering: Instruction-count interrupt handler - M…
Hull-specific: The template engine's template.compile() uses JSEval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.
Hull-specific: The template engine's template.compile() uses JSEval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 17 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Perform comprehensive security, correctness, and quality audits on Hull JavaScript stdlib code.
Target: $ARGUMENTS (default: all stdlib/js/hull/*.js files)
/js-audit # Audit all JS stdlib modules
/js-audit stdlib/js/hull/template.js # Audit a specific module
/js-audit --fix # Audit and apply fixes
Hull JS code runs inside a sandboxed QuickJS (ES2023) interpreter:
eval() disabled at C levelstd, os modulesJS_SetMemoryLimit)JS_SetMaxStackSize)hull:* modules available via importdb, crypto, time, env, fs, http — accessed through hull module imports| Issue | Pattern to Find | Severity |
|---|---|---|
| Sandbox escape | Use of eval(), Function() constructor, new Function() | Critical |
| Unsafe eval | String-to-code conversion outside C bridge _template.compile() | Critical |
| Module smuggling | import of non-hull modules | Critical |
| Global pollution | Writing to globalThis or undeclared variables (non-strict) | High |
| Prototype pollution | Modifying Object.prototype, Array.prototype, etc. | Critical |
| Symbol abuse | Using Symbol.toPrimitive or Symbol.hasInstance to bypass checks | Medium |
| Proxy trap abuse | Using Proxy objects to intercept capability calls | High |
Hull-specific: The template engine's _template.compile() uses JS_Eval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.
| Issue | Pattern to Find | Severity |
|---|---|---|
| SQL injection | String concatenation/template literals in SQL queries | Critical |
| XSS via template | Unescaped user data in template output | High |
| Path traversal | Unsanitized paths passed to fs.* | High |
| Header injection | \r\n in HTTP header values | High |
| Command injection | User input in tool.spawn() arguments | Critical |
| Timing attack | Non-constant-time string comparison of secrets/tokens | High |
| ReDoS | Unbounded regex on user input | Medium |
SQL safety check:
// BAD: template literal interpolation
db.query(`SELECT * FROM users WHERE id = ${id}`);
// BAD: string concatenation
db.query("SELECT * FROM users WHERE id = " + id);
// GOOD: parameterized
db.query("SELECT * FROM users WHERE id = ?", [id]);
Template safety check:
// BAD: raw output of user data
template.renderString("{{{ user_input }}}", data);
// GOOD: auto-escaped output
template.renderString("{{ user_input }}", data);
| Issue | Pattern to Find | Severity |
|---|---|---|
| Unchecked null/undefined | Property access on potentially null value | High |
| Swallowed exceptions | try/catch that discards error | Medium |
| Missing error propagation | Error condition not thrown or returned | Medium |
Bare throw | Throwing non-Error objects (strings, numbers) | Low |
| Unhandled promise rejection | Async operations without .catch() or try/catch | Medium |
| Missing return after error | Function continues after error condition | High |
Patterns to check:
// BAD: unchecked
const result = db.query("SELECT * FROM users WHERE id = ?", [id]);
const name = result[0].name; // crashes if result is empty
// GOOD: null-safe
const result = db.query("SELECT * FROM users WHERE id = ?", [id]);
if (!result || result.length === 0) return null;
const name = result[0].name;
| Issue | Pattern to Find | Severity |
|---|---|---|
| Missing type checks | Function params not validated with typeof | Medium |
| Loose equality | Using == instead of === | Medium |
| Null vs undefined confusion | Not distinguishing null from undefined | Low |
| NaN propagation | Arithmetic on non-numbers without isNaN() check | Medium |
| Implicit coercion | + operator on mixed types (string + number) | Medium |
| Array method on non-array | .map(), .filter() on potentially non-array values | Medium |
JS-specific pitfalls:
// BAD: loose equality
if (value == null) // matches both null and undefined
// GOOD: explicit
if (value === null || value === undefined)
// BAD: implicit coercion
const total = count + "items" // "5items" not "5 items"
// GOOD: explicit
const total = `${count} items`
| Issue | Pattern to Find | Severity |
|---|---|---|
| Unbounded Map/Set growth | Collections that grow without limit | High |
| Missing cache eviction | Caches without TTL or size limit | Medium |
| Closure leaks | Closures capturing large objects unnecessarily | Medium |
| String concatenation in loops | s += chunk in tight loops | Medium |
| Large intermediate arrays | Building arrays that could exceed memory limit | Medium |
| WeakRef/FinalizationRegistry | Not available in QuickJS — don't rely on them | Low |
Performance patterns:
// BAD: O(n^2) string building
let s = "";
for (const item of items) {
s += item; // copies entire string each iteration
}
// GOOD: array join
const parts = [];
for (const item of items) {
parts.push(item);
}
const s = parts.join("");
| Issue | Pattern to Find | Severity |
|---|---|---|
| Hardcoded secrets | Literal strings used as HMAC/JWT secrets | Critical |
| Weak secrets | Short or predictable secret values | High |
| Timing attacks | === comparison on HMAC digests or tokens | High |
| Missing expiry | Tokens/sessions without TTL | Medium |
| Insecure defaults | secure flag missing on cookies, httpOnly not set | Medium |
| Nonce reuse | Same nonce/IV used for multiple encryptions | Critical |
Constant-time comparison:
// BAD: early-exit comparison
if (token === expected) { ... }
// GOOD: use crypto.verifyPassword or HMAC-then-compare
// Hull's jwt.verify and csrf.verify use constant-time internally
| Issue | What to Check | Severity |
|---|---|---|
| Missing API | Function exists in Lua but not JS (or vice versa) | Medium |
| Different behavior | Same function returns different types or formats | High |
| Naming mismatch | API names don't follow convention (JS: camelCase, Lua: snake_case) | Low |
| Different defaults | Default option values differ between runtimes | Medium |
| Error format | Different error message formats | Low |
| Issue | Pattern to Find | Severity |
|---|---|---|
| Code injection in codegen | User data interpolated into generated JS source | Critical |
| Circular inheritance | {% extends %} chains without cycle detection | High |
| Unbounded recursion | Deeply nested includes without depth limit | High |
| Cache poisoning | Template cache key collision or manipulation | Medium |
| Filter bypass | Custom filter that returns unescaped HTML | Medium |
| Denial of service | Template that generates unbounded output | Medium |
| Prototype pollution in data | Template data object with __proto__ key | High |
| Issue | Pattern to Find | Severity |
|---|---|---|
| Missing ES2023 polyfills | Using APIs not supported by QuickJS | Medium |
| BigInt overflow | BigInt operations without bounds | Low |
| ArrayBuffer detach | SharedArrayBuffer not available | Low |
| Module resolution | Dynamic import() not available | Medium |
| Generator memory | Unbounded generator/iterator state | Medium |
| Pattern | Issue | Fix |
|---|---|---|
Unreachable code after return/throw | Dead code | Remove |
Unused const/let variables | Dead variable | Remove |
| Unused function parameters | Dead parameter | Prefix with _ |
| Commented-out code blocks | Dead code | Remove |
Unused import bindings | Dead import | Remove |
Empty if/else/catch blocks | Dead branch | Remove |
When /js-audit is invoked:
Locate Files
stdlib/js/hull/*.js # All JS stdlib modules
examples/*/app.js # Example apps (reference patterns)
tests/fixtures/*/app.js # Test fixture apps
Scan for Critical Issues
eval(, Function(, new Function( — sandbox escapesdb.query(`...${` or db.query("..." + — SQL injection{{{ in template strings — raw output of user data=== comparison of secrets, tokens, hashesglobalThis. or globalThis[ — global pollution__proto__, constructor.prototype — prototype pollutionReview Each Module
Check Template Engine
& < > " 'Generate Report Format as markdown table with findings, severity, file:line, and suggested fix.
## JS Audit Report: Hull
**Date:** YYYY-MM-DD
**Files Scanned:** N
**Issues Found:** N (Critical: N, High: N, Medium: N, Low: N)
### Critical Issues
| # | File:Line | Issue | Current Code | Suggested Fix |
|---|-----------|-------|--------------|---------------|
| C1 | stdlib/js/hull/auth.js:42 | SQL injection | `` db.query(`...${id}`) `` | `db.query("...?", [id])` |
### High Issues
...
### Medium Issues
...
### Low Issues
...
### Recommendations
1. ...
When --fix is specified:
make)make test && make e2e-templates)Auto-fixable Issues:
== -> === (strict equality)_s += x in loops -> array.push + .join("") patternNOT Auto-fixable (require manual review):
Frequently asked questions
Perform comprehensive security, correctness, and quality audits on Hull JavaScript stdlib code.
The source record exposes this install command: npx skills add https://github.com/artalis-io/hull --skill ".claude/skills/js-audit". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
garrytan/gbrain
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing