Get the FREE Ultimate OpenClaw Setup Guide →

initialize-project

npx machina-cli add skill yu-iskw/coding-agent-fabric/initialize-project --openclaw
Files (1)
SKILL.md
2.1 KB

Initialize Project

Purpose

This skill automates the initial setup of a new project derived from this template. It leverages AI capabilities to directly modify project metadata and documentation by replacing placeholders, ensuring a clean start for a new repository.

Instructions

  1. Gather Information: Ask the user for:
    • New project name (e.g., my-awesome-app)
    • Project description
    • Author name
    • (Optional) GitHub repository URL
  2. Update Project Metadata: Directly update the following files using the Write or StrReplace tools:
    • package.json: Update name, description, and author.
    • packages/common/package.json: Update the package name to match the new scope (e.g., @new-name/common).
    • .trunk/trunk.yaml: If there are template-specific references, update them.
  3. Update README Placeholders: Use the StrReplace tool to replace the placeholders in README.md with the gathered information:
    • {PROJECT_NAME} -> New project name
    • {PROJECT_DESCRIPTION} -> Project description
    • {LICENSE} -> ISC (or other preferred license)
  4. Install Dependencies: Run pnpm install to update the lockfile with the new package names.
  5. Final Cleanup: Remove the initialization skill and its related files once bootstrapping is complete, if requested by the user.

Examples

Example 1: Initializing a new CLI tool

Input: User says "Initialize this project as 'json-fixer', a CLI tool to fix broken JSON files." Action:

  1. Gather details from the user (Name: json-fixer, Description: A CLI tool to fix broken JSON files, Author: [Author Name]).
  2. Update package.json with the new metadata.
  3. Use StrReplace on README.md to swap {PROJECT_NAME}, {PROJECT_DESCRIPTION}, and {LICENSE} with the actual values.
  4. Run pnpm install.

Source

git clone https://github.com/yu-iskw/coding-agent-fabric/blob/main/.claude/skills/initialize-project/SKILL.mdView on GitHub

Overview

Automates the initial setup of a new TypeScript project derived from the template. It renames packages, updates metadata, and cleans up documentation so you start fresh. Uses Write and StrReplace to apply changes, then installs dependencies and can remove the init footprint.

How This Skill Works

The user provides project name, description, author, and optional GitHub URL. The skill updates package.json, packages/common/package.json, and .trunk/trunk.yaml, replaces README placeholders, runs pnpm install, and finally can remove the initialization artifacts if requested.

When to Use It

  • Starting a new project from this TypeScript template with new name and metadata.
  • Bootstrapping a CLI tool or library from the template for a fresh start.
  • Rebranding the template to a new scope or company (e.g., @new-name).
  • Setting up a fresh repository with updated README and license information.
  • Preparing a microservice or package suite by updating trunk references.

Quick Start

  1. Step 1: Gather information from the user (New project name, Project description, Author, optional GitHub URL).
  2. Step 2: Apply changes to package.json, packages/common/package.json, .trunk/trunk.yaml, and README.md placeholders ({PROJECT_NAME}, {PROJECT_DESCRIPTION}, {LICENSE}).
  3. Step 3: Run pnpm install and perform final cleanup of the init artifacts if requested.

Best Practices

  • Gather all required metadata (name, description, author, GitHub URL) before applying changes.
  • Validate the new package name against scope conventions (e.g., @scope/name).
  • Verify README placeholders and LICENSE values are correctly replaced.
  • Run pnpm install and review the lockfile for consistency.
  • Plan and perform final cleanup of the init skill and files only if requested by the user.

Example Use Cases

  • Initialize 'json-fixer' as a new CLI tool from the TS template, updating package.json and README placeholders.
  • Bootstrap 'my-awesome-app' with a custom description and author, then install dependencies.
  • Rebrand the template to '@acme/ui' for an internal frontend library and adjust trunk references.
  • Set up 'inventory-service' as a fresh repository, updating metadata and README content accordingly.
  • Create a TypeScript utility toolkit by replacing placeholders and updating the common package name.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers