agentleFS
itzcullitzcull/javascript-skills/skills/script-creator/SKILL.md

script-creator

Skill1 starsChanged 7 months agoMITView on GitHub

This skill should be used when the user asks to "create a script", "write a TypeScript script", "make a bun script", or wants to automate a task with a quick TypeScript utility. It guides script creation using Bun runtime with a solve-first-then-generalize philosophy.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. jehrhardt/agents★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create TypeScript scripts that solve user goals quickly and simply using the Bun runtime.

    line 10
  2. Distinctive:

    Solve the goal first: - Create a minimal, working solution

    line 14
  3. Distinctive:

    Then generalise: - Only after it works, offer CLI enhancements and improvements

    line 15
  4. Distinctive:

    Ask clarifying questions if the user's goal is ambiguous

    line 59
  5. Very specific:

    Check if package.json exists at project root

    line 64
  6. Very specific:

    If not, create minimal package.json with type: "module"

    line 65
  7. Very specific:

    Ensure global dependency exists: bun add -g commander

    line 67
  8. Very specific:

    Create ./scripts/ if it doesn't exist

    line 71
  9. Distinctive:

    Create the simplest script that solves the user's goal

    line 75
  10. Distinctive:

    Use a semantically meaningful kebab-case name

    line 76
  11. Distinctive:

    Ask if testing is required

    line 85
  12. Distinctive:

    Only after the solution works, offer to enhance with:

    line 89
  13. Distinctive:

    Use plain objects and arrays over class instances

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Create TypeScript scripts that solve user goals quickly and simply using the Bun runtime.

Philosophy

  1. Solve the goal first - Create a minimal, working solution
  2. Then generalise - Only after it works, offer CLI enhancements and improvements

Conventions

AspectConvention
Runtimebun
LanguageTypeScript (unless user specifies otherwise)
Output./scripts/ directory in current working directory
Single module./scripts/<semantic-name>.ts
Multi-module./scripts/<semantic-folder>/main.ts with supporting modules
Namingkebab-case for files and folders
Entry pointInclude shebang #!/usr/bin/env bun
Dependencieszod installed locally in project package.json
Global dependenciescommander installed globally via bun add -g commander
StylePrefer composition, simple but effective artefacts

Preferred Dependencies

  • commander - CLI argument parsing (install globally)
  • zod - Input validation and schema definition (install locally)

File Structure Examples

Single Module Script

./scripts/fetch-users.ts

Multi-Module Script

./scripts/data-processor/
├── main.ts          # Entry point with shebang
├── parser.ts        # Parsing logic
├── transformer.ts   # Data transformation
└── types.ts         # Shared types

Implementation Process

Step 1: Understand the Goal

  • Ask clarifying questions if the user's goal is ambiguous
  • Identify inputs, outputs, and core transformation

Step 2: Ensure Project Setup

  • Check if package.json exists at project root
  • If not, create minimal package.json with type: "module"
  • Install local dependencies: bun add zod
  • Ensure global dependency exists: bun add -g commander

Step 3: Create Scripts Directory

  • Create ./scripts/ if it doesn't exist

Step 4: Implement Minimal Solution

  • Create the simplest script that solves the user's goal
  • Use a semantically meaningful kebab-case name
  • Include shebang: #!/usr/bin/env bun
  • Focus on working code, not perfect code

Step 5: Explain Usage

  • Show the user how to run the script
  • Example: bun run ./scripts/<name>.ts
  • Or directly: ./scripts/<name>.ts (if executable)
  • Ask if testing is required

Step 6: Offer Generalisations

Only after the solution works, offer to enhance with:

  • CLI arguments (using commander) for flexibility
  • Input validation (using zod) for robustness
  • Configuration options
  • Better error messages
  • Splitting into modules if complexity warrants

Script Template

#!/usr/bin/env bun

// Minimal solution first
// [implementation]

CLI Enhancement Template (for generalisation phase)

#!/usr/bin/env bun

import { program } from "commander"
import { z } from "zod"

// Define input schema
const InputSchema = z.object({
  // fields
})

program
  .name("script-name")
  .description("What this script does")
  .argument("<required-arg>", "description")
  .option("-o, --option <value>", "description", "default")
  .action(async (arg, options) => {
    // Validate inputs
    const validated = InputSchema.parse({ /* ... */ })

    // Execute core logic
  })

program.parse()

Anti-Patterns to Avoid

  • Over-engineering before the solution works
  • Creating abstractions prematurely
  • Using classes when functions suffice
  • Adding features the user didn't ask for (until generalisation phase)
  • Complex inheritance hierarchies

Composition Patterns to Prefer

  • Small, focused functions that do one thing
  • Pipe data through transformations
  • Return new data rather than mutating
  • Use plain objects and arrays over class instances
  • Compose functions to build complex behaviour

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.