Use when adding new files, patterns, or examples to skeleton/. Use when creating new controller, model, job, mailable, migration, view, or component in the skeleton app.
npxskills add aniftyco/kubit--skill kubit-expanding-skeletonLoading…
Use when adding new files, patterns, or examples to skeleton/. Use when creating new controller, model, job, mailable, migration, view, or component in the skeleton app.
npxskills add aniftyco/kubit--skill kubit-expanding-skeletonLoading…
The skeleton/ directory is the ideal Kubit app. Add patterns here first, then add types to make them compile.
skeleton/
├── app/
│ ├── routes.ts # Route definitions
│ ├── controllers/ # Class-based controllers
│ ├── models/ # ORM models with decorators
│ ├── jobs/ # Job classes
│ └── mail/ # Mailable classes
├── components/ # Shared React components
├── views/ # React page components (SSR)
├── config/ # Runtime configuration
├── database/migrations/ # Migration classes
├── public/ # Static assets
└── tests/ # Test files
Controllers: Class with async methods, receive HttpContext, return view() or values
export default class FooController {
public async index({ request, response }: HttpContext) {
return view('foo/index', { data });
}
}
Models: Class extending Model with @column decorators
@use(SoftDeletes)
export class Foo extends Model {
@column({ primary: true }) public id: number;
@column() public name: string;
@column.dateTime({ autoCreate: true }) public createdAt: DateTime;
}
Jobs: Class extending Job with @property and handle()
export class FooJob extends Job {
@property() public data: string;
async handle() { /* ... */ }
}
Mailables: Class extending Mailable with view rendering
export class FooMail extends Mailable {
@property() public name: string;
async handle() { return this.view('emails.foo', { name: this.name }); }
}
Migrations: Class extending Migration with up/down
export default class extends Migration {
async up() { return schema.createTable('foos', (t) => { /* ... */ }); }
async down() { return schema.dropTableIfExists('foos'); }
}
Views: React FC with typed props, default export
const Foo: FC<{ data: string }> = ({ data }) => <div>{data}</div>;
export default Foo;
Components: React FC with named export
export const Button: FC<Props> = ({ children }) => <button>{children}</button>;
| Import | Source |
|---|---|
kubit | Core: defineConfig, env, use |
kubit:router | router |
kubit:inertia | view |
kubit:server |
tsc --noEmit passesHttpContext |
kubit:orm | Model, decorators, relations |
kubit:db | Migration, schema |
kubit:queue | Job, property |
kubit:mail | Mailable |
@app/* | App-level imports |
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).