Logo: Create New Bun Package Repo

Create New Bun Package Repo

Organisatioun
zenobi-us
create-new-bun-package-repo

Use when creating new Bun packages from zenobi-us/bun-module template - automates repo creation, cloning, and setup using GitHub CLI; note setup.sh runs non-interactively with defaults requiring manual package.json updates

Iwwersiicht

Editeurzenobi-us
Repositorydotfiles
Skill-Nummcreate-new-bun-package-repo
Stären
67
Forks
6
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    zenobi-us huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Create New Bun Package Repo an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/zenobi-us/dotfiles/tree/master/files/devtools/agent/bundles/developer/skills/devtools/create-new-bun-package-repo
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zenobi-us/dotfiles.git /tmp/dotfiles
mkdir -p .claude/skills
cp -r /tmp/dotfiles/files/devtools/agent/bundles/developer/skills/devtools/create-new-bun-package-repo .claude/skills/create-new-bun-package-repo
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Create New Bun Package Repo an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Create New Bun Package Repo automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Create New Bun Package Repo net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Create New Bun Package Repository

Expert guide for creating new Bun packages from the zenobi-us/bun-module template repository. Automates repository creation, cloning, and setup using GitHub CLI. Important: Setup runs with defaults (not interactive prompts).

Overview

This skill provides a complete workflow for bootstrapping new Bun packages using the bun-module template. The template includes TypeScript configuration, testing setup, and standardized module structure. The workflow handles repository creation via GitHub CLI, cloning, and running the setup script which applies defaults automatically.

When to Use

Use when:

  • Creating a new Bun TypeScript package or library
  • Starting a new Bun module project
  • Need consistent package structure across projects
  • Want automated GitHub repo setup with Bun template

Don't use for:

  • Non-Bun projects (use appropriate template)
  • Existing repositories (template is for new projects)
  • Projects not requiring TypeScript or testing infrastructure

Important Limitation: Setup script runs non-interactively - you must manually edit package.json after creation to set correct name, description, and author details.

Quick Reference

StepCommandPurpose
1. Create repogh repo create OWNER/NAME --template zenobi-us/bun-module --public --cloneCreate from template
2. Navigatecd NAMEEnter repo directory
3. Setupbash setup.shRun interactive setup

Complete Workflow

Prerequisites Check

Before starting, verify:

bash
# GitHub CLI installed and authenticated
gh auth status

# Bun installed (required for setup.sh)
bun --version

Step-by-Step Process

1. Gather Information

Ask the user for:

  • Owner: GitHub username or organization (e.g., zenobi-us)
  • Repo name: New repository name (e.g., my-awesome-module)
  • Visibility: Public or private (default: public)

2. Create Repository from Template

bash
# Public repository (recommended for open source)
gh repo create OWNER/REPO-NAME \
  --template zenobi-us/bun-module \
  --public \
  --clone

# Private repository (if needed)
gh repo create OWNER/REPO-NAME \
  --template zenobi-us/bun-module \
  --private \
  --clone

The --clone flag automatically clones after creation.

3. Navigate to Repository

bash
cd REPO-NAME

4. Run Setup Script

bash
bash setup.sh

The setup script will:

  • Apply template files to current directory
  • Replace template variables with defaults
  • Remove old git history and template files
  • Initialize fresh git repository
  • Create initial commit
  • Attempt to push to remote (may fail if repo just created)

Note: The script runs non-interactively and uses these defaults:

  • Package name: my-bun-package
  • Description: A Bun package
  • Author: Your Name <you@example.com>
  • Repository URL: Detected from git remote (usually correct)

You must manually edit package.json after setup to correct these values.

5. Update package.json Manually

The setup script uses defaults, so you must edit package.json:

bash
# Edit package.json - update these fields:
# - name: Change from "my-bun-package" to your actual name
# - description: Update to your package's description
# - author.name: Your actual name
# - author.email: Your actual email

6. Trust mise Configuration

bash
# Required before running mise tasks
mise trust

7. Install Dependencies and Build

bash
# Install dependencies
bun install

# Build the package
mise run build

# Verify build succeeded
ls -la dist/

8. Commit Updates

bash
# Stage package.json changes
git add package.json

# Commit your customizations
git commit -m "chore: update package metadata"

# Push to remote
git push -u origin main

Command Options

GitHub CLI Repository Creation

bash
gh repo create [<owner>/]<name> [flags]

Key flags:

  • --template OWNER/REPO: Use repository as template
  • --public: Create public repository (default if using template)
  • --private: Create private repository
  • --clone: Clone repository after creation
  • --description DESC: Repository description
  • --homepage URL: Repository homepage URL

Examples:

bash
# Minimal - public, auto-clone
gh repo create zenobi-us/new-module \
  --template zenobi-us/bun-module \
  --public \
  --clone

# With metadata
gh repo create zenobi-us/new-module \
  --template zenobi-us/bun-module \
  --public \
  --clone \
  --description "My awesome Bun module" \
  --homepage "https://example.com"

# Organization repository
gh repo create my-org/new-module \
  --template zenobi-us/bun-module \
  --public \
  --clone

Template Repository Structure

The zenobi-us/bun-module template provides:

  • TypeScript configuration: Preconfigured tsconfig.json
  • Mise integration: Task runner with build, test, format tasks
  • Testing: Vitest test infrastructure
  • Package configuration: Starter package.json with defaults
  • Build tooling: Bundling with Bun's bundler
  • Release automation: Release Please configuration for automated releases
  • Documentation: README template, AGENTS.md, RELEASE.md
  • Linting: ESLint and Prettier configured
  • GitHub Actions: CI/CD workflows preconfigured

Setup Script Behavior

The setup.sh script runs non-interactively with these defaults:

FieldDefault ValueWhere to Update
Package namemy-bun-packagepackage.json → name
DescriptionA Bun packagepackage.json → description
Author nameYour Namepackage.json → author.name
Author emailyou@example.compackage.json → author.email
Repository URLAuto-detected from git remoteUsually correct, verify in package.json → repository.url
GitHub orgusernameNot stored, used during setup only

After running setup.sh, you MUST manually edit package.json to update these values to your actual project details.

Common Workflows

Creating a Bun Package

bash
# 1. Create repository from template
gh repo create zenobi-us/my-bun-package \
  --template zenobi-us/bun-module \
  --public \
  --clone \
  --description "My awesome Bun package"

# 2. Navigate to directory
cd my-bun-package

# 3. Run setup (applies defaults)
bash setup.sh

# 4. Edit package.json manually
# Update: name, description, author.name, author.email

# 5. Trust mise and build
mise trust
bun install
mise run build

# 6. Commit and push
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main

Organization Package

bash
# Create under organization
gh repo create my-org/shared-package \
  --template zenobi-us/bun-module \
  --public \
  --clone \
  --description "Shared Bun package for organization"

cd shared-package
bash setup.sh

# Edit package.json with org-scoped name:
# name: "@my-org/shared-package"
# ...

mise trust
bun install
mise run build
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main

Private Package

bash
# Create private repository
gh repo create zenobi-us/internal-package \
  --template zenobi-us/bun-module \
  --private \
  --clone \
  --description "Internal Bun package"

cd internal-package
bash setup.sh

# Edit package.json as needed
# ...

mise trust
bun install
mise run build
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main

Troubleshooting

Template Repository Not Marked as Template

Problem: Could not clone: zenobi-us/bun-module is not a template repository

Solution:

bash
# Mark repository as template
gh repo edit zenobi-us/bun-module --template

# Verify it's now a template
gh repo view zenobi-us/bun-module --json isTemplate

GitHub CLI Authentication

Problem: gh: Not authenticated

Solution:

bash
# Authenticate with GitHub
gh auth login

# Verify authentication
gh auth status

Template Not Found

Problem: repository not found: zenobi-us/bun-module

Solution:

  • Verify template repository exists and is accessible
  • Check spelling of owner/repo
  • Ensure template repository is public or you have access

Setup Script Fails

Problem: setup.sh: command not found or script errors

Solution:

bash
# Verify file exists
ls -la setup.sh

# Make executable if needed
chmod +x setup.sh

# Run with bash explicitly
bash setup.sh

# Check Bun is installed
bun --version

Mise Trust Required

Problem: Config files in [...] are not trusted

Solution:

bash
# Trust the mise configuration
mise trust

# Now run mise tasks
mise run build

Clone Directory Exists

Problem: destination path 'repo-name' already exists

Solution:

bash
# Choose different name or remove existing directory
rm -rf repo-name

# Or use --clone flag without specifying directory
gh repo create owner/repo-name --template ... --clone

Build Fails After Setup

Problem: Build fails or dependencies missing

Solution:

bash
# Ensure dependencies are installed
bun install

# Trust mise config if not done
mise trust

# Try build again
mise run build

# Check for specific errors
mise run build --verbose

Post-Setup Next Steps

After successful setup and package.json updates:

  1. Verify package.json: Ensure all fields are correct

    bash
    cat package.json | jq '.name, .description, .author'
  2. Install dependencies:

    bash
    bun install
  3. Trust mise and build:

    bash
    mise trust
    mise run build
  4. Verify build output:

    bash
    ls -la dist/
    # Should see: index.js, index.d.ts
  5. Run tests (if any exist):

    bash
    mise run test
  6. Commit customizations:

    bash
    git add package.json
    git commit -m "chore: update package metadata"
    git push origin main
  7. Update README: Replace template content with actual documentation

  8. Update AGENTS.md: Document how AI agents should interact with your package

  9. Configure CI/CD: Review and customize GitHub Actions workflows in .github/workflows/

  10. Start development: Begin implementing your package in src/

Integration with Other Tools

With mise

bash
# Pin Bun version in project
mise use bun@latest

# Add to mise.toml tasks
[tasks]
setup = "bash setup.sh"
test = "bun test"
build = "bun run build"

With Git Workflows

bash
# Create feature branch immediately
git checkout -b feat/initial-implementation

# Set up pre-commit hooks
bun add -D husky lint-staged

With Package Managers

The template works with:

  • Bun (primary): bun install, bun add
  • npm (compatible): npm install works but Bun recommended
  • pnpm (compatible): pnpm install works as fallback

Best Practices

  1. Mark template repo once: Use gh repo edit --template on first use
  2. Use descriptive repo names: Choose names that clearly indicate purpose
  3. Scope package names: Use @scope/name for clarity and namespace ownership
  4. Update package.json immediately: Don't forget to edit after setup.sh runs
  5. Trust mise before building: Required for running mise tasks
  6. Commit metadata updates separately: Keep setup commit and metadata commit separate
  7. Test immediately after setup: Verify mise run build passes
  8. Update documentation early: Replace template placeholders with real content
  9. Configure visibility intentionally: Public for open source, private for internal
  10. Review generated files: Ensure AGENTS.md, README.md, and workflows fit your needs

Known Limitations

  1. Non-interactive setup: The setup.sh script doesn't prompt for input; it uses defaults that you must manually update in package.json afterward
  2. Manual package.json editing required: You must edit name, description, and author fields after running setup.sh
  3. No validation: The script doesn't validate your manual edits to package.json
  4. Mise trust required: You must explicitly trust the mise configuration before running tasks

Quick Start Summary

The complete workflow in commands:

bash
# 1. Ensure template repo is marked as template (one-time setup)
gh repo edit zenobi-us/bun-module --template

# 2. Create and clone from template
gh repo create OWNER/NAME \
  --template zenobi-us/bun-module \
  --public \
  --clone \
  --description "Your plugin description"

# 3. Enter directory
cd NAME

# 4. Run setup (uses defaults)
bash setup.sh

# 5. Edit package.json manually - UPDATE THESE:
#    - name: "my-bun-package" → "@owner/actual-name"
#    - description: "A Bun package" → "Your description"
#    - author.name: "Your Name" → Your actual name
#    - author.email: "you@example.com" → Your actual email

# 6. Trust mise, install, and build
mise trust
bun install
mise run build

# 7. Commit updates and push
git add package.json
git commit -m "chore: update package metadata"
git push -u origin main

Critical: Steps 5-7 are REQUIRED because setup.sh uses placeholder values.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Create New Bun Package Repo?

Use when creating new Bun packages from zenobi-us/bun-module template - automates repo creation, cloning, and setup using GitHub CLI; note setup.sh runs non-interactively with defaults requiring manual package.json updates

Firwat Create New Bun Package Repo op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Create New Bun Package Repo besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Create New Bun Package Repo an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/zenobi-us/dotfiles/tree/master/files/devtools/agent/bundles/developer/skills/devtools/create-new-bun-package-repo an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Create New Bun Package Repo benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Create New Bun Package Repo benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Create New Bun Package Repo domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Create New Bun Package Repo gratis?

Jo. zenobi-us huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇