initialize-project
npx machina-cli add skill yu-iskw/coding-agent-fabric/initialize-project --openclawInitialize 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
- Gather Information: Ask the user for:
- New project name (e.g.,
my-awesome-app) - Project description
- Author name
- (Optional) GitHub repository URL
- New project name (e.g.,
- Update Project Metadata: Directly update the following files using the
WriteorStrReplacetools:package.json: Updatename,description, andauthor.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.
- Update README Placeholders: Use the
StrReplacetool to replace the placeholders inREADME.mdwith the gathered information:{PROJECT_NAME}-> New project name{PROJECT_DESCRIPTION}-> Project description{LICENSE}->ISC(or other preferred license)
- Install Dependencies: Run
pnpm installto update the lockfile with the new package names. - 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:
- Gather details from the user (Name: json-fixer, Description: A CLI tool to fix broken JSON files, Author: [Author Name]).
- Update
package.jsonwith the new metadata. - Use
StrReplaceonREADME.mdto swap{PROJECT_NAME},{PROJECT_DESCRIPTION}, and{LICENSE}with the actual values. - 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
- Step 1: Gather information from the user (New project name, Project description, Author, optional GitHub URL).
- Step 2: Apply changes to package.json, packages/common/package.json, .trunk/trunk.yaml, and README.md placeholders ({PROJECT_NAME}, {PROJECT_DESCRIPTION}, {LICENSE}).
- 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.