agentleFS
dperezcabreradperezcabrera/pico-skills/.claude/skills/init-project/SKILL.md

init-project

Skill4 starsChanged 4 months agoMITView on GitHub

Generate a complete pico-boot project using pico-initializer. Use when bootstrapping a new project with specific modules (fastapi, sqlalchemy, celery, pydantic, auth).

  • Installs packages

53 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use addskill, apply-firmware and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +10 more from ryanportfolio

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 45 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If no modules specified, default to fastapi

    line 19
  2. Very specific:

    If auth is in modules, also set includeCompose: true and includeAuthServer: true

    line 41
  3. Very specific:

    If user mentions "docker" or "compose", set includeDocker: true / includeCompose: true

    line 42
  4. Very specific:

    If user mentions "example" or "crud", set includeExample: true (requires fastapi + sqlalchemy)

    line 43
  5. Distinctive:

    Do NOT add submodules or pico packages to the modules list — it's redundant and may cause duplicate registration.

    line 108

“Common” is measured: kept by at least 6 in 10 of the 45 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Generate Pico Project

Generate a project using pico-initializer: $ARGUMENTS

Also available as a web app: https://dperezcabrera.github.io/pico-initializer/

Steps

  1. Parse arguments — extract project name and optional modules from $ARGUMENTS.
    • First word is the project name (e.g. my-service)
    • Remaining words are modules: fastapi, sqlalchemy, celery, pydantic, auth
    • If no modules specified, default to fastapi
  2. Locate pico-initializer — find the CLI:
    git clone https://github.com/dperezcabrera/pico-initializer.git /tmp/pico-initializer
    INITIALIZER=/tmp/pico-initializer/cli.js
  3. Build config JSON from the parsed arguments:

    {
      "projectName": "<name>",
      "modules": ["fastapi", "sqlalchemy"],
      "includeTests": true,
      "includeDocker": false,
      "includeCompose": false,
      "includeAuthServer": false,
      "includeExample": false
    }

    Rules:

    • If auth is in modules, also set includeCompose: true and includeAuthServer: true
    • If user mentions "docker" or "compose", set includeDocker: true / includeCompose: true
    • If user mentions "example" or "crud", set includeExample: true (requires fastapi + sqlalchemy)
  4. Run the generator:
    node "$INITIALIZER" '<config-json>'
    # Or with explicit output dir:
    node "$INITIALIZER" --output-dir ./my-project '<config-json>'
  5. Verify the generated structure:
    python3 -m compileall -q <project-name>/

Generated project structure

Base files (always generated):

<project-name>/
├── <package>/
│   ├── __init__.py
│   ├── config.py          # @configured AppSettings
│   ├── main.py            # pico_boot.init(modules=["<package>"])
│   └── services.py        # @component ExampleService
├── application.yaml       # Config for all plugins
├── pyproject.toml         # Dependencies and build config
├── requirements.txt
├── README.md
└── .gitignore

Conditional files by module:

ModuleFiles added
fastapi<package>/controllers.py — @controller with @get routes
sqlalchemy<package>/models.py — AppBase entity, <package>/repositories.py — @repository with @query
celery<package>/tasks.py — @component with @task methods
pydantic@validate decorator added to services.py (no extra file)
auth<package>/secure_controller.py — @requires_role + @allow_anonymous routes

Optional extras:

OptionFiles added
includeTeststests/__init__.py, tests/conftest.py with container + TestClient fixtures
includeDockerDockerfile
includeComposedocker-compose.yml with app service
includeAuthServerAdds pico-auth service to docker-compose.yml (port 8100, admin auto-created)
includeExampleexamples/products_api/ — full CRUD with models, schemas, repositories, services, controllers, database setup

How pico-boot wiring works

The generated main.py uses a single root module:

container = init(modules=["myapp"], config=config)

This is all that's needed because:

  • Recursive scanning — pico-ioc scans myapp and all submodules, discovering every @component, @controller, @repository, @configured class.
  • Plugin auto-discovery — pico-boot loads all installed pico-* packages via pico_boot.modules entry points. No need to list them in modules=[].

Do NOT add submodules or pico packages to the modules list — it's redundant and may cause duplicate registration.

Available modules

ModuleValuePackageDescription
FastAPIfastapipico-fastapiREST API with @controller and route decorators
SQLAlchemysqlalchemypico-sqlalchemyDatabase ORM with @repository and @query
Celerycelerypico-celeryBackground tasks with @task
Pydanticpydanticpico-pydanticMethod-level validation with @validate
Authauthpico-client-authJWT authentication with @requires_role

Config JSON reference

FieldTypeDefaultDescription
projectNamestringrequiredProject and directory name
packageNamestringderivedPython package name (auto-derived from projectName)
pythonVersionstring"3.12"Python version for pyproject.toml
modulesstring[][]Modules to include (see table above)
includeTestsbooltrueGenerate tests/ with conftest.py
includeDockerboolfalseGenerate Dockerfile
includeComposeboolfalseGenerate docker-compose.yml
includeAuthServerboolfalseAdd pico-auth service to compose
includeExampleboolfalseAdd Products CRUD example (requires fastapi + sqlalchemy)

CLI usage

# Minimal FastAPI project
node cli.js '{"projectName":"my-api","modules":["fastapi"]}'

# Full stack with auth + compose + example
node cli.js '{"projectName":"my-app","modules":["fastapi","sqlalchemy","pydantic","auth"],"includeCompose":true,"includeAuthServer":true,"includeExample":true}'

# Output to specific directory
node cli.js --output-dir ./workspace '{"projectName":"my-app","modules":["fastapi"]}'

# List registered generator tools
node cli.js --list

After generation

cd <project-name>
python -m venv .venv && source .venv/bin/activate
pip install -e .
# FastAPI projects:
uvicorn <package>.main:app --reload
# With compose + auth:
docker compose up

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.