Create new Lessweb projects from the example template. Use when the user wants to start a new Lessweb project, scaffold a Lessweb application, or create a project based on the Lessweb framework example.
Create a new Lessweb project based on the example template in the lessweb repository. This skill guides you through collecting project information and generating a complete project structure with all files properly configured.
Use this skill when:
Follow these steps in order:
Ask the user for a project code name (e.g., "Moon Cake", "User Management System")
If the project code name is in Chinese:
If already in English, use it directly
Check if the project code name ends with words like:
If it does, remove the suffix and inform the user:
The final project code name should be a simple, descriptive name without technical suffixes
Ask the user for a project description
Store this description for later use
Ask the user where to create the new project:
Validate the target directory exists or can be created
Based on the project code name (e.g., "Moon Cake"), generate:
Copy all files from the template/ directory (located in the same directory as this SKILL.md file) to the target directory, making the following replacements:
Template Location: The template directory is at ~/.agents/skills/lessweb-starter/template/ (or relative to this SKILL.md: ./template/)
Copy all files from the example directory structure:
example/
├── .env
├── .env.testci
├── .env.staging
├── .env.production
├── .gitignore
├── .gitlab-ci.yml
├── .pyway.conf
├── Dockerfile
├── Makefile
├── README.md
├── main.py
├── pyproject.toml
├── requirements.txt
├── config/
│ ├── bullmq.toml
│ ├── jwt_gateway.toml
│ ├── lessweb.toml
│ ├── mysql.toml
│ ├── redis.toml
│ └── redis.production.toml
├── migration/
│ └── V01_01_01__init_tables.sql
├── openapi/
│ └── openapi.json
├── shared/
│ ├── __init__.py
│ ├── bullmq_plugin.py
│ ├── error_middleware.py
│ ├── jwt_gateway.py
│ ├── lessweb_commondao.py
│ └── redis_plugin.py
├── src/
│ ├── __init__.py
│ ├── controller/
│ │ ├── __init__.py
│ │ └── admin_controller.py
│ ├── entity/
│ │ ├── __init__.py
│ │ └── admin.py
│ ├── processor/
│ │ ├── __init__.py
│ │ └── monitor_processor.py
│ └── service/
│ ├── __init__.py
│ └── auth_service.py
└── tests/
├── __init__.py
└── e2e/
├── __init__.py
└── test_admin_controller.py
In ALL files (except binary files), replace the following strings:
| Original | Replace With | Example |
|---|---|---|
My SaaS Skeleton | Title Case version | Moon Cake |
my-saas-skeleton | Kebab case version | moon-cake |
my_saas_skeleton | Snake case version | moon_cake |
My SaaS application skeleton built with lessweb framework | User's description | User's description |
pyproject.toml:
name = "my-saas-skeleton" → name = "{kebab-case}"description = "My SaaS application skeleton built with lessweb framework" → description = "{user_description}"main.py:
description='My SaaS Skeleton' → description='{Title Case}'openapi/openapi.json:
"title": "My SaaS Skeleton API" → "title": "{Title Case} API""description": "My SaaS application skeleton built with lessweb framework - providing admin authentication and system monitoring" → "description": "{user_description}"README.md:
# My SaaS Skeleton → # {Title Case}.gitlab-ci.yml:
APP_NAME: my-saas-skeleton → APP_NAME: {kebab-case}config/lessweb.toml:
name = 'my-saas-skeleton' → name = '{kebab-case}'file = 'logs/my-saas-skeleton.log' → file = 'logs/{kebab-case}.log'After copying all files, report to the user:
Suggest next steps:
Next steps:
1. cd {target_directory}
2. pip install -r requirements.txt
3. Configure your .env file with database and Redis credentials
4. Run database migrations: make pyway-migrate
5. Start the application: python main.py
~/.agents/skills/lessweb-starter/template/lessweb-starter/ directoryUser: "Create a new project called '月饼商城'"
Assistant: "I've translated your project name to 'Moon Cake Mall'. Is this acceptable?"
User: "Yes"
Assistant: "I notice the name ends with 'Mall'. I'll remove that suffix. The project code will be 'Moon Cake'."
Assistant: "Please provide a project description (this will be used in pyproject.toml and openapi.json). If you don't have one, I can use: 'Moon Cake - A SaaS application built with lessweb framework'"
User: "An e-commerce platform for selling moon cakes online"
Assistant: "Where would you like to create the new project? (provide full path, or '.' for current directory)"
User: "/Users/zhangji/projects/moon-cake"
Assistant: Creates the project structure with all files, replacing:
Assistant: "Project created successfully! 37 files created in /Users/zhangji/projects/moon-cake"
Before completing the skill execution, verify: