straylight-script
Write Haskell scripts using Straylight.Script instead of bash.
Skill by justinfleek
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/justinfleek-straylight-script
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/straylight-script
What's inside
- Skill name
straylight-script- Description
- Write Haskell scripts using Straylight.Script instead of bash. Use when writing scripts, shell automation, bash replacement, command-line tools, or when the user mentions bash, shell, scripts, or command-line operations.
- License
- MIT
- Compatibility
- opencode
- Instructions
- 235 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Straylight Script - Typed Unix
Write Haskell scripts using Straylight.Script instead of bash.
## Core Principle
**ALL scripts in Haskell. ZERO bash logic.**
If it has a branch, it's not bash. Rewrite in Haskell.
## Directory Structure
```
nix/scripts/
├── Straylight/
│ ├── Script.hs # Main prelude (1193 lines)
│ ├── Nix.hs # WASM plugin interface
│ ├── Config/ # Dhall type definitions
│ │ ├── Base.dhall # StorePath, MemMiB, CpuCount
│ │ ├── Firecracker.dhall # VM config schema
│ │ └── NvidiaSdk.dhall # NVIDIA extraction config
│ └── Script/
│ ├── Config.hs # FromDhall instances
│ ├── Clap.hs # Parser for clap-based CLI tools
│ ├── Getopt.hs # Parser for GNU getopt_long tools
│ ├── Oci.hs # OCI container operations
│ ├── Vm.hs # VM rootfs construction
│ ├── Vfio.hs # GPU passthrough (VFIO/IOMMU)
│ └── Tools/ # 24 tool wrappers
│ ├── Rg.hs, Bwrap.hs, Crane.hs, Jq.hs, ...
├── nvidia-extract.hs # NVIDIA SDK extraction
├── oci-gpu.hs # GPU container runner
├── fc-run.hs # Firecracker runner
└── vfio-bind.hs # GPU passthrough
```
## Writing a New Script
### Step 1: Create the Script
```haskell
-- nix/scripts/my-tool.hs
{-# LANGUAGE OverloadedStrings #-}
import Straylight.Script
import System.Environment (getArgs)
main :: IO ()
main = do
args <- getArgs
case args of
[arg1, arg2] -> script $ doThing (pack arg1) (pack arg2)
_ -> script $ do
echoErr "Usage: my-tool <arg1> <arg2>"
exit 1
doThing :: Text -> Text -> Sh ()
doThing x y = do
echoErr $ ":: Processing " <> x
output <- run "echo" [x, y]
echo output
```
### Step 2: Register in script.nix
```nix
compiled = {
my-tool = mkCompiledScript {
name = "my-tool";
deps = [ final.jq final.crane ];
};
};
```
### Step 3: Run It
```bash
# Compiled (production)
nix run .#straylight.script.compiled.my-tool -- arg1 arg2
# Interpreted (development)
nix run .#straylight.script.shell
runghc -i. my-tool.hs arg1 arg2
```
## API Reference
### Running Scripts
```haskell
script :: Sh a -> IO a -- Silent, errors on failure
scriptV :: Sh a -> IO a -- Verbose (shows commands)
scriptDebug :: Sh a -> IO a -- Very verbose
```
### Running Commands
```haskell
run :: FilePath -> [Text] -> Sh Text -- Capture stdout
run_ :: FilePath -> [Text] -> Sh () -- Ignore stdout
bash :: Text -> Sh Text -- Run bash -c "..."
which :: FilePath -> Sh (Maybe FilePath)
```
### Output
```haskell
echo :: Text -> Sh () -- Print to stdout
echoErr :: Text -> Sh () -- Print to stderr (USE THIS)
die :: Text -> Sh a -- Print error and exit
exit :: Int -> Sh ()
```
### Filesystem
```haskell
ls, cp, mv, rm, mkdir, mkdirP
pwd, cd, home, withTmpDir
test_f, test_d, test_e -- Existence tests
symlink, readlink, canonicalize
```
### Text (Data.Text)From justinfleek/ComfyUI-Lattice-Compositor, MIT.
More from justinfleek/ComfyUI-Lattice-Compositor
- 0.409score
safe-refactoring
justinfleek
Safely refactor code without breaking functionality.
SkillDFreshness: DClaude Code +9 - 0.409score
expert-researcher
justinfleek
Transform into a methodical research assistant that gathers evidence, evaluates sources, and synthesizes findings.
SkillDFreshness: DClaude Code +9 - 0.409score
type-cleanup
justinfleek
Fix type issues by updating type definitions to match code, not vice versa.
SkillDFreshness: DClaude Code +9 - 0.406score
exploratory-architect
justinfleek
Optimized for architecture design, algorithm optimization, and complex problem-solving with deep reasoning.
SkillDFreshness: DClaude Code +9 - 0.406score
creative-coder
justinfleek
Specializes in creative, unconventional, off-the-wall solutions using experimental approaches and novel language features
SkillDFreshness: DClaude Code +9 - 0.406score
feature-analyzer
justinfleek
Deep analysis of external codebases to extract features, compare against Lattice capabilities, identify gaps, and propose integration strategies.
SkillDFreshness: DClaude Code +9 - 0.406score
council
justinfleek
Summon a panel of three world-class experts with complementary perspectives to analyze complex questions through structured dialogue and forced consensus.
SkillDFreshness: DClaude Code +9 - 0.405score
thorough-reading
justinfleek
Read entire files completely before modification.
SkillDFreshness: DClaude Code +9 - 0.405score
verification
justinfleek
Verify fixes and changes with evidence-based testing.
SkillDFreshness: DClaude Code +9 - 0.403score
deterministic-coder
justinfleek
Optimized for bug fixes, spec implementations, refactoring, and routine development with precise, consistent execution - STRAYLIGHT-CORE CONFORMANT
SkillDFreshness: DClaude Code +9 - 0.380score
testing-methodology
justinfleek
Write comprehensive tests using property tests, unit tests, integration tests, and regression tests.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 7, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from justinfleek
- 0.409score
safe-refactoring
justinfleek
Safely refactor code without breaking functionality.
SkillDFreshness: DClaude Code +9 - 0.409score
expert-researcher
justinfleek
Transform into a methodical research assistant that gathers evidence, evaluates sources, and synthesizes findings.
SkillDFreshness: DClaude Code +9 - 0.409score
type-cleanup
justinfleek
Fix type issues by updating type definitions to match code, not vice versa.
SkillDFreshness: DClaude Code +9 - 0.406score
exploratory-architect
justinfleek
Optimized for architecture design, algorithm optimization, and complex problem-solving with deep reasoning.
SkillDFreshness: DClaude Code +9 - 0.406score
creative-coder
justinfleek
Specializes in creative, unconventional, off-the-wall solutions using experimental approaches and novel language features
SkillDFreshness: DClaude Code +9 - 0.406score
feature-analyzer
justinfleek
Deep analysis of external codebases to extract features, compare against Lattice capabilities, identify gaps, and propose integration strategies.
SkillDFreshness: DClaude Code +9
Cite this page
straylight-script skill. Agent Mart. https://agentmart.dev/skills/justinfleek-straylight-script (last updated 2026-10-24)