본문으로 건너뛰기
cccskills
무료GitHub에 공개

create-package

Create a new package in the One Page monorepo with the required LICENSE symlink, README, and workspace registration. Use when adding a new core or feature package.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Create Package

Parse $ARGUMENTS as <directory> <package_name> where <directory> is either core or features.

Follow every step below in order. Do not skip steps or use alternative methods.


Step 1 — Scaffold the package

Use the official Flutter command. Manual directory creation is strictly forbidden.

fvm flutter create -t package packages/<directory>/<package_name> --project-name <package_name>

Example:

fvm flutter create -t package packages/core/my_utils --project-name my_utils
fvm flutter create -t package packages/features/my_feature --project-name my_feature

Step 2 — Replace the LICENSE with a symbolic link

The generated LICENSE file must be replaced with a symlink to the root LICENSE file to keep the project consistent.

# For core packages
rm packages/core/<package_name>/LICENSE
ln -s ../../../LICENSE packages/core/<package_name>/LICENSE

# For features packages
rm packages/features/<package_name>/LICENSE
ln -s ../../../LICENSE packages/features/<package_name>/LICENSE

Step 3 — Replace the generated README.md

Overwrite the flutter-create template README with actual content following this structure:

# <package_name>

A concise description of what this package does.

## Features

- Key feature 1
- Key feature 2
- Key feature 3

## Getting Started

Add the package to your `pubspec.yaml`:

```yaml
dependencies:
  <package_name>:
    path: ../../../packages/<directory>/<package_name>
```

Usage

// Practical example showing the primary use case

Do NOT leave any flutter-create template text (e.g., "A starting point for a Dart package.") in the README.

---

## Step 4 — Update the root README.md

Add a new entry for the package in the root `/README.md`. Follow the existing format and maintain alphabetical order within the `core/` or `features/` section. Use a brief, informative description.

---

## Step 5 — Register in Pub Workspaces

**Root `pubspec.yaml`** — add the package path to the `workspace:` section, keeping alphabetical order:

```yaml
workspace:
  - packages/core/<package_name>   # core packages
  - packages/features/<package_name>  # features packages

Package pubspec.yaml (packages/<directory>/<package_name>/pubspec.yaml) — add the workspace resolution field:

resolution: workspace

Step 6 — Set standard dev_dependencies

In packages/<directory>/<package_name>/pubspec.yaml, replace the generated dev_dependencies block with the project-standard set. Match the versions used in existing packages (check packages/features/haptics/pubspec.yaml as the reference):

dev_dependencies:
  altive_lints: ^2.3.0
  build_runner: ^2.15.0
  flutter_test:
    sdk: flutter
  mockito: ^5.6.4

Also replace the generated analysis_options.yaml content to use altive_lints:

include: package:altive_lints/altive_lints.yaml

Step 7 — Verify the new package

fvm dart run melos bootstrap
fvm dart analyze

Both commands must complete without errors before the task is considered complete.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

qa

무료

Run the project's verification harness (analyze, lint, format, tests) after code changes. Use after editing Dart code to verify the change before declaring it complete.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

naipaka/onepage192026년 10월 20일 업데이트

naipaka의 스킬 모두 보기

이 스킬의 문제 신고