feat(skills): add Inertia skill + resourceful controller in FastAPI skill#127
Merged
Merged
Conversation
…kill Update the FastAPI skill stub to teach a full resourceful controller with the seven standard CRUD methods (index, create, store, show, edit, update, destroy) consistent with router.resource(). Add a new Inertia (Inertia.js + FastAPI) skill stub and register the "inertia" provider key in SkillRegistry.skills, mirroring the existing fastapi/database skills. Includes concrete render/props/resource examples, a resourceful Inertia controller, and shared data. Verified end-to-end: both stubs parse, discover() picks up inertia, and publish() exports to .ai/, .claude/skills/, and GEMINI.md. Full suite: 1493 passed, 7 skipped (Postgres-only tests excluded — no live DB). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extend the Inertia skill with the client side and server-side validation:
- Pages & components: how createInertiaApp resolves Pages/<name> and props flow
- Persistent layouts via `Component.layout = page => <Layout>{page}</Layout>`
- Inertia form helper `useForm` (data/setData/verb methods/processing/errors),
including a search-as-you-type example
- Inertia HTTP helper `router` (get/post/delete/reload, visit options)
- Request validation with `RequestModel` (Pydantic): EmailStr, constrained
str, int, and optional/mixed fields via Field(...)
Note: the requested `useHttp` is not a real @inertiajs/react export — the
form helper is `useForm` (its data/setData/get/processing API matches the
shared snippet) and the programmatic HTTP helper is `router`. Documented
both real APIs. EmailStr/Field constraints and RequestModel verified at
runtime; stub re-parsed and re-rendered to .claude/ successfully.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements TASK #108 — two changes to the AI skills module under
fastapi_startkit/src/fastapi_startkit/skills/:stubs/.ai/fastapi-startkit/fastapi/SKILL.md): now teaches a full resourceful controller with the seven standard CRUD methods (index,create,store,show,edit,update,destroy) consistent withrouter.resource(), including a verb/URI mapping table andonly=/excepts=usage.stubs/.ai/fastapi-startkit/inertia/SKILL.md+"inertia"key inSkillRegistry.skills): Inertia.js + FastAPI guidance with concrete examples —Inertia.render(...)with resource serialization, a resourceful Inertia controller (GET renders, writes 303-redirect), andInertia.share().How it fits the export mechanism
Skills are declared by adding the provider's
provider_keytoSkillRegistry.skillsplus a shipped stub atskills/stubs/.ai/fastapi-startkit/<key>/SKILL.md.InertiaProvideralready usesprovider_key="inertia", so no provider change was needed. Onartisan ai:skills --sync, stubs publish into the project's.ai/(editable source of truth) and adapters render to.claude/skills/<name>/SKILL.mdandGEMINI.md.Verification
SkillParser;discover()picks upinertia.publish(target="all")in a temp project exports to.ai/,.claude/skills/, andGEMINI.md— confirmedfastapi-startkit-inertiarendered.--ignore=tests/masoniteorm/postgres; Postgres failures are environmental — no live DB).Inertia.render/InertiaResponse(inertia/inertia.py),Model.find_or_fail/all/create/update/delete,JsonResource(...).serialize()/.collection().🤖 Generated with Claude Code