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
- •Gather Information: Ask the user for:
- •New project name (e.g.,
my-awesome-app) - •Project description
- •Author name (e.g.,
Your Name <your.email@example.com>)
- •New project name (e.g.,
- •Update Project Metadata: Directly update the following files using the
WriteorStrReplacetools:- •
pyproject.toml: Updateproject.name,project.description, andproject.authors. - •Update
tool.hatch.build.targets.wheel.packagesto match the new source directory.
- •
- •Rename Source Package:
- •Rename
src/your_packageto the new package name (e.g.,src/my_awesome_app). - •Update any internal imports if they reference
your_package.
- •Rename
- •Update README Placeholders: Use the
StrReplacetool to replace the placeholders inREADME.mdwith the gathered information:- •
{PROJECT_NAME}-> New project name - •
{PROJECT_DESCRIPTION}-> Project description
- •
- •Install Dependencies: Run
make setupto initialize the environment and updateuv.lock. - •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
pyproject.tomlwith the new metadata. - •Rename
src/your_packagetosrc/json_fixer. - •Use
StrReplaceonREADME.mdto swap placeholders with actual values. - •Run
make setup.